Forums
This topic is locked
Evaluation of seesion variable
Posted 05 Sep 2002 09:35:05
1
has voted
05 Sep 2002 09:35:05 Erwin Hendriks posted:
I'm trying to find the correct syntax for the following: "if my session variable is null then"if (session.abc......?
Nakhba
Replies
Replied 05 Sep 2002 10:05:37
05 Sep 2002 10:05:37 Vince Baker replied:
Not sure about the call session (as I program in VB not JS) but I would think the logic is like below:
var strName=session("your_session_variable"
if ((strName.value==null)||(strName.value=="")
{
alert("MESSAGE TEXT HERE" You can have your THEN action here in place of the alert.
strName.focus()
return false
}
Regards
Vince
Response.write("The best line of code you can ever use"
VBScript | ASP | HTML | SQL | Oracle | Hosting
var strName=session("your_session_variable"
if ((strName.value==null)||(strName.value=="")
{
alert("MESSAGE TEXT HERE" You can have your THEN action here in place of the alert.
strName.focus()
return false
}
Regards
Vince
Response.write("The best line of code you can ever use"
VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 05 Sep 2002 10:23:01
05 Sep 2002 10:23:01 Erwin Hendriks replied:
Thanx mate