Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to submit a form onload using javascript is giving me trouble!!

Status
Not open for further replies.

jimtmelb1

Technical User
Sep 7, 2003
72
AU
Hi,

I have a Access 2000 database and when you click a button it opens a html file on the local machine. When this html file is loaded it submits a form.

I have inserted some of the code below. You can see onLoad it submits the form call Test.

This was working fine on most versions of IE and Windows.

In Win XP (SP2) when I open this page from my database it comes up with a message. "To help protect your security, Internet Explorer has restricted this file showing active content that could access your computer".

You then have the option to "allow blocked content" but this happens each time I open the html file. Is there a better way to do this. Can I allow this blocked content through always.

If anyone can give me any suggestions or better ways to do this, I would be very much appreciative.

Thanks
Jim

''''''
strFileContent = strFileContent & "<body bgcolor=#FFFFFF text=#000000 link=#FFFFFF alink=#FFFFFF vlink=#FFFFFF onLoad=" & Chr$(34) & "Test.submit()" & Chr$(34) & ">" & vbNewLine

strFileContent = strFileContent & "<FORM NAME=" & Chr$(34) & "Test" & Chr$(34) & " METHOD=POST ACTION= & vbNewLine
''''''''
 

One guaranteed way around this:

- Don't use IE

One way to possibly get around this without not using IE (although I've not tried it) might be to change the security retrictions for whatever zone is appropriate (you've not said if the page is being delivered locally as a file, or by a webserver, so you would have to make this call).

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top