onsubmit makes form.method lowercase

A

admataz

Hi all
does anyone know why this happens?

I have a form that I'm processing using httpRequest, so I'm passing the
form element to the script to get the data, action and methods etc.

Now strictly, according to http1.1 the form method is case sensitive
and should be uppercase
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html)

but when I grab the form using onsubmit(this) javascript forces the
method value to lowercase every time.

example:
<form action="process.php" method="POST" name="AddPerson"
id="AddPerson" onSubmit="alert(this.method); return false;">

will alert 'post' and not 'POST' on IE and on Firefox (Win XP)

My connection script is expecting an upper case POST so this
potentially breaks things - I can work around it using
this.method.toUpperCase(), but I was wondering if anyone knows why
javascript breaks this. Is it by design?

thanks in advance.

-ad
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top