View Full Version : Custom alert box buttons
MarvinTheRobot
03-12-2003, 04:35 PM
Will it be possable to customize the buttons in an alert box, to read "I Agree" and "I Disagree" ?
I want to make it pop up, and when I Agree is pressed, it loads the rest of the page. I saw a script like this in another thread, but I wasn't able to find it.
EDIT: I also need to know what the outputs would be.
joh6nn
03-12-2003, 04:44 PM
you can't change the buttons on a confirm dialog box. you'd have to go through the tedious process of making your own dialog box. a better idea would be to just make sure that your text is worded so that the standard "OK" and "Cancel" buttons make sense. or, you could just make a webpage for this purpose, instead of using a dialog box. that way, you could make a form, that had buttons that said whatever you want
MarvinTheRobot
03-12-2003, 04:49 PM
what about the second half, I need it to show the alert box, then if the returnvalue=6, the page loads. Is this possable, or should I just use a window.location= ?
beetle
03-12-2003, 04:57 PM
A confirm() only returns true or false.
MarvinTheRobot
03-12-2003, 05:01 PM
here is my script so far
<script language="VBScript">
returnvalue=msgbox ("Welcome to the Writing 10 website, to enter click yes.",324,"Welcome")
If returnvalue=6 then
window.location="http://www.normanhoward.org/writing/intro.htm"
else
window.location="http://www.normanhoward.org/"
End if
</script>
I want to integrate it into the target page so it loads the script, runs it, and if it returns "6" it loads the page.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.