WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode form submission not working (2 posts)

  1. kevcpu
    Member
    Posted 2 years ago #

    I created shortcode to display a list of items stored in a custom table. Also, I have a form on the page to keep track of all of the pagination-related items in a series of hidden fields. Here is my problem, the list displays well but when I click on the next link, it triggers the javascript, but it doesn't seem to re-post the form. I am calling document.getElementById("frmName").submit().

    I want the shortcode to post to itself but I know it is not working because I never see the value change for the hidden fields. I even tried to change the method from post to get and I did not see the querystring value from the form in the url.

    Could wordpress by blocking the form from re-posting?

    Here is my javascript code:

    function goToPage(page)
    			{
    				alert('about to start');
    				var frm = document.getElementById('frmPagination');
    				var curPage = document.getElementById('cur_page');
    
    				curPage.value = page;
    				alert('curPage = ' + page);
    				alert(curPage.value);
    				alert('about to submit form....');
    				frm.submit();
    				alert('after submit');
    				//return true;
    			}
  2. kevcpu
    Member
    Posted 2 years ago #

    It looks as if the page is refreshed, however.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.