zachary Posted April 15, 2006 Share Posted April 15, 2006 Can someone rewrite this code for me so it will pop up on load notclick the button? <html><head><script type="text/javascript">function disp_prompt(){var name=prompt("Please enter your name","")if (name!=null && name!=""){document.write("Hello " + name + "! How are you today?")}}</script></head><body><form><input type="button" onclick="disp_prompt()" value="Display a prompt box"></form></body></html> Link to comment Share on other sites More sharing options...
Webworldx Posted April 15, 2006 Share Posted April 15, 2006 http://w3schools.invisionzone.com/index.php?showtopic=3864Read your old topics.. Link to comment Share on other sites More sharing options...
zachary Posted April 15, 2006 Author Share Posted April 15, 2006 I did but I dont now how to script it Link to comment Share on other sites More sharing options...
scott100 Posted April 15, 2006 Share Posted April 15, 2006 Can someone rewrite this code for me so it will pop up on load notclick the button?<{POST_SNAPBACK}> I've aready told you in your first post.<body onload="disp_prompt()"> Link to comment Share on other sites More sharing options...
scott100 Posted April 15, 2006 Share Posted April 15, 2006 I did but I dont now how to script it<{POST_SNAPBACK}> If you don't understand something then just say, there's no need to create new topics. 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