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,456 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
  • 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now