form wont submit

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

form wont submit

Post by psychotomus »

User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

action=""

You need to specify the form's destination (even just "?" is OK if you want to point to the same page)
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

Post by psychotomus »

Kieran Huggins wrote:action=""

You need to specify the form's destination (even just "?" is OK if you want to point to the same page)
you do not. action="" points to itself.
but on a side note. i did try changing action="test.php" and it still did not work.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

wow - I didn't know that!

it's your: <input name="submit" type="button" value="Sort">

Should be: <input name="submit" type="submit" value="Sort">
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

I always thought it was action="#" for the same page...

Fix these problems and we'll see if the form still doesn't work...
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

:lol: That's not nice. Ignorance is bliss. :)

Besides, Keiran gave a valid solution.

Now for the million of ampersands and badly formatted table HTML.

And the only person I've heard say action="#" was feyd. Most servers support action="".
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

superdezign wrote: Most servers support action="".
This is a client-side issue, it is the client that submits the form and must decide where to. (So I'd guess # is for compatibility with older browsers, although I've been omitting the action attribute for years and it's been working fine on the major three browsers.)
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Mordred wrote:...I've been omitting the action attribute for years and it's been working fine on the major three browsers...
8O

You learn something new every day!
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Mordred wrote:although I've been omitting the action attribute for years and it's been working fine on the major three browsers.
And backwards compatibility becomes less and less of an issue as time passes.

I thought the action was similar to links, as the server can interpret them as it's defined to...?
Post Reply