How to navigate page through button click event?


        <script type="text/javascript" language="javascript">
            function thatpage(){
                document.URL="byte.html";
            }
        </script>

        <form>
            <input name="ins" type="submit"  value="INSERT" onclick="thatpage"/>
            <input name="upt" type="submit" value="UPDATE"/>
            <input name="del" type="submit" value="DELETE"/>
        </form>

Don’t know why it doesn’t work.
Where is the error?
Where should i edit?

Not an expert, and I’m sure someone will correct this if necessary.

As far as I know onclick is associated with type"button". onsubmit is for type “submit”

Cheers

RLM

This will change the current location:


function thatpage(){
  document.location.href="byte.html";
}
</script>

To call a javascript function you have to write it like this: onclick=“function_name()” or return function_name() if you want to use function returned result.