tags:

views:

32

answers:

2

I have the following code in my html

<input type="image" src=images/more.png   onClick="showInviteInfo() />

When clicked it brings up a pop up box via this js function.

function showInviteInfo(){
     document.getElementById("divsignup").style.visibility = "visible";
            document.getElementById("txtemail").focus();

}

But I no longer want it to bring up pop up rather when clicked take user to a new page. What do i need to change? Probably easy, but I am a newbie.

thnx

+1  A: 

Use

window.location = "new location path";

in your function.

window.location

If you can use an anchor tag then it would be like this.

<a href="new location" id="anchLoc">Click here to navigate to new page</a>
rahul
Jonah1289
it would need to be function NAME() {window.location = "";}
Luke Schafer
A: 

change

<input type="image" src=images/more.png   onClick="showInviteInfo() />

to

<a href="YOURLINK"><img src="images/more.png" /></a>

EDIT: sorry, the editor was giving me grief with the second line

Luke Schafer
this is assuming I understood the OP correctly (as opposed to the title) - you have a button that shows a popup but you want to change it to just navigate to the new page? No javascript required...
Luke Schafer