PDA

View Full Version : Executing javascripts in Code-behind


kevinkan
10-08-2002, 03:25 AM
Hi all,

I'm just wondering how I can execute my preloaded javascripts functions in the code-behind codes.

Please advise.

Thanks,
Kevin
-----------------

glenngv
10-08-2002, 10:02 AM
could you explain more details as possible?

kevinkan
10-08-2002, 03:36 PM
Hi Glenn,

I've got this javascript loaded as an external .js file in the <header> tags:

function valprofile()
{
if (valblank(document.regform.lname,"Last Name")){
return false;
}
else if (valblank(document.regform.gname,"Given Name")){
return false;
}
else if (valblank(document.regform.add1,"Address")){
return false;
}
else if (valblank(document.regform.email,"Email")){
return false;
}
else if (!valemail(document.regform.email,"Email")){
return false;
}
else if (valblank(document.regform.contact,"Contact No.")){
return false;
}
else if (!valnumeric(document.regform.contact,"Contact No.")){
return false;
}
else if (!valnumeric(document.regform.icqno,"ICQ No.")){
return false;
}
else
return true;
}
-------------
As the input textboxes are inside a datalist, the javascript couldn't detect the textboxes values...
Hence I would like to find the ClientID of each textbox and pass it into the javascript function, thorugh the code-behind.

Please advise.


Thanks,
Kevin
------------

glenngv
10-09-2002, 02:30 AM
can you post the html code?