Jump to content

Submit Form From DIV Tag


Zergman

Recommended Posts

Wasn't sure where to post this but this is an issue with CodeIgniter Pagination.

 

I have a big search form.  I enter search criteria and it works and returns my results along with working Pagination.  Problem is when I click on a pagination link, the page reloads but it submits an open query with no criteria so it searches all records and the pagination breaks.

 

Solution i'm trying to impliment is to have a hidden form that stores the search criteria so when a pagination link is clicked, it submits the hidden form.

 

Problem i'm having is making the pagination links submit the hidden form.  I'm trying to wrap it with a div tag and add an onclick to it but it isn't working.

 

How would I do this?

Link to comment
Share on other sites

Well got the div submitting

<div onclick="document.form_hidden.submit();"><?php echo $this->pagination->create_links(); ?></div>

 

but it's not submitting the form when the pagination links are clicked.  If I add something else in the div it works when TestTestTestTest is clicked.

<div onclick="document.form_hidden.submit();">TestTestTestTest<?php echo $this->pagination->create_links(); ?></div>

 

Arg....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.