homepage Welcome to WebmasterWorld Guest from 184.73.52.98
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
problem with popup page showing in same browser?
kat




msg:563164
 6:34 am on Apr 26, 2001 (gmt 0)

hi everyone,
i have a problem with my site using popup windows... on my main index page i have a link which goes to my personal page with specific dimensions to it! - That works fine - but from that page i want my other pages to pop up in a similar way but it doesn't work like that online. I used the same code as i did for my index page and it works fine offline in my browser, however when i upload it and view it - the pop up window goes in the same window.. if i put "target-_blank" it makes a new window but doesn't find my page.. grrr this is frustrating.. can anyone help.. if so my site is
[teamkitten.com...] and click on the kat2.2 link.
thanks a bunch =^.^=

 

tedster




msg:563165
 7:05 am on Apr 26, 2001 (gmt 0)

Hi kat,

If you want a new window to open, it needs to have a unique name. Your code uses the name "popup" for every popup window, so once that window is open, any further clicks just load a new document into the same window.

So try using a different name for the second popup window and see if that isn't the behavior you are aiming for.

kat




msg:563166
 11:01 pm on Apr 29, 2001 (gmt 0)

hey tedster.. thanks for the reply.
i poked and prodded with my site for a while trying to find how to rename it as you said i should give it a unique name but i'm not sure what you mean as i have given them unique names (i thought)in the file name..
Where are you talking about in the html??
This is my code thats not working online...

in the <body>

<a href="javascript:cPop('abouty.html',300,500)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('tv','','images/about_07.gif',1)">

and this is the head
<!--
function cPop(url, wide, high) {window.open(url,"popup",'width=' + wide + ',height=' + high);
}

is there somewhere in that code where i can rename it??
Can anyone help or have another script i could use that might work so it shows in another browsers..
thanks again for your help tedster...

tedster




msg:563167
 4:18 am on Apr 30, 2001 (gmt 0)

This is the function definition you're currently using:

{window.open(url,"popup",'width=' + wide + ',height=' + high);
}

It defines several parameters. The second one, "popup", is the name of the window that the function cPop creates -- it's not the name of the HTML file, but the name of the window where that HTML is rendered.

What you need for your situation is a unique window name for each popup. You could pass this name as a parameter as well, just as you pass the url. So try this as the function definition:

function cPop(url, windowname, wide, high) {window.open(url,windowname,'width=' + wide + ',height=' + high);
}

Then in the body, the link to generate the the popup window will now pass four parameters, like this:

<a href="javascript:cPop('abouty.html','win001',300,500)">Click for popup window</a>

Here, win001 is the name of this particular window. For the next link you would use win002 (or any set of unique names you want). This way, each HTML document also gets a unique window.

Hope that helps to clarify what I was saying, and good luck! For clarity's sake I omitted your rollover functionality, but this won't affect anything about the popup window when you include it.

kat




msg:563168
 5:07 am on May 4, 2001 (gmt 0)

hey tedster,
thanks again for you help... that made things a lot more clearer...
i did the changes as you said... and gave the new windows a name.. but alas.. i STILL can't get this thing to open in a new browser.. this is frustration city here.. !!!!!
any more tips??
.......anyone pwease??
thanks again..

tedster




msg:563169
 6:36 am on May 4, 2001 (gmt 0)

I just checked your revised site.

You've changed the cPop function as we discussed above, but in the BODY section, when you use cPop in a javascript link, you must include FOUR parameters in the link:

1. URL to load in the popup
2. Unique name for the popup window
3. Width of the new window
4. Height of the window

The links you currently have online don't including a window name. They have only parameters 1,3,4.

Hope that helps.

etLux




msg:563170
 8:25 pm on May 5, 2001 (gmt 0)

For the popup-impaired, you might try this do-hickey...

[codelifter.com...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved