View Full Version : alerts!!!

01-14-2003, 02:55 PM
Hi ALL!!!

Does anyone know how to close / redirect a user to another page from an alert. I want to be able to click on ok and then go to another page.

Any ideas?

01-14-2003, 03:42 PM
You can do that with a confirm

if ( confirm( "Whatever message here" ) ) top.location.href = 'somepage.htm';

01-14-2003, 04:04 PM
alert answer..

would you like to be displayed with an option of yes and no in an alert?

function asktogo(web,txt)
return false

then when you want the option to come up as a link, put this in your html document(where you want to link to be):
<a href="javascript:asktogo('*','***');">**</a>

*** This is where you put the question text, before your visitor is taken to there specified destination.
** Of course put the title for the link :D
* Put the website address here so your want your visitors to be asked first before being taken there.

Not all of this might be this right, i might have to edit it a few times. lol.
NOTICE: FOR SOME REASON WHENEVER I TYPE IN JAVASCRIPT OR SOMTIMES, IT COMES OUT AS java script please do not make your scripts go wrong from this, always change it with no space in the middle :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum