views:

20

answers:

1

Hi,

I've been working on the following (with some very good help from users here at stackoverflow). It works brilliantly, but now I realise it needs to trigger when the page loads rather than on a trigger. I'm a newbie to client side, so would appreciate your help.

  <script language="Javascript">function checkjava(){return 1}</script>
</head>
<body>
  <form action="enabled_catch.php" method="get" onsubmit="this.js.value=checkjava();">
    <input type="hidden" name="js">
    <input type="submit" value="click me">
  </form>

Thanks in advance.

Giles

+1  A: 

How about:

<body onload="document.forms[0].submit();">
Gert G