Forum Moderators: open

Message Too Old, No Replies

Javascript error when click submit - "'event' is null or not an object

Javascript error event is null or not an object

         

jimtmelb

6:42 am on Sep 20, 2004 (gmt 0)



Hi I have an Access 2000 database with a embedded browser in a form. The Active X control I use is MSINET.OCX.

I am experiencing an error when a user clicks submit on a web page with the following javascript;

<script type="text/javascript">
<!--
var submitted = 0;

function doSubmit()
{
if (submitted == 0)
{
submitted = 1;
document.now_step.submit();
}
if (document.all)
event.returnValue = false;
}

I get a javascript error. The error says
"'event' is null or not an object"
The error seems to occur at the line
document.now_step.submit();

The above has been working successfully until last week. Don't know why?
The same javascript page works fine when clicking submit using Internet Explorer.

Can anyone suggest a reason why this is happening.
Any suggestions will be much appreciated.
Thanks
Jim

Rambo Tribble

12:43 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I'm not mistaken, the syntax you want is:
onsubmit.returnValue=false;

This is an IE-only property.