How to exclude button value from GET method

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

How to exclude button value from GET method

Post by Sindarin »

In my submission form I use GET method to retrieve the 'page' value, this is what I only need.
However, after submitted the url looks like this,
It passes the 'paging' value too which I don't need.

This is my form

Code: Select all

<form id="form1" name="form1" method="get" action="index.php">
  <label>
  <input name='page' type='text' id='page' size='3' value='2'/> of 2
  </label>
  <label>
  <input type='submit' name='paging' id='paging' value='Go' />
  </label>
</form>
I want it to show like this,
How can I exclude the submit button 'paging' that has the 'Go' value?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: How to exclude button value from GET method

Post by onion2k »

Does it matter? Just ignore it.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: How to exclude button value from GET method

Post by kaszu »

Remove name attribute from submit button.
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Re: How to exclude button value from GET method

Post by Sindarin »

Thanks, that worked.
Post Reply