Solved

<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>

Posted on 2004-10-06
16
1,500 Views
Last Modified: 2013-11-18
This link will not work in my browser, IE6... it works on other IE6 browsers, please help me sort out confituratinon
It is from the paypal developers page.
<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
0
Comment
Question by:benk-master-flash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 3
  • +2
16 Comments
 
LVL 15

Expert Comment

by:justinbillig
ID: 12236686
it wont open? or the page says page error?

post the code of openWin


you could always do this

<a href="http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login" target="_blank">
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12236794
what does the openWin function look like?

also, don't forget to return false from the onclick:

<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600);return false;">Launch the Developer Forums</a>
0
 

Author Comment

by:benk-master-flash
ID: 12237364
clicking on the link mentioned above in the page (code below) should open a new window into the devlopers forum
instead it reports Error on Page --- I have experienced similar and yet unexplained problems trying to view pages where a link should open an new window using a script

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<!--
  Script info: script: devscr, cmd: _forum-run, template: forums/main, date: Aug. 5, 2004 13:16:00 PDT; country: US, language: en_US
  web version: 23.0-326 branch: live-230
  content version: 23.0-326 branch: live-230
-->
<title>PayPal Developer Central - Forums</title>
<style type="text/css" media="all">@import "/css/dc.css";</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Developer Central is a set of tools and resources to enable developers and merchants to develop eCommerce web sites and applicaitons using PayPal web services." />
<meta name="keywords" content="Send, money, payments, credit, credit card, instant, money, financial services, api, soap, wsdl" />
<script type="text/javascript" src="/js/dc.js" language="JavaScript1.2"></script>
</head>
<body>
      <div id="header_container">
            <div id="header">
                                                                        <a href="devscr?cmd=home/main">
                                                            <img src="/en_US/i/logo/logo_paypalDeveloperCentral_w_100x50.gif" alt="PayPal Developer Central Logo" border="0" />
                  </a>                  <span class="logout">&nbsp;
                                          <a href="devscr?cmd=_logout">log out</a>
                                    </span>
            </div>
      </div>
      <div id="nav_container">
            <div id="nav">
                                          <ul>
                              <li id="t1"><a  href="devscr?cmd=home/main"><span>home</span></a></li>
                              <li id="t2"><a  href="devscr?cmd=_sandbox-acct-session"><span>sandbox</span></a></li>
                              <li id="t3"><a  href="devscr?cmd=_certs-session"><span>certs</span></a></li>
                              <li id="t4"><a  href="devscr?cmd=_email-session"><span>email</span></a></li>
                              <li id="t5"><a class="sel" href="devscr?cmd=_forum-run"><span>forums</span></a></li>
                              <li id="t6"><a  href="devscr?cmd=help/main"><span>help</span></a></li>
                        </ul>
                              </div>
      </div>
      <div id="content">
                                                
                              <div id="title">Forums<hr /></div>
                                          <div id="subtext">Find information and share tips with the PayPal Developer Community.</div>
                        
<div id="content_container">
      <br />
      <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
</div>
</div>
<div id="dcfooter">Copyright © 1999-2004 PayPal. All rights reserved. | <a href="#" onclick="openUA('devscr?cmd=legal/ua_pop-outside'); return false;">User Agreement</a> | <a href="#" onclick="openUA('devscr?cmd=legal/privacy_pop-outside'); return false;">Privacy Policy</a></div>
</body>
</html>
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12237397
See this:  <script type="text/javascript" src="/js/dc.js" language="JavaScript1.2"></script>?


We'll need to see the code inside that file.  That's probably where your OpenWin() function lives.  Once we find the syntax in that function, we'll be able to tell you why your function call doesn't work.
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12237563
or, it may be that the function does not exist ... in which case you can include this in the <HEAD> section:

<SCRIPT language="javascript">
 function openWin(url,W,H,target)
 {
    if (!W) W=200;
    if (!H) H=200;
    if (!target) target="_new";

    var X = (screen.width/2)-(W/2);
    var Y = (screen.height/2)-(H/2);

    var winPref = "width=" + W + ",height=" + H
                + ",innerWidth=" + W + ",innerHeight=" + H
                + ",left=" + X + ",top=" + Y
                + ",screenX=" + X + ",screenY=" + Y
                + ",dependent=yes,titlebar=no,scrollbars=no,resizable=no";

    openWin[target] = window.open( url, target, winPref );
    openWin[target].resizeTo(1*W,1*H);
    openWin[target].focus();

    return false;
 }
</SCRIPT>
0
 
LVL 11

Expert Comment

by:raj3060
ID: 12237904
Use window.open()

<a href="#" onclick="window.open('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>

It works.
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12237914
that is incorrect syntax for window.open.  It would be this:

<a href="#" onclick="window.open('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login','my_win','height=772,width=600')"; return false;>Launch the Developer Forums</a>
0
 
LVL 13

Accepted Solution

by:
cLFlaVA earned 175 total points
ID: 12237917
woops!

<a href="#" onclick="window.open('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login','my_win','height=772,width=600'); return false;">Launch the Developer Forums</a>
0
 

Author Comment

by:benk-master-flash
ID: 12238234
Since the code from the page works in some browesers, but not in others, we can conclude that the function at src src="/js/dc.js" exists? So it comes down to an issue of why my browser won't run it. Same browser version on other machines does run the script?  So it appears that it has something to do with my settings.  Any suggestions?
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12238286
And again, if the function exists, why haven't you shown it?
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12238561
add return false to your onclick:
<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600);return false;">
0
 

Author Comment

by:benk-master-flash
ID: 12239033
clFlaVa...
DUDE! -- this is code from the PayPal website.  Since I don't work for PayPal it's not my site, I can't show it.  If you can get it more power to you.  It doesn't change the fact that the code works on some machines and not on others (even using the same browser version.
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12239922
benk--

I understand this is paypal stuff...

/js/dc.js   is a relative path, and is accessible with your website.  I was assuming the openWin function existed in that file, and if it does, that you have access to it, but if it doesn't, then the openWin() function is not described anywhere, and for that reason is not working.  If you DO have access to the file, you will be able to post the code for the openWin() function and we will be able to tell you what is wrong with it.
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12240284
i just figured out your subtleties...

will get back to you shortly
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12240311
Are you running Windows XP SP2?
0
 

Author Comment

by:benk-master-flash
ID: 12289262
cLFlaVA -

sorry about the delay,
yes i am running sp2
the Mozilla Firefox browser runs all of this for me fine.  
I appreciate all the follow up.  If you give me insrtructions on how to grab the source of the /js/dc.js i will grab it for you and post the code.

I am interested to hear your solution
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question