Form Submitted Incorrectly 
Author Message
 Form Submitted Incorrectly

I just upgraded from IE4.0 to IE5.0.
In my ASP page, I have server code that gets my HTML from COM objects.
Within the HTML there is a form that includes buttons(INPUT) that execute
javascript client side code and at the end of the form there is a submit
button.   But in IE5.0 everytime I click on the client-code buttons they
submit the form after doing what they need to do.  This was working fine
yesterday when I was still using IE4.0 - the good ol' days....I also, was
told to & did, set response.expires=0 at the top of each page(didn't fix
it).
My machine is both the host & client with NT4.0, IIS4.0.
I can provide more details, code samples if needed....
Any help would be greatly appreciated.
Kamal


Mon, 29 Jul 2002 03:00:00 GMT  
 Form Submitted Incorrectly
Hi

That would prove useful ( If you post the code )

--
Best Regards
   Vidar Petursson
http://www.icysoft.com


No matter where you go there you are.
-

Quote:
> I just upgraded from IE4.0 to IE5.0.
> In my ASP page, I have server code that gets my HTML from COM objects.
> Within the HTML there is a form that includes buttons(INPUT) that execute
> javascript client side code and at the end of the form there is a submit
> button.   But in IE5.0 everytime I click on the client-code buttons they
> submit the form after doing what they need to do.  This was working fine
> yesterday when I was still using IE4.0 - the good ol' days....I also, was
> told to & did, set response.expires=0 at the top of each page(didn't fix
> it).
> My machine is both the host & client with NT4.0, IIS4.0.
> I can provide more details, code samples if needed....
> Any help would be greatly appreciated.
> Kamal



Mon, 29 Jul 2002 03:00:00 GMT  
 Form Submitted Incorrectly
This is embarassing, but I didn't realise that "<INPUT type=image>"
automatically submits the form when the onclick event fires.
Sorry to have wasted your time.
Kamal



Quote:
> Hi

> That would prove useful ( If you post the code )

> --
> Best Regards
>    Vidar Petursson
> http://www.icysoft.com


> No matter where you go there you are.
> -


> > I just upgraded from IE4.0 to IE5.0.
> > In my ASP page, I have server code that gets my HTML from COM objects.
> > Within the HTML there is a form that includes buttons(INPUT) that
execute
> > javascript client side code and at the end of the form there is a
submit
> > button.   But in IE5.0 everytime I click on the client-code buttons
they
> > submit the form after doing what they need to do.  This was working
fine
> > yesterday when I was still using IE4.0 - the good ol' days....I also,
was
> > told to & did, set response.expires=0 at the top of each page(didn't
fix
> > it).
> > My machine is both the host & client with NT4.0, IIS4.0.
> > I can provide more details, code samples if needed....
> > Any help would be greatly appreciated.
> > Kamal



Mon, 29 Jul 2002 03:00:00 GMT  
 Form Submitted Incorrectly
Hi

Should not do that unless you script  it :)

--
Best Regards
   Vidar Petursson -  MVP
http://www.icysoft.com


No matter where you go there you are.
-

Quote:
> This is embarassing, but I didn't realise that "<INPUT type=image>"
> automatically submits the form when the onclick event fires.
> Sorry to have wasted your time.
> Kamal



> > Hi

> > That would prove useful ( If you post the code )

> > --
> > Best Regards
> >    Vidar Petursson
> > http://www.icysoft.com


> > No matter where you go there you are.
> > -


> > > I just upgraded from IE4.0 to IE5.0.
> > > In my ASP page, I have server code that gets my HTML from COM objects.
> > > Within the HTML there is a form that includes buttons(INPUT) that
> execute
> > > javascript client side code and at the end of the form there is a
> submit
> > > button.   But in IE5.0 everytime I click on the client-code buttons
> they
> > > submit the form after doing what they need to do.  This was working
> fine
> > > yesterday when I was still using IE4.0 - the good ol' days....I also,
> was
> > > told to & did, set response.expires=0 at the top of each page(didn't
> fix
> > > it).
> > > My machine is both the host & client with NT4.0, IIS4.0.
> > > I can provide more details, code samples if needed....
> > > Any help would be greatly appreciated.
> > > Kamal



