473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Javascript function form.submit() not working when hooking into IE6 with mshtml.HTMLDocumentEvents2

I have created a small recorder application in dotnet that records my
actions in Internet Explorer into a replayable simulation.

For this I have registered the mshtml.DocumentEvents2 class. It all
works neat and dandy, except when I encounter a form on a web page
that is not directly submitted with a regular html-Submit button, but
rather through a validating javascript function, like this:

function SubmitForm(formObject){
//Some validating code here...
formObject.submit();
}

With the html part looking like this:
<form name="MyForm" id="s_form_1" action="clicktest2.html"
method="post">
<a onclick="SubmitForm(document.MyForm); return false;"
href="javascript:void(0)" >Submit</a>
</form>

What happens in IE6 is that any command in the SubmitForm function is
executed on the browser, except for the formObject.submit() call. This
is simply ignored (seemingly). So no error messages anywhere and I'm
not transferred to the next page.

When running this recorder app on a machine with IE7, this method is
executed properly.

Any help would be highly appreciated!
Michel Reij

Mar 5 '07 #1
0 1303

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
6
by: bonehead | last post by:
Greetings, I'm working on an e-mail form (btw many thanks to Philip Ronan for the very cool email address format tester function, best I've seen so far). I've been trying, with limited...
9
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work...
4
by: Mark Miller | last post by:
I've been trying to execute a javascript function just before submit on a form that contains an <input type="file"> input field and it isn't working. The reason I want to do this is the end users...
5
by: miktro | last post by:
I have an VB.Net desktop application where I am hosting a WebBrowser. I need to interact with the events in the browser. I encountered the normal problem of, after adding events the normal click...
7
by: amerar | last post by:
Hi All, I am really green at Javascript. Someone gave me some code to play with and I'm trying to understand it: <INPUT TYPE=text NAME=subject SIZE=60 MAXLENGTH=60><BR><BR> <input...
3
by: markus.rietzler | last post by:
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems. my script is based on ajax-uploader, which can be...
0
by: Michel Reij | last post by:
I have created a small recorder application in dotnet that records my actions in Internet Explorer into a replayable simulation. For this I have registered the mshtml.DocumentEvents2 class. It...
31
by: ajos | last post by:
hi frnds, i have a form,which has 2 input text boxes, the values are entering the text boxes,when i leave the 2 text boxes blank and hit submit a java script gives the message that the 2 fields are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.