Jump to content

Links + Code Easy Problems Can be solved by anybody that knows a bit of JS


Goril

Recommended Posts

Hi EVERYBODY !! Hope you all are having fun. :):blink: As i was browzing the site i saw this:

<html><head><script type="text/javascript">function disp_confirm(){var name=confirm("Press a button")if (name==true){document.write("You pressed the OK button!")}else{document.write("You pressed the Cancel button!")}}</script></head><body><form><input type="button" onclick="disp_confirm()" value="Display a confirm box"></form></body></html>

Or LINKI would like someone to tell me how i can put links instead of the text like :Are you sure u want to come in ?OK = makes the persone continue to laod siteCANCEL = makes them go to a certain siteTHX IF YOU CAN HELP ME :):)

Link to comment
Share on other sites

Got one more prob: this is what i got :

<html><head><script type="text/javascript">function disp_confirm(){var name=confirm("Press a button")if (name==true){location.href = "http://www.triches.forumpro.com";}else{location.href = "http://www.triches.fr";}}</script></head></html>

but i need it to unload automaticly: what do i put in the body to make this work ?ty

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...