Added: March/25/2006 at 6:25am | IP Logged
|
|
|
I want to detect the browser.....then write the following code...
------------------------------------------------------------ -----------------------------
<script type= "text/javascript">
function detectBrowser(){
var browser=navigator.platform
if (browser=="Win32")
{window.open("report.aspx")}
else
{window.open("test.aspx")}
}
</script>
</head>
<body onload= detectBrowser()">
------------------------------------------------------------ --------------------------
When I run the page, that can't open the report.aspx (my browser is Win32). That shows pop-up window blocked. What's wrong? Pls help me to solve this problem.
< =text/>
>>
< =text/>
function detectBrowser()
{
var browser=navigator.platform
if (browser=="Win32")
{window.open("report.aspx")}
else
{alert("It's time to upgrade your browser!")}
}
< =text/>
function detectBrowser()
{
var browser=navigator.platform
if (browser=="Win32")
{window.open("report.aspx")}
else
{alert("It's time to upgrade your browser!")}
}
< =text/>
function detectBrowser()
{
var browser=navigator.platform
if (browser=="Win32")
{window.open("report.aspx")}
else
{alert("It's time to upgrade your browser!")}
}
< =text/>
function detectBrowser()
{
var browser=navigator.platform
if (browser=="Win32")
{window.open("report.aspx")}
else
{alert("It's time to upgrade your browser!")}
}
< =text/>
function detectBrowser()
{
var browser=navigator.platform
if (browser=="Win32")
{window.open("report.aspx")}
else
{alert("It's time to upgrade your browser!")}
}
|