Regarding Javascript...
-
Hello All, I have a aspx page withing which i have two radio buttons. The user has to check any one option to move further. I have written a javascript which will check whether he has checked one option or not. my problem is it is showing the alert to check one option but it is not stopping in the same page it is redirected to the next page even though the alert messaged poped up. Have i left something ??? Thanks and Regards
Bharath.S Ron
-
Hello All, I have a aspx page withing which i have two radio buttons. The user has to check any one option to move further. I have written a javascript which will check whether he has checked one option or not. my problem is it is showing the alert to check one option but it is not stopping in the same page it is redirected to the next page even though the alert messaged poped up. Have i left something ??? Thanks and Regards
Bharath.S Ron
return true for valid condtion else return false for invalid condition from javascript function
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hello All, I have a aspx page withing which i have two radio buttons. The user has to check any one option to move further. I have written a javascript which will check whether he has checked one option or not. my problem is it is showing the alert to check one option but it is not stopping in the same page it is redirected to the next page even though the alert messaged poped up. Have i left something ??? Thanks and Regards
Bharath.S Ron
Bharath.S.Ron wrote:
Have i left something ???
We can't say without seeing your Code.
SSK.
-
return true for valid condtion else return false for invalid condition from javascript function
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
OnClientClick="return getCheckedRadio();" This is how i am calling the function is this correct???
Bharath.S Ron
Yes.
SSK.
-
Yes.
SSK.
the below is my javascript. function getCheckedRadio() { if(document.getElementById("SOISummitRegistrationCntrl1_RdbtnRegAdvPck").checked==true) { return true; } else if(document.getElementById("SOISummitRegistrationCntrl1_RdbtnRegOnly").checked==true) { return true; } else { alert("Please check the option"); return false; } }
Bharath.S Ron
-
the below is my javascript. function getCheckedRadio() { if(document.getElementById("SOISummitRegistrationCntrl1_RdbtnRegAdvPck").checked==true) { return true; } else if(document.getElementById("SOISummitRegistrationCntrl1_RdbtnRegOnly").checked==true) { return true; } else { alert("Please check the option"); return false; } }
Bharath.S Ron
remove alert then try
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Yes.
SSK.
Hey Sathish you changed your login name Why ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hey Sathish you changed your login name Why ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Sandeep Akhare wrote:
Hey Sathish you changed your login name Why ?
He was trying to hide on another name, Because his first name made lot of issues. But all CP members can identify him seeing his style of writing. That he can't change.
-
Sandeep Akhare wrote:
Hey Sathish you changed your login name Why ?
He was trying to hide on another name, Because his first name made lot of issues. But all CP members can identify him seeing his style of writing. That he can't change.
Sathish is famous member here then :):):-O:rose:
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hello All, I have a aspx page withing which i have two radio buttons. The user has to check any one option to move further. I have written a javascript which will check whether he has checked one option or not. my problem is it is showing the alert to check one option but it is not stopping in the same page it is redirected to the next page even though the alert messaged poped up. Have i left something ??? Thanks and Regards
Bharath.S Ron
Hi, One solution, to me, would be to remove the "AutoPostback" attribute on the radio buttons and provide with a Next>> button (provide validation for this) for the user to move further. There are other means, of course, but without having a glance at your code, i just can't say. Hope this helps
Carpe diem, Krg