submitting forms over get


M

Merlin

Hi there,

I am wondering how it is possible to submit forms over get and to get clean urls
like on a9. For example:
http://a9.com/test

When I implement a form search I always get URLS like this:
/index.php?q=test&submit.x=33&submit.y=8

Any ideas how to prevent this?

Thanx for any hint.

Merlin
 
Ad

Advertisements

T

Toby Inkster

Merlin said:
When I implement a form search I always get URLS like this:
/index.php?q=test&submit.x=33&submit.y=8

Any ideas how to prevent this?

Have "index.php" redirect to a cleaner URL.
 
Ad

Advertisements

M

Mitja Trampus

Merlin said:
Hi there,

I am wondering how it is possible to submit forms over get and to get
clean urls like on a9. For example:
http://a9.com/test

When I implement a form search I always get URLS like this:
/index.php?q=test&submit.x=33&submit.y=8

Any ideas how to prevent this?

Have a look at their code, they use a piece of JS:
<form onsubmit="...">

What JS does is it constructs an URL out of "a9.com" and the
search box's text, then redirects the browser there. So
they're not using GET or POST, it's a roll-your-own way.

Of course, if JS fails, the "classic" url constructed via
GET (e.g. a9.com/?searchBox=test) must still be supported by
their server-side script.

Don't see what you gain by it and why you'd want to go to
the extra trouble of implementing it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top