Adam wrote:
> HI!!  I'm sure you've moved on, but if anyone comes in behind me,
> here's a decent, and painless workaround - you need to nullify all
> will_paginate links, and manually change them to submit your current
> form.  Oh, and you need to create a textbox to hold the page, so
> will_page will pick it up, and page appropriately
> 
> View:
> 
> <input type="text" id="page" name="page" style="visibility:hidden;"
> value="1" />
> 
> Call   SetLinks  for onload:
> 
> function SetLinks(){
>   $$('.pagination a').each( function(s){ setClickOnA(s) } );
> }
> 
> function setClickOnA(anchor){
>   var num = anchor.href.split("=")[1];
> 
>   Element.observe(anchor, "click", function() { $('page').value = num;
> submitOnlyForm(); } )
>   anchor.href = "#"
> }
> 
> function submitOnlyForm(){
>   document.forms[0].submit();
> }


Hi Fred

Could you please throw some more light on this , how to achieve the 
checkbox persistence and will_paginate problem using this.

If you could give some step by step procedure , it will be a great help.

Thanks in advance
Neetal
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to