Home | Advertising Info15 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Monday, March 18, 2024  

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Client Side Javascript
 PowerASP Code Help Area : Client Side Javascript
Subject Topic: Javascript (window.open) Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
diu_cat8
Newbie
Newbie
Avatar

Joined: March/23/2006
Location: Hong Kong
Online Status: Offline
Posts: 3
Posted: March/25/2006 at 6:25am | IP Logged Quote diu_cat8

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!")} }

Back to Top View diu_cat8's Profile Search for other posts by diu_cat8
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2024 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.cjwsoft.com,www.aspclassifieds.com,www.aspphotogallery.com