PDA

View Full Version : RecordSet Variable


Abd
10-05-2002, 05:57 PM
Hi

In javascript this is right;

var Name;

Name=document.formname.textboxname.value;

Now, if I have a variable like;
password = RS.Fields("password")

i.e select result stored in a variable. HOW will I refer to the password variable in case of validation.

Thanks

ASAAKI
10-05-2002, 07:42 PM
what db r u using?

Abd
10-07-2002, 08:51 AM
Hi
the database is MS SQL 7.0

hazel
10-07-2002, 10:31 AM
If you're using ASP you can asignt the recordset value qite easily to a js variable.

<SCRIPT>
var password=<%=RS("password")%>
</SCRIPT>

I believe there is a similar method if your using php.

r

glenngv
10-07-2002, 10:37 AM
Originally posted by hazel
If you're using ASP you can asignt the recordset value qite easily to a js variable.

<SCRIPT>
var password=<%=RS("password")%>
</SCRIPT>

I believe there is a similar method if your using php.

r

you missed the quotes:

<SCRIPT>
var password="<%=RS("password")%>";
</SCRIPT>