Quote:
> I'm using ASP and am fairly new to it, so
> apologies if this is a dumb question! What I want
> to do is from within my ASP code, show a
> JavaScript popup window displaying a login
> failiure message.
I'm new to asp as well, but if you set your asp language to javascript,
you should be able to declare your function _inside_ your asp tags, I
assume that would work.
Other then that, you could use VBScript as the asp language and call
msgbox("Text in Message Box")
(and just as an aside, you might want to check and see if either of the
password or email are = to "". No sense even checking it if one or the
other is blank. (unless you allow "" as a password))
--
Chris Maguire
Co-op student, Power Measurement Ltd.
Graduating from Comp Tech in December!
Quote:
> I'm using ASP and am fairly new to it, so
> apologies if this is a dumb question! What I want
> to do is from within my ASP code, show a
> JavaScript popup window displaying a login
> failiure message.
> <%
> ...
> ...
> If Request("Email") = "" And Request("PWord")
> = "" Then
> JavaScript:ErrorWin("Please enter your email
> address and password!")
> ...
> ...
> %>
> <SCRIPT Language="JavaScript">
> function ErrorWin(MessageText)
> {
> InfoWin = window.open
> ("blank.html", "InfoWindow", "menubar=no,width=240
> ,height=120")
> InfoWin.document.write
> ("<html><head><title>Error!</title></head>")
> InfoWin.document.write(MessageText)
> InfoWin.document.write("<A
> href='javascript:window.close()'>Close</A>")
> }
> </SCRIPT>
> Obviously, the JavaScript:ErrorWin within the ASP
> doesn't call the function, it's just to
> demonstrate what I want to achieve. I've tried
> various ways of firing the JavaScript function
> but to know avail! Any ideas?
> Alternatively, is there a way to show a popup
> window in ASP?
> Thanks in advance!
> Paul
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.