Jul 20, 2008

Radio Button

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

Radio Button

kvarnerexpress
I am trying to maintain the radio button selection on a Submit, but the form refreshes to its default selection.

BTW, After a Submit is clicked, the radio form stays visible on the top of the screen while the query results are displayed on the bottom half of the screen (we're using an internal, embedded link). That's when the default selection comes into place.

Any help would be appreciated.
Please respond Kvarnerexpress.

Reply

whyme
I am not sure of what you mean, can you clarify by showing some code or a screenshot?

thanks,

whyme

Reply

HmmZ
Have you assigned values and names to the radio button?
and what other language are you using to fetch the radio button selection?

i am focussed on php so this'll be in php..

CODE

//Query page:
<?php
<form action=\"your_result_page.php\" method=\"post\">
<input type=\"radio\" name=\"radio_name\" value=\"1\">Option 1
<input type=\"radio\" name=\"radio_name\" value=\"2\">Option 2
<input type=\"submit\" value=\"submit\">
</form>

//Result Page:
print "You have chosen ".$_POST['radio_name'].".";
print "<br>";
print "Is this correct?";

//add more..

remember to use the same "radio_name"

is this what you were looking for?

 

 

 


Reply

DoR
If just go back in history to the page containing the radio buttons, the value should be preserved.
If you go there by a link, you would need to use php or cookies or something else to show the page how like the visitor left it.

Maybe if you can be more precisely...

Reply

iGuest
raise check event of radiobutton by passing it from other page using querystring
Radio Button

I have two pages on one page there is button and on second there is button and radiobutton I want to check that radiobutton when button on first page is click and that value of check event is pass through querystring with second psge name



-question by rahul

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. php radio button - 2.26 hr back. (1)
  2. use of radio button value in another page using php - 3.05 hr back. (1)
Similar Topics

Keywords : radio, button

  1. Multiple Drop Down Menus W/ Submit Button
    (6)
  2. Dynamic Button Size
    (1)
    In my application I have a custom tag that generates all the action buttons that the page needs. My
    problem is that in IE the space between the left side of the button and the image inside the button
    are not consistant. Some buttons have 3 or 4 more pixels of padding on the left side then others.
    This causes my buttons to be too large and hence the area the buttons are generated in stretches too
    far. I could wrap the buttons around to another line or add scroll bars.. but if it will fit in FF I
    think it should fit in IE as well. So my question is can I set the padding....
  3. Refresh Page After Back Button Hit
    (10)
    Hi. I have a page that is dynamically build through DOM manipulation. So, when I browse outside the
    page, and then click back, those dynamically created DOM objects are gone. Since I am also using JSP
    / Servlet technology, I can rebuild this page easily, which I have done. Here is my dilemma. If
    the user leaves the dynamic page, then clicks back on their browser, I need the page they are going
    back to to refresh. I can't figure out how to do this. I've tried using the META tag, but it
    won't do it. Help would be appreciated. Thanks. ....
  4. Submit Button
    (3)
    I have a form on my page. I do not have a submit button, but when I hit enter on my text field, it
    is like I am clicking on a submit button. My page refreshes to the original state, and my values are
    reset. I found this out because I made a submit button and tried it. Is there a way to get around
    this? I am trying to use a javascript that captures the key strokes. That works, but then the submit
    like event still fires after my code runs, nullifying any changes my code has made. html4strict
    Code: CODE 1.      <form name="FormPictureInfo">   2.....
  5. Substitute Form Button For An Image
    homemade images in forms buttons (3)
    Hi, I have the next formular : CODE  <form method='post'
    action='index.php?mode=2&id=1'>                <input type='hidden'
    name='name' value='Canon Digital Ixus 700'/>                <input
    type='hidden' name='id' value='1'/>                <input
    type='hidden' name='qty' value='1'>                <input
    type='hidden' name='cost' value='40'>                <input
    type='submit' value='Add to ca....
  6. Button To Print Current Web Page
    (13)
    Hi, Does anyone know how to create a button that will printo out the current page. What I want to
    do is have the user fill out a form (containing name, address, zip, etc). They will then click on a
    "print" button and it will print out the form data. Any ideas? Thanks.....
  7. Enter Keypress Submits Wrong Button
    (2)
    Ive got a form, with a submit button on the left and a submit button on the right. By default on the
    enter keypress, the form submits the left submit button, but i want it to submit the right button.
    How would i accomplish this? kvarnerexpress....

    1. Looking for radio, button

Searching Video's for radio, button
advertisement



Radio Button



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE