Hello List.
I'm playing around with jQuery and came across a good demo at:

http://www.thatagency.com/design-studio-blog/2009/01/refreshing-an-element-at-a-set-time-interval-using-jquery-and-a-sprinkle-of-ajax/

Basically, the code reloads an external page every n seconds.
What I need to do reload a page that contains form elements on it...
specifically radio buttons.

So this page will have a list of items on it, with a radio button next to
each.  I want the user to be able to select the radio of an item and have
that selected radio button hold its selected status during a page refresh.

The external page is labeled "refresh.htm" and simply contains a radio
button element.

My main page code is listed below.  I am new to jQuery and I am not at all
familiar with Javascript, but is there a way to store that value of the
radio button so when the page reloads, I can set whatever control values
that are on it back to the original values?

Thanks,
--Rick

<script language="javascript" src="jquery-1.2.6.min.js"></script>
<script language="javascript" src="jquery.timers-1.0.0.js"></script>

<script type="text/javascript">

$(document).ready(function(){
   var j = jQuery.noConflict();
        j(document).ready(function()
        {
                j(".refreshMe").everyTime(5000,function(i){
                        j.ajax({
                          url: "refresh.htm",
                          cache: false,
                          success: function(html){
                                j(".refreshMe").html(html);
                          }
                        })
                })
        });
   j('.refreshMe').css({color:"red"});
});


-- 
View this message in context: 
http://www.nabble.com/jQuery-Page-Reload-but-Keep-Control-Values-tp22832743s27240p22832743.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to