Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.alert

Status
Not open for further replies.

newbee23

MIS
Jun 30, 2003
12
US
Can i put two window.alert() right after another. ALso, i'm trying to put in a URL in the alert window, is this possible? If so, how?
 
yea you can put two alerts right after each other. the url in the alert isnt possible, or at least i dont think so, but there are some alternatives, dont really have the time to explain them now but if you want them i could later.

Code:
//two alerts after each other
alert("hey im the first alert");
alert("im the alert right after the first alert");

"Those who dare to fail miserably can achieve greatly." - Robert F. Kennedy
 
Ok, so it can be done, but now, i'm trying to put a URL in the alert window and it's not working. Can you suggest anything? this is how i have it.

window.alert( &quot;<%=vRequesterName%>, your Tooling Request has been saved.\nYou will receive an email confirmation!\n&quot; <A HREF=&quot;the URL&quot;>click here to submit</A>);
window.close();

And it's not working
 
what you're trying to do would probably work better with a confirm box, considering you cant use URLs in alerts. here's an example:

Code:
$confirmValue = confirm (&quot;<%=vRequesterName%>, your Tooling Request has been saved.\nYou will receive an email confirmation!\n Click OK to submit&quot;);
if ($confirmValue)
	{
	// do submitting here
	// you could just redirect the script to your url
	document.location.href = &quot;TheURL&quot;;
	}


&quot;Those who dare to fail miserably can achieve greatly.&quot; - Robert F. Kennedy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top