2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by OldDude
0

_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! :)

0

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>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.