Jump to content

HTML works but javascript fails with href


stockton
 Share

Recommended Posts

I have javascript as follows

function newDoc()    {    window.location.href = "http://192.168.0.8/devit/logon.html";    }

If I call this function from my javascript as follows

        newDoc();[/code]it fails but if called from HTML[code]<input type="button" nanme="SelectButton" id="SelectButton" value="Login" onclick="newDoc()" height="50" />

it works.Please tell me what I am getting wrong.

Edited by stockton
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...