470,602 Members | 1,728 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,602 developers. It's quick & easy.

How do reload the page using jQuery?

Hello All,

1. First i select the class name in combo box -> using jQuery reload the page.
2. after reload the page, Student name was display in random. so i add two radio button.
1. Ascending order
2. Descending order

if i click the Ascending order radio button, the page will reload and display the student name in ascending order and combo box display the previous selected class name. how?

pls give some idea.
<!-- radio button jQuery -->
Expand|Select|Wrap|Line Numbers
  1. $('#list').click(function(){
  2. val=$'#list click').text();
  3. ----
  4. ---- give come idea.
  5. });
<!-- combo box jquery (working well) -->
Expand|Select|Wrap|Line Numbers
  1.       $('#classList').change(function(){
  3.     val=$('#classList option:selected').text();
  5.         if(val != "-Select Class-"){
  7.             htm = '<input type="hidden" name ="rmksSelectedClass"  value="'+val+'">';
  9.             $('#frmRemarks').append(htm);
  11.             $('#frmRemarks').submit();
  13.         }
  15.     });
Apr 20 '11 #1
1 3296
16,027 Expert Mod 8TB
2 quick points:

1. Why reload the page when you could use Ajax to easily display the student names?
2. Why not have it ordered in the first query with the current selected radio button setting?

The probable reason for your problem is that you're adding hidden fields with the same name, so it's going to look at the first one. If you were going to go down this route, you should be setting the hidden field, not appending it to the form.
May 12 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Glenn | last post: by
1 post views Thread by Eric Caron | last post: by
8 posts views Thread by Ed Jay | last post: by
2 posts views Thread by darrel | last post: by
3 posts views Thread by sungung | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.