<input type="image"> --->> x & y

He has: 1,016 posts

Joined: May 2002

Hi,

On a form I've used image instead of the default submit button and I was wondering if there is a way to remove the x=XX&y=YY from the URI when submitting the form?

I.e. when I submit a form now I get http://www.domain.com.com/?country=9&x=27&y=12

He has: 296 posts

Joined: May 2002

......

He has: 1,016 posts

Joined: May 2002

I think you've misunderstood me, when you replace the submit button with image it will add teh xy automatically. I don't need them and I don't want them there.

He has: 296 posts

Joined: May 2002

Ya, I realized that after I posted Smiling And my internet froze.

if you are using PHP you could use the eregi function to check the url and if it contains them then redirect to get rid of them. I think that would work, not sure. I'm using it, but not with forms, so no variables need to be passed.

[James Logsdon]

He has: 1,016 posts

Joined: May 2002

Yes, I know I can do that but that's not the solution I'm looking for. I was wondering if there was a HTML tag/property that could do that. I've solved it with JavaScript for now.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

What method are you using for the form?

method="post" shouldn't show any variables that are passed?

dk01's picture

He has: 516 posts

Joined: Mar 2002

Yeah method="post" seems like the only logical way to do it right now. And any "get" variables for the page can be put in the action if you want. ie. action="?page=2"
but I bet you already know that.
-dk

He has: 1,016 posts

Joined: May 2002

Yes, I knew that too Laughing out loud but POST can't do what I wan't either for many reasons. I decided to go with JavaScript instead as it gives me exactly what I want which I was hoping I could have done with simple HTML, but this works too.

Thank you for your replies though.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.