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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop up question, sends you to different page

Status
Not open for further replies.

andycape

Programmer
Aug 22, 2003
177
ZA
How do i create a popup using javascript from an ASP page that answers a question and if i click yes the webpage will change to one page, if i click no it will change to a different one.

thanx.
 
I don't fully understand the part about a question, but maybe you can recycle something from this..


<a href=&quot;javascript:win('one.html')&quot;>one</a> or <a href=&quot;javascript:win('two.html')&quot;>two</a>?

<script>
function win(url){win=window.open(url,&quot;&quot;,&quot;&quot;);}
</script>

----------
I'm willing to trade custom scripts for... [see profile]
 
not quite what i had in mind ;-)

this kind of thing (but this code is giving me the option of ok & cancel instead of yes & No) :

<script>
function a()
{

if (confirm('Do you not want to add linear meters?'))
document.location.href=&quot;CreatePieces.asp&quot;
else
document.location.href=&quot;CreateActions.asp&quot;

return false;
}
</script>
<body onload=&quot;a()&quot;>
</body>
</script>
 
andy: there was a post in the last 24 hours demonstrating the use of &quot;javascript:agree(...&quot;

Which has the Yes/No option and redirect. I tried to find it but couldn't, perhaps you can, I think it is what you are looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top