|
| |
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
FAQ : Making popup pages - 12/26/2001 0:03:49
I'd like some of my links to pop up a small window which would show an explanation of what that link is, without taking the user off the page and over to another one. I've seen this on lots of sites and like the idea. Does anybody have a "how to" that I can either learn or just copy over and over?
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 12/26/2001 12:42:11
Thanks, Rian. Now, how do I point the hyperlink to this script? Edited by - webdoc on 12/26/2001 12:42:44
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 12/26/2001 12:47:47
Hi puiwaihin, I think Rian has what I wanted, but now I have to figure out how to incorporate this into the site. I want to use a lot of these.
|
|
|
|
puiwaihin
Posts: 1378 From: Taiwan Status: offline
|
RE: Making popup pages - 12/26/2001 12:58:09
The code in the FAQ pretty much covers everything you will need. Include the code in the between the <head></head> portions of the code EXACTLY as it is where Rian pointed you. Then, when you want to create a hyperlink, instead of just putting the page you want in the hyperlink bar, put the following: javascript:open_window('pagename.htm') Note that the page you want it to point to is in single quotes, not double quotes. ---------- Who put the self-destruct button THERE?! Edited by - Puiwaihin on 12/26/2001 12:58:50
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 12/26/2001 13:30:51
Now I am getting an Error on Page message down at the bottom. I am obviously not putting the code into the right place in my HTML page. You said, "Include the code in the between the <head></head> portions of the code EXACTLY as it is where Rian pointed you." Head/head portions of which code? My code? I am afraid my HTML knowledge is not at all well developed, and my code guy is off on vacation. Here is Rian's code. Note that for the sake of trying it out, I named "page1" "popup". <HTML> <HEAD> <TITLE> </TITLE> <SCRIPT> function open_window(url) { mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=520,height=350'); } </SCRIPT> </HEAD> <BODY> <A HREF = "javascript:open_window('popup.html')"> <IMG SRC ="image.gif"> </A> <A HREF = "javascript:open_window('page2.html')"> <IMG SRC ="image.gif"> </A> </BODY> </HTML> Why are there two pages (page 1, page 2)? Can you tell me where this all should go?
|
|
|
|
puiwaihin
Posts: 1378 From: Taiwan Status: offline
|
RE: Making popup pages - 12/26/2001 17:57:45
quote: Now I am getting an Error on Page message down at the bottom. I am obviously not putting the code into the right place in my HTML page. You said, "Include the code in the between the <head></head> portions of the code EXACTLY as it is where Rian pointed you." Head/head portions of which code? My code?
Yes. Go to the page you want to put this on and look at it in HTML view. You will notice your page will look something like: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Page 1</title> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta name="Microsoft Border" content="none, default"> </head> <body> .... And then there will be more code below that. Put Rian's code (everything from <script> to </script> just before the </head> tag so that it looks like this instead: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Lesson Plan</title> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta name="Microsoft Border" content="none, default"> <SCRIPT> function open_window(url) { mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=520,height=350'); } </SCRIPT> </head> <body> The HTML code in the FAQ is the same, it just leaves out the extra tags that FP adds in there. If that is what you have in the top part of your code, that is correct. quote: Why are there two pages (page 1, page 2)? Can you tell me where this all should go?
The different pages (popup.htm, and page1.htm) are just examples. You can use any page name you want. When you create a hyperlink in FrontPage, instead of pointing to a page the way you normally do, just put this line in and replace pagename.htm with the name of your page: javascript:open_window('pagename.htm') ---------- Who put the self-destruct button THERE?!
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 12/29/2001 17:27:27
Wow! It works! Your genius and patience are exemplary. The little windows pop up just fine. Now, there are two new questions: 1. How do I put content into the windows? Can you give me a bit of code and show me where it goes? Can you also tell me how to make a "Close this Window" button? 2. I can see little boxes at the bottom of the pages where the popup boxes are available. You can see an example at the bottom of this page: http://www.thewebsitedoctor.com/Marketing.htm Does this have to do with where I placed the code? I put it smack before the </body> tag. Yo can click the boxes and they open the popup pages as well. I do not want them there. Thanks, Garfield
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 12/31/2001 14:39:22
I figured out the little alien boxes and got rid of them. Still don't know where to place message text.
|
|
|
|
ginnie
Posts: 527 From: St. Louis MO USA Status: offline
|
RE: Making popup pages - 12/31/2001 14:56:30
>>Still don't know where to place message text. Open the files that you created such as page1.html (or whatever you named it) and edit it like you would any other. >>Can you also tell me how to make a "Close this Window" button? <form> <input type="button" value="Close Window" onClick="window.close()"> </form> ginnie Global Presence Web Design
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 12/31/2001 15:08:46
Ooops. Forgot the pages. Thanks.
|
|
|
|
April Showers
Posts: 5 Joined: 1/1/2002 From: Status: offline
|
RE: Making popup pages - 1/1/2002 6:41:41
I was just nosin around and I am sure you found a solution or so, however, if you are using front page 2002 (not sure about the older versions) all you have to do is click on your hyperlink properties from the (Normal View Screen) then target frame then click on (new window) or type in (_blank) be sure to add that _ in... Anyhow, that is the easiest way if you ask me... This is the html code gernerator I use to get some of my links to open in a new window. If your more interested in having a smaller size window and such, java scripts are your best source, even though I avoid using java and try to stick with html for downloading reasons. April Showers
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 1/1/2002 14:54:11
Well, thanks. I spent some time yesterday creating and linking up new windows, but if I cna save download time, I will definitely do this!
|
|
|
|
puiwaihin
Posts: 1378 From: Taiwan Status: offline
|
RE: Making popup pages - 1/2/2002 17:21:36
The amount of download time saved is negligible, but if you don't really care where the window opens or what size it is, just targeting a new window is much easier. The real benefit of the code you were given is that it gives you complete control. ---------- Who put the self-destruct button THERE?!
|
|
|
|
WebDoc
Posts: 23 From: Bunaby, British Columbia Canada Status: offline
|
RE: Making popup pages - 1/2/2002 17:31:29
Thanks for all who posted. This really helped me out. You guys are great.
|
|
|
|
bahamut
Posts: 1 Joined: 12/11/2003 Status: offline
|
RE: Making popup pages - 12/11/2003 4:56:19
i tried the code above (the _blank one) and i was wondering if there was a way for the popup to have the adressbar ect hidden on the popup.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|