Opening multiple windows on a page.

  • 1
  • Question
  • Updated 10 years ago
  • Answered
I would like to get a new window to pop up when I click on a link. I have my site made to click on a person's stats but I have multiple peoples with stats. One you click on a second one, it changes the one before. I would like to open multiple windows to compare stats. Can you help?
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
  • bewildered

Posted 10 years ago

  • 1
Photo of gamedemon

gamedemon

  • 216 Posts
  • 22 Reply Likes
Hi Tammi

Here's a popup window maker I use:
http://javascript.internet.com/genera...

Just type in the information you want, retrieve the generated html code, and put the code in an html widget.

In your case, you want the pop up to open when someone clicks on a link, so after you generate the code, which will look something like this like this


<1--- <!--- TWO STEPS TO INSTALL POPUP WINDOW:

1. Paste the first into the HEAD of your HTML document
2. Use the code to open the popup page on your site --->

<!--- STEP ONE: Copy this code into the HEAD of your HTML document --->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!--- Idea by: Nic Wolfe --->
<!--- This script and many more are available free online at --->
<!--- The JavaScript Source!! http://javascript.internet.com --->

<!--- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1024,height=768');");
}
// End --->
</script>

<!--- <!-- STEP TWO: Use the following link to open the new window -->

<A HREF="javascript:popUp('')">Open the Popup Window</A>

<!--- Script Size: 0.73 KB ---> --->


you will have to change Open the Pop Up Window to whatever you want the link to say, (ex: Stats or Click Here)

Also, the code says to paste half of the code in between the head tags and the rest wherever you want the link to appear. You must ignore that suggestion since synthasite doesn't give you access to the head tags.

Just put everything in an html widget. It should work.

Good luck

If you need help I am here.

Also, another option would be to have your links open in new windows instead of pop ups. To do that, just put the following code in an html widget:


<!--- <a href="http://yourdomainname.com" target="_blank">Your link text</a>


Just change yourdomainname and Your link text to whatever you need them to be. (and don't include the <!--- ---> )
Photo of Ruth

Ruth

  • 2819 Posts
  • 135 Reply Likes
Thanks gamedemon!
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
I already have it open a new window. My problem is that I have several players on one page, and I would like to be able to click on their name and be able to see several at one time on the screen. Will the first option work like that? Sorry to bother you, but I don't want to mess it up and have to start all over.

Thanks for helping,
Tammi
Photo of Ruth

Ruth

  • 2819 Posts
  • 135 Reply Likes
Hi Tammi,

The first suggestion that gamedemon made will create pop-ups for you.
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
Good Morning,

I am not sure then now how to do the first option. Can you clarify it a bit more?
Photo of gamedemon

gamedemon

  • 216 Posts
  • 22 Reply Likes
Hi Tammi

I'm sorry you are having difficulty. Let me clarify.

The first option was for making a pop up window.

Go to HTML Pop-Up Generator. You will find a free pop-up generator which will do all the work for you. After you fill out the information, press "Generate code". Then copy and paste the code generated into a html widget onto your site in the site builder.

If you are unsure how to fill in the information, I will walk you through it.

- "Name of file to be opened" is the URL of the page you want opened in the pop-up

- The check marks are not important, you can leave them all unchecked, check them, or pick and choose. If a lot of information is going to be in the pup-up, I would check them all.

- The next two are the width and the height. A full screen pop-up would be about 900 for the width and 800 for the height. Any number below those numbers would work.

- Then you will specify how you want the pop-up to open. In your case you should choose "Link".

- And the last check mark is not important.

Then, copy and paste the code, as is, into an html widget. The code is going to tell you that you need to put part of the code in the HEAD of your html document. Don't listen to that, it doesn't work on Synthasite. Just put everything in an html widget.

And then in the last step, after you have copied and pasted the code into an html widget, at the end of the code you will see the words "Open the Popup Window". Replace those words with whatever words the link will say. IN your case for example it would be "Michael's Stats" or "View Michael's Stats" or something like that.

If you have questions just ask.

Have a good morning
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
Good Morning again!

Ok I did what you told and copied and pasted. When you click on the link it will not go to the page I want it to go. The only thing I changed was the "open popup window" part. I tried several times.
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
Ok iI have played around wth it enough that I got it working. Not sure if I like the button thing. But I still have the problem that when I click on one, then I want another person's stat, I still get the second stat in the same window as the first. Then the first stat is gone. I want to compare with multiple windows to pop up. I am not getting this. HELP.
Photo of gamedemon

gamedemon

  • 216 Posts
  • 22 Reply Likes
Hi Tammi,

Can you share with us the URL to your site so we can test it. It would be helpful.

Thanks in advance
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
pum5thgrademustangs.synthasite.com It is password protected. email me gtandrae@verizon.com to get it. I have a page on there that is not on the top band that i have been working on i can give you that also in the email. These are under age kids so i have it password protected.
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
sorry my email is gtandrae@verizon.net
Photo of gamedemon

gamedemon

  • 216 Posts
  • 22 Reply Likes
Hi Tammi,

I hope you had a good Thanksgiving, I did; now it's back to work.

So, I searched all over for a pop up generator that does what you require for your site, with absolutely no luck. I searched forums and tutorial sites, but I eventually came to the conclusion that this is not only (most likely) impossible, but also not workable, because even if you did get multiple windows to open on one page, once you click on a different link, the pop up won't stay in front of the other page.

So, my suggestion to you would be to forget pop ups all together and use iframes.

If you don't know, iframes are a way for you to put a website inside of another website. I made this page to show you, as an example, what google.com looks like in an iframe of a given width and height: http://mikestestsite.synthasite.com/g...

I created this following page which tells a little more about iframes, but also gives you the codes for the iframes that I prepared for you. You can see it here:
http://mikestestsite.synthasite.com/t...

Just copy and paste the codes, under each iframe, into an html widget. And it will look like the stats are part of your website.

I hope it works out. And don't forget, this only my suggestion, because I myself don't think there is any other way of doing this.

Best of luck. And with your team as well.
Photo of Tammi

Tammi

  • 9 Posts
  • 0 Reply Likes
Thanks for all your help gamedemon.