-
ASP & Msgbox
I saw many of you agree on the fact of not to use msgbox.
Many reasons were given, regarding mostly IIS.
But then, how can you ask a question to the user ? :eek:
ex.:
Answer = Msgbox(Question, vbYesNo or vbQuestion, "!")
Or have I missed something important ? :confused:
Thanks :D
-
You have to use the equivalent in client side script. In javascript its "alert('Something');"
-
I know the window.alert("MSG") part;
But does this function returns something ?
Like vb constant: vbyes, vbNo, vbCancel and so on ?
-
It is illegal to use msgbox or an alert in ASP code.
sonia:rolleyes:
-
It's not illegal. You can do it and it will even work if you have server side debugging enabled in IIS. If you don't it is ignored.
That's not to say you should... cuz you shouldn't unless your debugging.
As for eL_NiNo:
Try
window.alert()
window.confirm()
window.prompt()
or just check out this MSDN article on the window object.
-
The reason why not is this; most people simply don't grasp the fact that...
ASP runs on the SERVER side. If there were Msgboxes the SERVER would recieve them, not the client. That's why it looks like plain HTML when viewed from the client's side, the ASP is a bunch of instructions interpreted by the server. The server sends HTML back to the browser, it doesnt interperet ASP.
-
Just what I thought !
Look at the thread (VBScript Easy-one) to understand why I was starting to wonder !
Thanks :D