Results 1 to 2 of 2
Thread: refresh page
Feb 21, 2005, 10:49 #1
Hello good pple of the forum i ve 10 radio buttons in a form the first five have the same group name while the other does too.At the end of the form is a button that will give the score or point based on the option that the user would 've clicked, when the user clicks this button, an alert box appears that will that tell the user he/her score, after clicking on the "OK" button on the alert i want a situation in which the page would be refresh and the previous clicked options would automatically be erased.
Feb 21, 2005, 10:57 #2
- Join Date
- Jun 2004
- Mumbai, India
- 0 Post(s)
- 0 Thread(s)
If you want to achieve it from java script then i'll not suggest you to do that. please use server side scripting like php, jsp, asp etc.
But if at all you want to use java script then i can tell you the points about code. i'll try to put it after waords.
1) for the first time show all the radio buttons.
2) onclick of that display the score
3) here comes tricky part. get the address of the current page using window.location.search then you need to append the value of the current radio button at the end and then say location.href (i.e. redirect to same page with the value of the current radio button)
4) now when u come in the page check if the query string has any parameter then hide that particular radio button. (actually this will be the step at the first).
5) for the step 3 actually u will be appending the value of the current radio button clicked. and keep on forwardiong.
this way u can do it but this is real pain in *** think about it.Vikrant Korde
S Y S T I M E, Mhape,
Mumbai, Maharashtra, India.