Mon, 29 Jul 2002 03:00:00 GMT  
 Form Submitted Incorrectly
The MS docs state that simply clicking on the <INPUT type=image> will
immediately submit the form....and even though I have an associated Jscript
onclick event, it simply does the client side code and then submits the
form.  
Do you think that this is not the way it should work?  Is it perhaps a
difference in behaviour between 4.0 & 5.0?
Kamal



Quote:
> Hi

> Should not do that unless you script  it :)

> --
> Best Regards
>    Vidar Petursson -  MVP
> http://www.icysoft.com


> No matter where you go there you are.
> -


> > This is embarassing, but I didn't realise that "<INPUT type=image>"
> > automatically submits the form when the onclick event fires.
> > Sorry to have wasted your time.
> > Kamal



> > > Hi

> > > That would prove useful ( If you post the code )

> > > --
> > > Best Regards
> > >    Vidar Petursson
> > > http://www.icysoft.com


> > > No matter where you go there you are.
> > > -


> > > > I just upgraded from IE4.0 to IE5.0.
> > > > In my ASP page, I have server code that gets my HTML from COM
objects.
> > > > Within the HTML there is a form that includes buttons(INPUT) that
> > execute
> > > > javascript client side code and at the end of the form there is a
> > submit
> > > > button.   But in IE5.0 everytime I click on the client-code buttons
> > they
> > > > submit the form after doing what they need to do.  This was working
> > fine
> > > > yesterday when I was still using IE4.0 - the good ol' days....I
also,
> > was
> > > > told to & did, set response.expires=0 at the top of each
page(didn't
> > fix
> > > > it).
> > > > My machine is both the host & client with NT4.0, IIS4.0.
> > > > I can provide more details, code samples if needed....
> > > > Any help would be greatly appreciated.
> > > > Kamal



Mon, 29 Jul 2002 03:00:00 GMT  
 Form Submitted Incorrectly
Hi

Hmm yes that's seem to be the case, did not realize that (Never used the
thing)

Well this should work

<form onsubmit="return MyValidation(this)">
<input type="image" src="bla">
</form>

Now you just need to return false from you validation function
to cancel the submit or (surprise) true to submit it.

Or you could use a href
<a href="JavaScript:MyValidation()"><img src="bla"></a>

--
Best Regards
   Vidar Petursson -  MVP
http://www.icysoft.com


No matter where you go there you are.
-

Quote:
> The MS docs state that simply clicking on the <INPUT type=image> will
> immediately submit the form....and even though I have an associated
Jscript
> onclick event, it simply does the client side code and then submits the
> form.
> Do you think that this is not the way it should work?  Is it perhaps a
> difference in behaviour between 4.0 & 5.0?
> Kamal



> > Hi

> > Should not do that unless you script  it :)

> > --
> > Best Regards
> >    Vidar Petursson -  MVP
> > http://www.icysoft.com


> > No matter where you go there you are.
> > -


> > > This is embarassing, but I didn't realise that "<INPUT type=image>"
> > > automatically submits the form when the onclick event fires.
> > > Sorry to have wasted your time.
> > > Kamal



> > > > Hi

> > > > That would prove useful ( If you post the code )

> > > > --
> > > > Best Regards
> > > >    Vidar Petursson
> > > > http://www.icysoft.com


> > > > No matter where you go there you are.
> > > > -


