Jump to content

astralaaron

Members
  • Posts

    1,254
  • Joined

  • Last visited

Everything posted by astralaaron

  1. In my CSS file, my div has a min-height of 600px. The problem I am having is that one of my javascripts needs to know the height of this div, and sometimes, depending on the content, the div will expand beyond 600px. When I try to get the height with javascript, it still says 600px even if it has expanded. Any advice is appreciated!
  2. oddly just started working...don't know why
  3. Do you have any idea why the following will not work? It always results in 16:00 ($_POST is coming from my form which outputs an AM / PM time) // $_POST['time'] = "02:32PM";$hour24time = date("H:i", strtotime($_POST['time'])); While this works fine? Results in 14:32 $hour24time = date("H:i", strtotime("02:32PM"));
  4. I am having a hard time figuring out how to conver a date such as 01/25/2015 04 : 11 : AM to a time stamp. I've tried and failed with strtotime() does anyone know why it wouldn't work? or how I should go about doing it? Thanks
  5. Why would getElementsByTagName('a') be returning the href tag instread of giving me access to the anchor elements? function get_links(elm) {var container = document.getElementById(elm);var links = container.getElementsByTagName('a');console.log(links[0]);} I can't make any sense of this
  6. I'm glad you pointed that out, i went with setting up a separate lookup table. Thanks guys.
  7. I guess I should stop over thinking. I was just wondering how the veterans around here would do it so maybe I can pick up on some better practice.
  8. I am trying to figure out a way that makes sense to handle the trash bin of a private messaging system in my project. When a message is sent from user_a, an entry to the 'msg_thread' table is made with the sender_id, receiver_id, subject, message, etc. I have a boolean 'trash' field for if the message is marked as trash..but if one user marks trash then it will go to the trash for both users. So I am wondering, would it make sense to have sender_trash and receiver_trash instead of just 'trash'? How would you handle emptying the trash bin? do you need another field for 'sender_emptied_trash' and 'receiver_emptied_trash' to know when to delete the database record? Any advice?
  9. If you don't need a src for the iframe and are just using the iframe for an image upload, would you just not write an SRC at all? Now I am not putting an SRC tag at all and its working fine. I was reading around and found discussion about iframes causing random elements to scroll when they have fragmented URL's ( http://stackoverflow.com/questions/26017978/iframe-causes-parent-elements-to-scroll-up-on-google-chrome-when-url-contains-fr )
  10. I found the problem, wow it is strange. I have an iframe on the page that I am using in my "ajax" image upload.. In my iframe src="" tag i had a "#". (src="#") removing the src fixes the problem..if I add the src="#" the page scrolls all the way down when the page loads, and then every time the setTimeout() is called. Really strange, anyway no more problems..but does anyone know why that was happening?
  11. I am using a javascript to display a clock on a website I am working on. I just noticed that if i load the page on Chrome, every time the clock updates, the page scrolls all the way down...the weird thing is that it is only doing it on one specific page, the script works fine on other pages. This is the script for the clock: function updateClock ( ){ var months = new Array('January','February','March','April','May','June','July','August','October','November','December'); var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); function endings( date ) { var end = ''; switch(date) { case 1:case 21:end = 'st';break; case 2:case 22:end = 'nd';break; case 3:case 23:end = 'rd';break; default:end = 'th';break; } return end; } var currentTime = new Date ( ); var currentHours = currentTime.getHours ( ); var currentMinutes = currentTime.getMinutes ( ); var currentSeconds = currentTime.getSeconds ( ); currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes; currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds; var ampm = ( currentHours < 12 ) ? "AM" : "PM"; currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours; currentHours = ( currentHours == 0 ) ? 12 : currentHours; var currentTimeString = "<span>" + currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + ampm + "</span> on " + days[currentTime.getDay()] + " " + currentTime.getDate() + endings() + " " + months[currentTime.getMonth()] + " " + currentTime.getFullYear(); document.getElementById("clock").innerHTML = currentTimeString; window.setTimeout(function(){updateClock();},'1000');} I was up all night last night trying to fix it, I'm getting no where. it is definitely happening every time the setTimeout fires.. At first I had the setTimeout written like this: window.setTimeout(updateClock,'1000'); both ways the same thing happens. Has anyone ever had an issue like this? Anyone have any tips to pin point what is causing the problem? EDIT: I am pretty sure the only difference on this page is that I use a jquery plugin to crop images (jcrop) I tried including the files on the other pages to see if the same problem would happen, but it doesn't happen.
  12. Sorry, I have a difficult time wrapping my head around things some times.. When you say "tables that don't contain a bunch of irrelevant data" that means that the table with only the two fields would be faster than targeting the table that has 10 fields? The 8 additional fields are irrelevant to this specific search.. Thank you for responding.
  13. If there is a table that has 10 fields, and you wanted to select only 2 of the fields, is it slower than if the table only had 2 fields and using a select *? I am wondering if I should have my members table have more fields or to create a separate table for their account profile information
  14. nevermind..just doesn't work in IE11 developer tools IE7 / 8 modes...worked in IETester program
  15. filter:progid:DXImageTransform.Microsoft.DropShadow(enabled=true, offX=1, offY=1, color=#00ff00); anyone know why this doesn't work in IE7 - 8? (with or without the enabled parameter..)
  16. filter:progid:DXImageTransform.Microsoft.DropShadow(enabled=true, offX=1, offY=1, color=#00ff00); Where am I going wrong? Doesn't work....
  17. do any of the filters text shadow filters work lower than IE9? I'm still having no luck...
  18. which filters work in IE7 and IE8?? I've been trying every one I can find and none of them work...
  19. Here is the area of the code with an issue... " x.oldMarquee.style.textShadow = '3px 3px 1px #0000ff'; " is not working x.oldMarquee = document.createElement('marquee'); e.canvasId = settings.parent + '_marquee'; //IE7 x.oldMarquee.trueSpeed = 'truespeed'; x.oldMarquee.scrollAmount = ((settings.velocity) ? settings.velocity : 1); x.oldMarquee.scrollDelay = '18'; // > IE7 x.oldMarquee.setAttribute("truespeed","truespeed"); x.oldMarquee.setAttribute("scrollamount", ((settings.velocity) ? settings.velocity : 1)); x.oldMarquee.setAttribute("scrolldelay","18"); x.oldMarquee.style.position = "relative"; x.oldMarquee.stylx.overflow = "hidden"; var weight, style, family, color, size, hover; x.oldMarquee.style.paddingTop = ((settings.height - ((settings.fontSize) ? (settings.fontSize) : 14)) / 2) + "px"; x.oldMarquee.style.size = size = (settings.fontSize) ? (settings.fontSize + "px") : '14px'; x.oldMarquee.style.fontWeight = weight = (settings.fontWeight) ? settings.fontWeight : 'normal'; x.oldMarquee.style.fontStyle = style = (settings.fontStyle) ? settings.fontStyle : 'normal'; x.oldMarquee.style.fontFamily = family = (settings.fontFamily) ? settings.fontFamily : 'Times New Roman'; x.oldMarquee.style.color = color = (settings.fontColor) ? settings.fontColor : '#000'; x.oldMarquee.style.textShadow = '3px 3px 1px #0000ff'; x.oldMarquee.id = x.canvasId; x.oldMarquee.width = settings.width; x.oldMarquee.height = settings.height; x.parentNode.appendChild(x.oldMarquee);
  20. I am having a weird issue where the text-shadow will not take effect on an html marquee (IE7 / IE8) The marquee is created dynamically, and appended to the document... ive tried adding the style before and after the element is appended. all other style's work fine. Any common reason why maybe it is not working?
  21. Thanks for everyone who took time trying to figure this out. It turns out my problem was how I was attaching the mousemove event to the canvas. I will post the fix later in case anyone is interested.
  22. I was just able to test on a legitimate IE10 and it is not working..for some reason the mouse is NaN...i just dont get it
  23. any idea for someone who doesn't have access to windows 7 xpmode? I have the home edition of win7 and cant do xpmode
  24. This is related to my other post about the numbers showing up as NaN with developer tools open. I really need to know if the script works in IE 9 / 10, all I have is 11. I am not sure if it is not working in ie10 / 9 or if it is just because the developer tools document mode is on. Is it safe to assume if it is working in IE11, that it is working in IE10 and 9? How would you go about testing it? I read that the best way is to test it on a legitimate copy of those versions..but how do you do that? Can you install different versions? This is sort of urgent, appreciate any advice.
×
×
  • Create New...