Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Pop Up Window difficulty pleaaase help.

  1. #11
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Yes you're right!...I did not use the code he used above because it will bring much confusion to him...and to help him understand..I created a very simple script.

    My apologies for creating my own...g*..
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  2. The Following User Says Thank You to rangana For This Useful Post:

    RylandT (03-01-2008)

  3. #12
    Join Date
    Feb 2008
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    you guys are awsum i feel like im in good hands here not only cause of your attention to this post but the fact that I have almost no idea whats being said..


    heres what my splash page looks like now..

    HTML Code:
    <html>
    <head>
    <title>index</title>
    <meta name="generator" content="Created Using Yahoo! PageBuilder 2.61.90">
    <script type="text/javascript">
    function popupwindow(){
    	var mywindow;
    	var h;
    	var w;
    	var h1;
    	var w1;
    	h1 = 1024;
    	w1 = 768;
    	h = screen.height;
    	w = screen.width;
    	h = ((h/2) - (h1/2));
    	w = ((w/2) - (w1/2));
    	mywindow = window.open("http://www.kingstonpulse.com/Portfolio.html","RylandT","status=0,location=0,menubar=0,toolbar=0,width=768,height=1024,resizable=0");
    	mywindow.moveTo(w,h);
    }
    </script>
    </head>
    
    
    <body bgcolor="#333332" link="#0000FF" vlink="#FF0000" text="#000000"
    
    <div id="root" style="position:absolute;top:0;left:0;width:670px;height:461px">
    <script>center();</script>
    <div style="position:absolute;left:155;top:173;width:382;height:276;">
    <table width=382 height=276 border=0 cellpadding=0 cellspacing=0><tr valign="top">
    	<td><img height=276 width=382 src="http://www.geocities.com/infimanelite/SPLASHdesign.jpg" border=0 ></td>
    </tr></table></div>
    <div style="position:absolute;left:251;top:339;width:152;height:80;">
    <table width=152 height=80 border=0 cellpadding=0 cellspacing=0><tr valign="top">
    	<td><a href="http://www.kingstonpulse.com/Portfolio.html"><img height=80 width=152 src="http://www.geocities.com/infimanelite/LAUNCHWITHOUTINTRO.jpg" border=0 ></a></td>
    </tr></table></div>
    <div style="position:absolute;left:410;top:291;width:104;height:71;">
    <table width=104 height=71 border=0 cellpadding=0 cellspacing=0><tr valign="top">
    	<td><a href="http://www.kingstonpulse.com/Portfolio.html"><img height=71 width=104 src="http://www.geocities.com/infimanelite/LAUNCHWITHINTRO.jpg" border=0 ></a></td>
    </tr></table></div>
    </div>
    
    </html>
    my splash page isnt the one that i need to open as a pop up with no scroll bar etc though. So wouldn't the code you gave me be better suited to go into the "Portfolio.html" page? just a thought? or are is the script you gave me stipulations to the Portfolio.html - window that will be opened?

    because at present my Portfolio.html script looks like this.

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd">
    <html>
    <head>
    <title>Portfolio</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta name="author" content="">
    <meta name="generator" content="SWiSHmax http://www.swishzone.com">
    <meta name="description" content="Portfolio">
    <meta name="keywords" content="Web Design, Graphic Design, Showcase, Portfolio">
      <param name="movie" value="Portfolio.swf">
      <param name="bgcolor" value="#FFFFFF">
      <param name="quality" value="high">
      <param name="allowscriptaccess" value="samedomain">
      <embed type="application/x-shockwave-flash"
       pluginspage="http://www.macromedia.com/go/getflashplayer"
       width="1024" height="768"
       name="Portfolio" src="Portfolio.swf"
       bgcolor="#FFFFFF" quality="high"
       swLiveConnect="true" allowScriptAccess="samedomain"
      ></embed>
    </object>
    </center>
    </body>
    </html>

    And shouldn't I be drawing some sort of corelation between my two images that need to link to Portfolio.html into the "java script" command itself? So that the script knows that when either of the 2 .jpg links are physically clicked on, then the pop up window for Portfolio.html 'pops up' with the size/attribute stipulations set in the code?

    thank for the feedback.

  4. #13
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You cannot open a pop up for a page from that page. Your user could, but then you would have two of that page. The pop up should be opened from the page leading to the page you want to be in the pop up.

    And, yes there should be something on your splash page so that when the links are clicked, it opens the portfolio page in the pop up, try changing:

    Code:
    <a href="http://www.kingstonpulse.com/Portfolio.html">
    to:

    Code:
    <a onclick="popupwindow();return false;" href="http://www.kingstonpulse.com/Portfolio.html">
    Now this doesn't solve the problem of which version of Portfolio.html to open, the one with or the one without the intro, though. If they are two separate pages, you could pass the href to the function:

    Code:
    <a onclick="popupwindow(this.href);return false;" href="http://www.kingstonpulse.com/Portfolio.html">
    and change the popupwindow() function to:

    Code:
    function popupwindow(url){
    	var mywindow;
    	var h;
    	var w;
    	var h1;
    	var w1;
    	h1 = 1024;
    	w1 = 768;
    	h = screen.height;
    	w = screen.width;
    	h = ((h/2) - (h1/2));
    	w = ((w/2) - (w1/2));
    	mywindow = window.open(url,"RylandT","status=0,location=0,menubar=0,toolbar=0,width=768,height=1024,resizable=0");
    	mywindow.moveTo(w,h);
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #14
    Join Date
    Feb 2008
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    john thank you, but I don't think I'm gettin across how much of a newb I am at this.. which page should

    <HTML>
    function popupwindow(url){
    var mywindow;
    var h;
    var w;
    var h1;
    var w1;
    h1 = 1024;
    w1 = 768;
    h = screen.height;
    w = screen.width;
    h = ((h/2) - (h1/2));
    w = ((w/2) - (w1/2));
    mywindow = window.open(url,"RylandT","status=0,location=0,menubar=0,toolbar=0,width=768,height=1024,resizable=0");
    mywindow.moveTo(w,h);
    }
    </HTML>

    be in?

  6. #15
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Since john is not yet around, I could help you out with this.
    First, the code is not an HTML file, but a javascript. You could place a javascript either as inline or external.
    Just place the code inside your HTML page where you want the pop-up to appear...and in placing, it should be inside a <script type="text/javascript"> </script> tag.

    It would appear:
    HTML Code:
    <html>
    <head>
    <title>MY title</title>
    <script type="text/javascript">
    function popupwindow(url){
    var mywindow;
    var h;
    var w;
    var h1;
    var w1;
    h1 = 1024;
    w1 = 768;
    h = screen.height;
    w = screen.width;
    h = ((h/2) - (h1/2));
    w = ((w/2) - (w1/2));
    mywindow = window.open(url,"RylandT","status=0,location=0,menubar=0,toolbar=0,width=768,height=1024,resizable=0");
    mywindow.moveTo(w,h);
    }
    </script>
    </head>
    <body>
    [B]YOur contents here[/B]
    </body></html>
    See if it helps
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  7. #16
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by RylandT View Post
    john thank you, but I don't think I'm gettin across how much of a newb I am at this.. which page
    I just looked at your Splash.html file and it goes there, and you have it there. However, remove the dots (highlighted):

    Code:
    <html>
    <head>
    <title>index</title>
    <meta name="generator" content="Created Using Yahoo! PageBuilder 2.61.90">
    <script language="javascript" type="text/javascript">
    <!--
    function popupwindow(){
    	var mywindow;
    	var h;
    	var w;
    	var h1;
    	var w1;
    	h1 = 1024;
    	w1 = 768;
    	h = screen.height;
    	w = screen.width;
    	h = ((h/2) - (h1/2));
    	w = ((w/2) - (w1/2));
    	mywindow = window.open("http://www.kingstonpulse.com/Portfolio.html","RylandT","status=0,location=0,menubar=0,toolbar=0,width=768,height=1024,resizable=0");
    	mywindow.moveTo(w,h);
    }
    //-->
    </script> . . .
    </head>
    And get rid of this (highlighted):

    Code:
    <body bgcolor="#333332" link="#0000FF" vlink="#FF0000" text="#000000"
    
    <div id="root" style="position:absolute;top:0;left:0;width:670px;height:461px">
    <script>center();</script>
    <div style="position:absolute;left:155;top:173;width:382;height:276;">
    <table width=382 height=2
    And where you have:

    Code:
    <a href="http://www.kingstonpulse.com/Portfolio.html">
    Make it:

    Code:
    <a href="http://www.kingstonpulse.com/Portfolio.html" onclick="popupwindow();return false;">
    There could still be other problems, but once you take care of these things, it will be clear if there are or not, and if there are any, what they are will be clearer as well.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #17
    Join Date
    Feb 2008
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    HOLLY MACRO JOHN, you guys it worked!! thats bloody sexy! the scale is off but ill tinker around with that right now.. and hopefully this will be the last you guys have to hear from me thank so much guys!!

  9. #18
    Join Date
    Feb 2008
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    okay, your right there are new problems... I need to have the portfolio to have a 0 margin around it so it hugs all 4 walls of the browser (no white space around the flash file).

    Also as you can see I declared in the html and script that I need the window to be 1024-768 in size and it doesnt seem to want to listen...

    heres my current Portfolio.html code.

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html40/loose.dtd">
    <html>
    <head>
    <title>index</title>
    <meta name="generator" content="Ryland Thiel Showcase">
    <script language="javascript" type="text/javascript">
    <!--
    function popupwindow(){
    	var mywindow;
    	var h;
    	var w;
    	var h1;
    	var w1;
    	h1 = 1024;
    	w1 = 768;
    	h = screen.height;
    	w = screen.width;
    	h = ((h/2) - (h1/2));
    	w = ((w/2) - (w1/2));
    	mywindow = window.open("http://www.kingstonpulse.com/Portfolio.html","RylandT","status=0,location=0,menubar=0,toolbar=0,width=768,height=1024,resizable=0");
    	mywindow.moveTo(w,h);
    }
    //-->
    </script>
    </head>
    <body bgcolor="#FFFFFF">
    <center>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"
      id="Portfolio" width="1024" height="768">
      <param name="movie" value="Portfolio.swf">
      <param name="bgcolor" value="#FFFFFF">
      <param name="quality" value="high">
      <param name="allowscriptaccess" value="samedomain">
      <embed type="application/x-shockwave-flash"
       pluginspage="http://www.macromedia.com/go/getflashplayer"
       width="1024" height="768"
       name="Portfolio" src="Portfolio.swf"
       bgcolor="#FFFFFF" quality="high"
       swLiveConnect="true" allowScriptAccess="samedomain"
      ></embed>
    </object>
    </center>
    </body>
    </html>
    any ideas?

  10. #19
    Join Date
    Feb 2008
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    okay i fixed the scalling part i realized i mixed my width and height up...

    but i can't remove the white space yet.. it's driving me nutso

  11. #20
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    We can and should get rid of this line:

    Code:
    mywindow.moveTo(w,h);
    And this one can and should be simplified:

    Code:
    mywindow = window.open("http://www.kingstonpulse.com/Portfolio.html","RylandT","status=0,location=0,menubar=0,toolbar=0,width=1024,height=768,resizable=0");
    to:

    Code:
    mywindow = window.open("http://www.kingstonpulse.com/Portfolio.html","RylandT","top=0,left=0,width=1024,height=768");
    That should get the window totally into view and at, or at least as close to full width and height as the monitor and screen will allow.

    As for getting rid of margins on the Portfolio.html page. Put this in the head of the Portfolio.html page:

    Code:
    <style type="text/css">
    body {
    margin:0;
    padding:0;
    }
    </style>
    Oh, and get rid of this from the Portfolio.html page:

    Code:
    <script language="javascript" type="text/javascript">
    <!--
    function popupwindow(){
    	var mywindow;
    	var h;
    	var w;
    	var h1;
    	var w1;
    	h1 = 768;
    	w1 = 1024;
    	h = screen.height;
    	w = screen.width;
    	h = ((h/2) - (h1/2));
    	w = ((w/2) - (w1/2));
    	mywindow = window.open("http://www.kingstonpulse.com/Portfolio.html","RylandT","status=0,location=0,menubar=0,toolbar=0,width=1024,height=768,resizable=0");
    	mywindow.moveTo(w,h);
    }
    //-->
    </script>
    Now, you really should consider making the Flash smaller, and making it so it fills 100% of the window, rather than requiring the window to be of specific dimensions.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  12. The Following User Says Thank You to jscheuer1 For This Useful Post:

    RylandT (03-01-2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •