Hi

Can someone please tell me what I need to add to this code to make the link open in the same window and not a different window?

on (release) {
	getURL("http://www.drfire-online.com/html/index.html","_blank");
}

_self, _top or no target at all opens in the same window

_self, _top or no target at all opens in the same window

Thanks I have tried that yet still cant seem to get it to open it the same window. It keeps opening in a new window....ahhhhhhh haha

If you could, could you please show me how you would write the code?

Many thanks! :)

Since I'm not sure what the getURL function does, here's the way I do this on an asp page.
window.location.href = url changes the url of the current window.

<%@  language="VBScript" %>
<% Option Explicit %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />

    <script language="javascript" type="text/javascript">
<!--
 
 function getURL(url)
 {
    window.location.href=url;
 }
//-->
    </script>

</head>
<body>
    <form name="form1" id="form1"
        method="post" action="">
        <input name="btnSub" value="Choose Action" type="button"  
onclick="getURL('http://www.drfire-online.com/html/index.html');"/>
    </form>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.