Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Javascript alert customization
Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
HaVoC




PostPosted: Fri Nov 14, 2003 7:15 pm   Post subject: Javascript alert customization

How would I make a javascript alert, that when you press OK it goes to a page, but there's no Cancel button...?
Sponsor
Sponsor
Sponsor
sponsor
Thuged_Out_G




PostPosted: Thu Nov 20, 2003 6:43 pm   Post subject: (No subject)

couldnt you use a prompt for that?
Tendulkar




PostPosted: Tue Nov 25, 2003 10:38 pm   Post subject: Re: Javascript alert customization

HaVoC wrote:
How would I make a javascript alert, that when you press OK it goes to a page, but there's no Cancel button...?



% HERE IS YOUR CODE: I'm not sure for your answer but i hope this may satisfy you.
<body>
<SCRIPT language="JavaScript">
<!--
function go_there()
{
var where_to= confirm("Do you really want to go to this page??");
if (where_to== true)
{
window.location="http://www.compsci.ca/";
}
else
{
window.location="http://www.compsci.ca/mx";
}
}
//-->
</SCRIPT>
New Page
</body>
Tendulkar




PostPosted: Tue Nov 25, 2003 10:39 pm   Post subject: Re: Javascript alert customization

HaVoC wrote:
How would I make a javascript alert, that when you press OK it goes to a page, but there's no Cancel button...?



% HERE IS YOUR CODE: I'm not sure for your answer but i hope this may satisfy you.
<body>
<SCRIPT language="JavaScript">
<!--
function go_there()
{
var where_to= confirm("Do you really want to go to this page??");
if (where_to== true)
{
window.location="http://www.compsci.ca/";
}
else
{
window.location="http://www.compsci.ca/mx";
}
}
//-->
</SCRIPT>
<!--Put a link here -->New Page
</body>
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: