Hello all
I have this problem:
I'm displaying a loggin page.
If the user entered an invalid UserName/Password I display the page
again.
When this happens I want to give the user a different message then the
one
displayed when the page was initially displayed.
I use the Response.Redirect method from the page checking the
submition.
When I do that I call the page with a parameter like this
Response.Redirect("Page.asp?FROM=1").
When I get the parameter in the page I know I need to show a different
message.
The problem is that if the page is called without the parameter, I
cannot determine that the parameter is missing.
The codse is very simple:
from_flag = Request.QueryString("FROM")
Now is the problem -
if I use if(from_flag == 'undefined') - this condition return
false.
but if I display from_flag using Response.Write(from_flag) I get
"undefined"
if I use if(typeof from_flag == "undefined") - this does not work
since the typeof return "object" in both cases when I call the page
with the parameter or without the parameter.
also I tried to comnpare with null does not work.
By the way if I use VBScript as the script lang - it works fine I
just need to compare the from_flag with vbNullString and all is well.
How can I do it in JavaScript????