Jump to content

JimFial55

New Members
  • Posts

    5
  • Joined

  • Last visited

JimFial55's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I figured out where my mistake was. It was in the <!DOCTYPE> Needed to use: [size="2"]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">[/size] [size="2"] [/size] as Doc Type. This fixed the problem. Can now open several popups from the same page.
  2. It's just when I call the function for the second time. The first instance of popup works fine.
  3. Okay,here's what Ive got on the main webpage: <SCRIPT TYPE="text/javascript"> function popupnr(mylink, orderprocess, refocus) { var mywin, href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; mywin = window.open('', orderprocess, 'width=600,height=400,resizable=yes,scrollbars=yes'); // if we just opened the window if ( mywin.closed || (! mywin.document.URL) || (mywin.document.URL.indexOf("about") == 0) ) mywin.location=href; else if (refocus) mywin.focus(); return false; } // </SCRIPT> <SCRIPT TYPE="text/javascript"> function popupnr(mylink, providedimage, refocus) { var mywin, href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; mywin = window.open('', providedimage, 'width=400,height=400,resizable=yes,scrollbars=yes'); // if we just opened the window if ( mywin.closed || (! mywin.document.URL) || (mywin.document.URL.indexOf("about") == 0) ) mywin.location=href; else if (refocus) mywin.focus(); return false; } // </SCRIPT> Then at each link location: What is the <a href="order_process.htm" onclick="return popupnr(this, 'orderprocess')">Order Process</a> ? and <a href="provided_image.htm" onclick="return popupnr(this, 'providedimage')">You provide</a Each line is at separate location. In the <body> section of the popup pages is: <SCRIPT TYPE="text/javascript"> function targetopener(mylink, closeme, closeonly) { if (! (window.focus && window.opener))return true; window.opener.focus(); if (! closeonly)window.opener.location.href=mylink.href; if (closeme)window.close(); return false; } // </SCRIPT> somewhere in this, ther's something causing this problem.
  4. Read your "Best Practices" and took off the <!--/-->. if you could go to: http://kickstandpad.net/index.htm Click on "Your Provided" in first blue box, it comes up as popup. If you then click "Order Process" under main heading, it comes up as a new page, not a popup. Now I'm thinking I should remove the coding after from "// to } " as this is causing no more popups to occur.
  5. I'm self taught and this is probably a basic question. Trying to use two popup windows in one webpage. First popup used opens correctly, but second one opens as full page. In the following script on the main page: <SCRIPT TYPE="text/javascript"> <!-- function popupnr(mylink, windowname, refocus) { var mywin, href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; mywin = window.open('', windowname, 'width=400,height=400,resizable=yes,scrollbars=yes'); // if we just opened the window if ( mywin.closed || (! mywin.document.URL) || (mywin.document.URL.indexOf("about") == 0) ) mywin.location=href; else if (refocus) mywin.focus(); return false; } //--> </SCRIPT> I think I've figured out that I have to use one instance of this for each popup with each specific popup name being inserted for windowname . The windowname then comes from the link line: <A HREF="provided_image.htm" onclick="return popupnr(this, 'windowname')">Your Image</A> Ready? Is this correct?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.