Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup help?

Status
Not open for further replies.

DaveL

Programmer
Jun 8, 2000
40
0
0
US
Can anybody tell me what I am doing wrong here? I am trying to create a simple popup. It works fine in IE, but not in Netscape 4.72. In Netscape it is giving me the error "The parameter is incorrect".

Following is the code I am using:

Code for the driver:

Code:
<html>
<head>
<title>Test Popup</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<SCRIPT TYPE=&quot;text/javascript&quot;>
  <!--
  function popup(mylink, windowname)
  {
    if (! window.focus)return true;
      var href;
    if (typeof(mylink) == 'string')
      href=mylink;
    else
      href=mylink.href;
      window.open(href, windowname, 'width=400,height=500,scrollbars=no');
   return false;
  }
  //-->
</SCRIPT>

<body text=&quot;#000000&quot;>

<CFSET short_desc = &quot;Test It&quot;>
<cfoutput>
<a href=&quot;##&quot; onClick=&quot;return popup('dsp_test_popup.cfm?short_desc=#short_desc#','Test1')&quot;>larger view</a>
</cfoutput>

</body>
</html>


Code for the Popup:

Code:
<html>
<head>
<title></title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>

<cfoutput>
#url.short_desc#
</cfoutput>

</body>
</html>

Any help would be appreciated!

Thanks, Dave.
 
I'm afraid different versions of IE and Netscape perform Javascript differently. If it works in the IE version, there's actually nothing wrong with your code, it's just that the Netscape version you're trying doesn't support that code. Unless you're willing to check for browser type and version using ColdFusion's http_useragent constants and execute different versions of your code depending on the browser/version, the only other solution I can think off is using Macromedia Dreamweaver--if it has a function to auto-generate popups--Dreamweaver has the ability to output Javascript code that's compatible to different browsers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top