Zen Cart Logo
Forums / Basic Configuration / odd fields being added to URL after form submit

odd fields being added to URL after form submit

Locked

Views: 3,308

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
6 Jan 2010, 4:17 PM
#1
buckit avatar

buckit

New Zenner

Join Date:
Nov 2009
Posts:
45
Plugin Contributions:
0

odd fields being added to URL after form submit

So I added the following code to whos_online.php:

zen_draw_form('refreshing', FILENAME_WHOS_ONLINE, '', 'get') . 
  'Refresh every' .
  zen_draw_hidden_field('info', $_GET['info']) .
  zen_draw_input_field('refresh','','size="1"') .
  ' seconds. ' . zen_image_submit('button_go.gif', IMAGE_GO) . '</form><br>' .

every time you press go (submit) it works exactly as it should... but it adds &x=0&y=0 to the end of the URL. so my URL looks like:

whos_online.php?info=frtsopl4sjavriultfhi57su57&refresh=20&x=0&y=0

where is the &x=0&y=0 coming from? it doesnt seem to bother the site, but its bothering my brain! LOL

6 Jan 2010, 5:03 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: odd fields being added to URL after form submit

x & y are added because you're doing an "image submit". It's a PHP thing, not a Zen Cart thing. The x and y are the coordinates where the mouse clicked on the image in order to trigger the submit. They're coming in as 0 because the mouse isn't being used due to your javascript automation.

6 Jan 2010, 7:13 PM
#3
buckit avatar

buckit

New Zenner

Join Date:
Nov 2009
Posts:
45
Plugin Contributions:
0

Re: odd fields being added to URL after form submit

if thats the case then why doesn't that happen on ALL zencart forms? they all use image submit.

6 Jan 2010, 7:17 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: odd fields being added to URL after form submit

It does, but Zen Cart ignores it.

Is there a particular problem that it's causing for you?

6 Jan 2010, 7:32 PM
#5
buckit avatar

buckit

New Zenner

Join Date:
Nov 2009
Posts:
45
Plugin Contributions:
0

Re: odd fields being added to URL after form submit

no... its just annoying and doesnt make much sense to me... its on a zen cart page using zen cart form functions... so why does it ignore it everywhere else but not here? am I missing something in the above code?