> > > > > I just upgraded from IE4.0 to IE5.0.
> > > > > In my ASP page, I have server code that gets my HTML from COM
> objects.
> > > > > Within the HTML there is a form that includes buttons(INPUT) that
> > > execute
> > > > > javascript client side code and at the end of the form there is a
> > > submit
> > > > > button.   But in IE5.0 everytime I click on the client-code
buttons
> > > they
> > > > > submit the form after doing what they need to do.  This was
working
> > > fine
> > > > > yesterday when I was still using IE4.0 - the good ol' days....I
> also,
> > > was
> > > > > told to & did, set response.expires=0 at the top of each
> page(didn't
> > > fix
> > > > > it).
> > > > > My machine is both the host & client with NT4.0, IIS4.0.
> > > > > I can provide more details, code samples if needed....
> > > > > Any help would be greatly appreciated.
> > > > > Kamal



Mon, 29 Jul 2002 03:00:00 GMT  
 Form Submitted Incorrectly
Thanks for the suggestion.
I was trying to think why I chose an INPUT over a straightforward IMG and
the only reason I can think of is that I could "tab" onto the INPUT image
whereas the IMG doesn't allow that...
Kamal



Quote:
> Hi

> Hmm yes that's seem to be the case, did not realize that (Never used the
> thing)

> Well this should work

> <form onsubmit="return MyValidation(this)">
> <input type="image" src="bla">
> </form>

> Now you just need to return false from you validation function
> to cancel the submit or (surprise) true to submit it.

> Or you could use a href
> <a href="JavaScript:MyValidation()"><img src="bla"></a>

> --
> Best Regards
>    Vidar Petursson -  MVP
> http://www.icysoft.com


> No matter where you go there you are.
> -


> > The MS docs state that simply clicking on the <INPUT type=image> will
> > immediately submit the form....and even though I have an associated
> Jscript
> > onclick event, it simply does the client side code and then submits the
> > form.
> > Do you think that this is not the way it should work?  Is it perhaps a
> > difference in behaviour between 4.0 & 5.0?
> > Kamal



> > > Hi

> > > Should not do that unless you script  it :)

> > > --
> > > Best Regards
> > >    Vidar Petursson -  MVP
> > > http://www.icysoft.com


> > > No matter where you go there you are.
> > > -


> > > > This is embarassing, but I didn't realise that "<INPUT type=image>"
> > > > automatically submits the form when the onclick event fires.
> > > > Sorry to have wasted your time.
> > > > Kamal



> > > > > Hi

> > > > > That would prove useful ( If you post the code )

> > > > > --
> > > > > Best Regards
> > > > >    Vidar Petursson
> > > > > http://www.icysoft.com


> > > > > No matter where you go there you are.
> > > > > -


> > > > > > I just upgraded from IE4.0 to IE5.0.
> > > > > > In my ASP page, I have server code that gets my HTML from COM
> > objects.
> > > > > > Within the HTML there is a form that includes buttons(INPUT)
that
> > > > execute
> > > > > > javascript client side code and at the end of the form there is
a
> > > > submit
> > > > > > button.   But in IE5.0 everytime I click on the client-code
> buttons
> > > > they
> > > > > > submit the form after doing what they need to do.  This was
> working
> > > > fine
> > > > > > yesterday when I was still using IE4.0 - the good ol' days....I
> > also,
> > > > was
> > > > > > told to & did, set response.expires=0 at the top of each
> > page(didn't
> > > > fix
> > > > > > it).
> > > > > > My machine is both the host & client with NT4.0, IIS4.0.
> > > > > > I can provide more details, code samples if needed....
> > > > > > Any help would be greatly appreciated.
> > > > > > Kamal



Tue, 30 Jul 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. SUBMIT form with 3 different submit buttons - error

2. form submits hrefs images and submit buttons

3. Submitting Form WITHOUT Submit Button

4. Form wont submit using javascript:submit()

5. form submit using different submit buttons

6. Submitting form without submit button...

7. What fires the submit action of a form without a submit button

8. Submitting Form WITHOUT a Submit Button

9. SUBMIT form with 3 different submit buttons - error

10. Submitting form without submit button...

11. submitting a form from outside of the form...

12. form.submit() works in HTML but not in asp

 

 
Powered by phpBB® Forum Software