is there any way to use msgbox in ASP?
Printable View
is there any way to use msgbox in ASP?
You can use msgbox in ASP. But presumably you are refering to a messagebox on the client/browser.
Use window.alert(message) instead.
Msgbox on server side script means a locked up web site unless someone is available to click the ok button...
what would i do if i want it to check a value, and if its false make a msgbox saying that to the user before redirecing to where i want to go?
Is this what you want?
Code:<SCRIPT LANGUAGE="JavaScript">
function changeIt(newDes) {
(window.alert(newDes))
}
</SCRIPT></HEAD>
<BODY>
<FORM><H3>Choose your place to spend eternity:<br>
<INPUT TYPE="radio" NAME="choices" onClick=
"changeIt('Heaven')">
Heaven<br>
<INPUT TYPE="radio" NAME="choices" onClick=
"changeIt('Hell')">
Hell<br>
</H3>
</BODY>
how do i make it only do that if there are certain conditions?
:confused:
What do you mean?
:confused:
if not logged in then
msgbox " blah "
else
do some ****
msgbox "blah"
end if
In client side script,
window.alert = MsgBox
window.alert "Bark bark.. you did something wrong.."
as opposed to
MsgBox "Bark bark.. you did something wrong.."
as for doing it conditionally, well.. it depends on what conditions and which scripting language you are using on the client side. You can use VBScript or Javascript.