frozentree Posted March 5, 2006 Share Posted March 5, 2006 i got a problem here..but it dint work...i wonder why? any1 can help me? thks man<html><head><script type="text/javascript">function Prototype (){ rental=prompt("Type the word",""); }document.form.box2.value=rental</script><body onload="Prototype()"><form name="form"><input type=text name="box2" ></form></body></html> Link to comment Share on other sites More sharing options...
jneaod Posted March 5, 2006 Share Posted March 5, 2006 What is it supposed to do? Link to comment Share on other sites More sharing options...
Webworldx Posted March 5, 2006 Share Posted March 5, 2006 <html><head><script type="text/javascript">function PrototypeFunction(){rental=prompt("Type the word","");document.getElementById('formname').box2.value=rental}</script><body onload="PrototypeFunction()"><form id="formname"><input type=text name="box2" ></form></body></html> Link to comment Share on other sites More sharing options...
Guest prethesh Posted March 7, 2006 Share Posted March 7, 2006 i got a problem here..but it dint work...i wonder why? any1 can help me? thks man<html><head><script type="text/javascript">function Prototype (){ rental=prompt("Type the word",""); }document.form.box2.value=rental</script><body onload="Prototype()"><form name="form"><input type=text name="box2" ></form></body></html><{POST_SNAPBACK}> put the Declaration "document.form.box2.value=rental" inside the javascript function Prototype() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now