justravis Posted August 23, 2007 Share Posted August 23, 2007 i am trying to pass the value of the req feild to reqfeilds req writes OK, but reqfeilds does not. thoughts? THANKS! <html> <head> <script type="text/javascript"> function getValue() { document.write(document.getElementById('req').value + '<br>'); var reqfeilds = document.getElementById('req').value; document.write(reqfeilds + '<br>'); } </script> </head> <body> <input type=hidden id=req value='name,email'> <input type=button id=split value=split onclick="getValue()"> </body> </html> Quote Link to comment Share on other sites More sharing options...
Karl33to Posted August 23, 2007 Share Posted August 23, 2007 document.write should only be used before the page has finished loading, if its for debugging you could use alert(''); or even have a debugging div and use document.getElementById("debug").innerHTML = "sometext"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.