+2  A: 

Actually, it depends on the server-side language you're going to use.

But, it's as simple as reading out the values in the POST and GET Values the Form delivers you.

i.e. PHP:

if($_POST["js_enabled"] == 0)  
{  
   doSomething(); // Redirecting   
}

But don't forget to validate all values.

good luck,
rAyt

Edit

There you go (pretty good answer though)

How are POST and GET variables handled in Python?

Henrik P. Hessel
a small problem, my admin does not allow PHP. (Please, do not remove your answer. It may be useful to others with PHP support.)
Masi
What server-side scripting options does your admin allow?
barrowc
barrowc: cwrea: zsh, python and lua.
Masi
I would recommend you python. kinda strange though that php isn't allowed :)
Henrik P. Hessel
+1  A: 

There's no need for any additional code or checking for scripting on the server side: Because of the return false in the onsubmit handler, the form won't be submitted if the handler is executed!

Returning false from event handlers supresses the default action associated with the event the same way as calling event.preventDefault() (event.returnValue = false in IE) does.

Christoph
Situation: onsubmit="window.open(this.elements['foo'].value); return false;"
Masi
If JS support, it opens a Window and return false so the server must process the code.
Masi
But it is the same with JS support. I probably misunderstood something.
Masi
@SimpleThings: if JS is enabled, the `return false` will suppress the default action, ie the form won't be submitted, ie the server-side script won't be called
Christoph
Situation: <form action="path-to-redirection-script" method="GET" target="_blank" onsubmit="window.open(this.elements['foo'].value); return false;">
Masi
If JS is disabled, I cannot see why it would do the action "path-to-redirection-script".
Masi
the only JS part is "window.open(this.elements['foo'].value);", because the redirection-script is on the server and it does not need client's JS support.
Masi
So it return false despite JS. Did I misunderstood something?
Masi