Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About IAmBill

  • Rank
  1. Ah, I found the answer, the problem was that there were an implicit conversion of float to string on the assignment to opacity.So:opacity = 0 = "0"opacity += 0.1 = "00.1" = "0.1"opacity += 0.1 = "0.10.1" = invalid dataMakes sense... sorry for the stupid question.
  2. Unfortunately, I'm running this locally on WAMP server. You can however test it in any one of W3schools Tryit Editor pages by using this code below.<html><body><script type="text/javascript">function flash(obj) { if (flash.called) { if (flash.obj.style.opacity == 1) { flash.called = false; } else { flash.obj.style.opacity += 0.1; setTimeout("flash()", 1); } } else { flash.called = true; flash.obj = obj; flash.obj.style.opacity = 0; setTimeout("flash()", 1); }}</script><span style="border:1px solid black" onclick="flash(this)">CLICK ME TO FLASH!</s
  3. function flash(obj) { if (flash.called) { if (flash.obj.style.opacity == 1) { flash.called = false; } else { flash.obj.style.opacity += 0.01; setTimeout("flash()", 1); } } else { flash.called = true; flash.obj = obj; flash.obj.style.opacity = 0; setTimeout("flash()", 1); }} Granted it's late at night and I'm tired, but I can't for the life of me figure out why this function doesn't work. I removed the debug messages, but the basic gist is this... the statement "flash.obj.style.opacity += 0.01;" only works once... that is to say, the function is called with an object. It goes to
  4. Thank you, justsomeguy.Submit to itself... it's so obvious that I can't believe I didn't think of it myself. Regardless, that link provides tons of tips that I definitely wasn't doing properly. Thanks again for everything.
  5. Hi, I'm trying to create a very simple registration form. Nothing fancy, just a log-in, password, email address, and a couple of confirmations. While I have it set up in AJAX to alert the user if they're using a log-in or email address already in the database, I have to tend to those than don't support AJAX and redirect back to the registration page if they try to submit a registration with errors.So, the checks are easy enough... I don't have problems identifying whether or not they've made a bad registration. The issue is that I don't know the proper way to redirect the user back to the regi
  6. Hmmm... you're getting me thinking, but I'm on the day after an all-nighter, so I'm probably not thinking clearly. I know I couldn't possibly have larger tables than some of the more major websites... and it's sensible to break the data up into two tables that cross-reference each other based on comparable keys... in fact, it feels obvious, but my brain is liquid so I can't quite comprehend it. In fact, I'm quite sure I've done plenty of it in a previous database I've built for a company... maybe I should sleep.
  7. I don't know this particular paradigm of web development and I was hoping some more experienced developers could help me on this one. I am not posting this in a medium specific forum as I'm uncertain which medium to use.Let's say I have a registration-based website with the potential for a large amount of traffic. Now, let's say I have functionality in the website where I users are able to write personal notes on any other user which they can recall at a later time. Given the fact that there is a cross-reference of users, the number of possible combination grows exponentially with each new use
  8. Hi, I have a need to get the pixel values of CSS properties that were never used-defined or are set to auto. That is to say... if I never defined a height for a span element, it would be defaulted to auto, and if I were to set a background color, I can distinctly see what the height of the span element is. I'd like to know the pixel value of this height as determined by the browser. Is this possible?Thanks.EDIT: I suppose the same query would refer to properties set to "inherit," though I don't explicitly have a use for that at this time. Regardless, I believe it would fall into the same solut
  9. Hi, I have a bit of a situation which I'm too tired to wrap my brain around... normally I would just go to sleep and think of it in the morning, but it's eating me up and I can't sleep until I get the answer.So anyway, I have reassigned document.onmousemove to a specific function. Let's say for debug purposes that this function simply updates a <span> with the coordinates of the mouse. Now, as I move the mouse around, I can see the coordinates changing in the span.The next step was to have an onmouseover event on a specific image object. The goal was to have the image's opacity come in w
  10. Thanks... I figured as much, I just needed to be certain.EDIT: Ah, but it seems each element maintains its ID regardless of whether it can be referenced by the DOM. I believe this means I could use it for something like this:function zoom(){ var aspectRatio = parseFloat(document.getElementById("myImage").style.height) / parseFloat(document.getElementById("myImage").style.width); var imageList = document.getElementsByTagName("img"); for (var x in imageList) { if (imageList[x].id == "myImage") { imageList[x].style.height = (parseFloat(imageList[x].style.height) + 2) + "%"; imageL
  11. Hi, I have a page with a series of images with the same style. The size of the images is dynamically applied to the images with PHP and I'd like the user to be able to scale these at their choosing with a couple of buttons. The issue, however, is that for some reason the simple javascript that I thought would work doesn't... I set all of the images to have the same Id and assumed that by using getElementById and adjusting the style it would affect all of the images... unfortunately, it only affects the first image. Anyone have any idea of what's going on? function zoom(){var aspectRatio;aspec
  • Create New...