Results 1 to 5 of 5

Thread: multiple pop-ups

  1. #1
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default multiple pop-ups

    Ok I have a pop-up window: Tips inside this pop-up I have a list of tips and have a link to another pop-up that opens in a new window, so now I have two pop-ups. If I add: <a href="javascript:window.close()">Close this window</a> to my second pop-up it creates the desired effect of creating a link for closing the second pop-up, however it changes the first pop-up also to something weird like: CLOSE THIS WINDOW">TIPS ... I'm sure that it is something quite simply that I'm missing, but I would appreciate any help or advice that anyone could give. Thank you.

    This is the page for the first pop-up:
    Code:
    <?lassoscript
    /* 
    This is the search tips pop up window;
    Created on 8/1/2007 by kodiacat;
    */
    ?>
    <html>
    <head>
    <title>Search Tips For Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" type="text/css"  href="../includes/test_styles.css">
    <script language="JavaScript">
    var newwindow;
    function test_tips(url)
    {
    	newwindow=window.open('test_tipswin.lasso', 'new', 'height=375, width=400, center=100, resizeable=yes, scrollbars=yes');
    	if (window.focus) {newwindow.focus()}
    }
    </script>
    </head>
    
    <body>
    <div>
    <h3><b>Search Tips</b></h3>	
    <hr/>
    		<p>The search form can be used to search for questions by  Keywords and/or Category from the Tips database.</p>
    		<ul>
    			<li> + denotes a contains search by keyword.</li>
    			<li> - denotes a search excluding a keyword.</li>
    			<li>For Example: searching for <b> '-delete' +'add' </b>would result in all Tips that contain add as a keyword, but do not contain delete as a keyword.  </li>
    			<li>Required Keyword - <b>+add, +delete</b> would result in all Tips's which contain both the word "add" and the word "delete". </li>
    			<li>Comma's are not necessary, and could affect your search results.</li>
    			<li>Entering two words without any operators in front ( i.e. <b> 'delete'  'add'  </b> or one word <b>'delete' </b>)will produce a contains search on the keywords field where either delete or add is present or just delete is present.</li>
    			<li>You may search by category and keyword</li>
    			<li>Entering nothing will find all Tips</li>
    		</ul>
    <hr />
    <font class="fieldtitle"><a href="javascript:test_tips('test_tipswin.lasso');" title="[include: 'test_tipswin.lasso']">Tips</a></font>
    <div align=center><a href="javascript:window.close()">Close this window</a></div>	
    </div>
    </body>
    </html>
    Second Pop-up window page:
    Code:
    This is just a test.
    
    <a href="javascript:window.close()">Close this window</a>
    //This close link will change the Tips pop-up link for the original pop-up window to this: CLOSE THIS WINDOW">TIPS the pop-up link still functions as it should, but it looks odd.

  2. #2
    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

    Instead of:

    Code:
    <a href="javascript:window.close()">Close this window</a>
    use:

    Code:
    <span onclick="window.close();">Close this window</span>
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Instead of:

    Code:
    <a href="javascript:window.close()">Close this window</a>
    use:

    Code:
    <span onclick="window.close();">Close this window</span>
    Heh, Thanks:
    hrmm, I tried this, and now the "close this window link in pop-up2 doesn't work, just displays plain text: "close this window", and pop-up win 1 displays this: CLOSE THIS WINDOW">TIPS and this links to pop-up win2....
    (Not sure if I explained this bit rightIt shouldn't show the "close this window" at all in the first pop-up since it already has a window.close link...Maybe a screen-shot will help give a visual of what I see:

  4. #4
    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

    Looking at your code, it appears as though you are also using some server side code. It looks like a proprietary form of PHP - lassoscript, that I have never heard of. This, or the way that you are using it may be the problem.

    A link from one page or even parts of it should never appear on another, unless you are doing something to make it do that.

    I'd try getting rid of this:

    Code:
     title="[include: 'test_tipswin.lasso']"
    Last edited by jscheuer1; 08-27-2007 at 07:35 PM.
    - John
    ________________________

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

  5. #5
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default multiple pop-ups[SOLVED]

    Hey thanks actually this was and wasn't it, see if I took this out it would work, but I want the text from the pop-up to display as a title/hover effect.
    I learned that you aren't supose to put anything other than text into a title attribute. The solution was to take the window.close function out of the second pop-up/title include, and to instead include the pop-up into a template that displayed the pop-up instead, and that includes the close this window link.
    Hopefully this will make sense.
    Yes I am using server side code similiar to php: http://www.lassosoft.com
    Thank you for your helping lead me in the right direction.

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
  •