FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

DOM help

 


Xcelerate
I have got this page on my website, http://etowahxc.com/pacer.php and what is supposed to happen is such that the user enters some data, presses 'send', and then the results show up as text in the box below. I used DOM to implement this, and it works fine on my computer (both IE and Firefox), but other people say that it doesn't work for them, and I can't quite figure out why.

I checked the DOM specs on the W3C website, and it says that most browsers should support it, so it must be something in my code. Could anyone help? You can just view the source for that page as well.

Thanks.
mariohs
I tested here also (Mozilla Firefox 1.5.0.6) and nothing happens when I click on the send buttons (I tried both of them and none gave me any result), I'm not a pro in javascript, so I'm afraid you'll have to wait some javascript pro here to help you...
JayBee
Yes the same, it do nothing (Firefox 1.5.0.6, Konqueror 3.5.2, Opera 9.01, Internet Exlorer 6.0.2800)

error:
I don't know why, but there is 2x more childNodes then options, so childNode[0], childNode[2], ....are the text ' ' not the option item with value

solution:
replace ugly
Code:
selectelement.childNodes[a].lastChild.nodeValue;

with logical and easy
Code:
selectelement.options[a].value;


evry definition with childNodes with apropriate options
in cycles childNodes.length with options.length, etc...

You must corect it yourself, it is many times there.
Try to remove every childNodes. Its not good for this reason.
JayBee
btw, on page http://etowahxc.com/articles.php is corupted design in my Internet Explorer
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.