tom
|
Posted: 12/31/2003, 5:32 AM |
|
how to use javascript in JSP page?..
i am having a TextBox and in onChange event,i have to call a javascript function.
i hav provided the code .but it's not working.
how to resolve?.
how can i validate email in JSP..i gone through reguler routine..but it's not working.
i use CCS
thanks
|
|
|
Edd
Posts: 547
|
Posted: 01/01/2004, 2:24 PM |
|
Can you show your javacript AND your how you have coded the change event otherwise we cannnot help you.
The first this I would check is that the onChange event (which IS CASE SENSITIVE) is coded correctly. ie
onChange="jumpTo(this);"
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
|
|
tom
|
Posted: 01/03/2004, 4:01 AM |
|
function verifyPassword(P,VP){
var P1 = P //creates string object for string values passed
var VP1 = VP
if (P1.length < 6){
return "ahahja";
}
else if (P1.length > 20){
return "aoioaio.";
}
else if (VP1.length != 0) {
if (P1.length == VP1.length){
for (var i=0; i < P1.length ; i++){
if (P1.charAt(i) != VP1.charAt(i)){
return "aa.";
}
}
}
else{
return "aa.";
}
}
else if (VP1.length ==0){
return "aa.";
}
return "OK";
}
this is the code and i called corectly..
how can i refernce HTML objects within javascript inside CCS??( i hav deleted some return messaged s for reducing the size(1000ch limit)
|
|
|
Anton
|
Posted: 02/07/2004, 9:00 AM |
|
Put the id value of the CCS control in the Properties/Format + Id tab of the control. Then you have exposed the CCS control ready for JavaScript.
Seems to work for me anyway.
Hava a look at the pop-up examples which use this method to pass back values between different HTML pages.
Rgds
Anton
|
|
|