|
| |
|
|
Justjay
Posts: 697 From: Montreal, QC Canada Status: offline
|
What am I missing??? - 2/11/2002 11:48:14
I have to admit that I don't have the patience to read all of the tutorials that are out there...so I wanted to give this a shot... What am I missing with this....I just want a simple link that will open a small popup <a href="javascript:openNewWindow('/info/palm.htm','palm','height=205,width=205,toolbar=no,scrollbars=no')">?</a> Thanks, Justjay http://www.thejehm.net http://www.thejehm.net/tne
|
|
|
|
ginnie
Posts: 527 From: St. Louis MO USA Status: offline
|
RE: What am I missing??? - 2/11/2002 13:28:51
<a href="javascript:void()" onClick="window.open('/info/palm.htm','palm','height=205,width=205,toolbar=no,scrollbars=no')">?</a> ginnie Global Presence Web Design
|
|
|
|
ginnie
Posts: 527 From: St. Louis MO USA Status: offline
|
RE: What am I missing??? - 2/11/2002 13:50:22
. . . but the part up in the head (the function) isn't necessary if you put all of the parameters into the link as done above. Putting a function up in the head is generally used when you have a lot of different links that will be opening up windows and you want to use a variable name for the url. ginnie Global Presence Web Design
|
|
|
|
ginnie
Posts: 527 From: St. Louis MO USA Status: offline
|
RE: What am I missing??? - 2/11/2002 14:17:54
Sorry,I forgot to put the 0 in Javascript:void(0) :( Should be: <a href="javascript:void(0)" onClick="window.open('/info/palm.htm','palm','height=205,width=205,toolbar=no,scrollbars=no')">?</a> I don't think frames should make any difference. ginnie Global Presence Web Design
|
|
|
|
Reflect
Posts: 4769 From: USA Status: offline
|
RE: What am I missing??? - 2/11/2002 16:44:23
Hi, Just wanted to say thank you Ginnie. You just saved me 368b. Using your method I cut out an external JS file. Every little bit helps. Anyway to make the popup window default to center? Played but couldn't figure it out. Brian Work hard, play fair, stay sane
|
|
|
|
puiwaihin
Posts: 1378 From: Taiwan Status: offline
|
RE: What am I missing??? - 2/11/2002 20:54:27
That goes around your hyperlink. If you notice, that's an <a>anchor</a> tag. Put that around where I put anchor just above. Or, you can type: javascript:void(0)" onClick="window.open('/info/palm.htm','palm','height=205,width=205,toolbar=no,scrollbars=no')" Into the hyperlink properties where the URL would normally go. ---------- Who put the self-destruct button THERE?! Edited by - puiwaihin on 02/11/2002 21:00:24
|
|
|
|
ginnie
Posts: 527 From: St. Louis MO USA Status: offline
|
RE: What am I missing??? - 2/12/2002 9:32:50
Brian, If you want it centered, you'll need to use a function to calculate where the center is. If you can get by with all windows being the same size with the same characteristics such as whether it has scrollbars, etc., you could use the following and just change the url in each link: THIS IN THE <HEAD>: <script> <!--Hide function showPopup(url){ var t,l,format; t = (screen.height - 205) / 2; l = (screen.width - 205) / 2; format = 'width=205,height=205,top='+t+',left='+l+',scrollbars=no'; window.open(url,'MyWin',format); } // Stop hiding --> </script> THIS FOR YOUR LINKS: <a href="javascript:showPopup('your url here')">Page Title To Link To</a> That cuts the code down a little, yet still centers it if that's important to you. :) ginnie Global Presence Web Design
|
|
|
|
DarlingBri
Posts: 3123 From: Left of Centre, Cork, Ireland Status: offline
|
RE: What am I missing??? - 2/12/2002 17:46:16
No, it doesn't. Can you publish and show us a URL? --Bri --Bri ----- #!usr/bin/girl
|
|
|
|
PBailey
Posts: 907 From: San Antonio, Texas USA Status: offline
|
RE: What am I missing??? - 2/13/2002 5:59:37
Thanks Bri, I did a couple of pages and put them up. Put some explanation of what I did on the page. Any help appreciated. Paula http:www.baileyconnection.com/testpic
|
|
|
|
Reflect
Posts: 4769 From: USA Status: offline
|
RE: What am I missing??? - 2/13/2002 10:38:05
Hi, Try this. In picture two's link you have... <a href="javascript:void(0)" onClick="window.open ('yukker.htm', Try <a href="javascript:void(0)" onClick="window.open ('yukker.htm' Brian Work hard, play fair, stay sane Edited by - GWJ on 02/13/2002 10:41:30 Edited by - GWJ on 02/13/2002 11:05:45 Edited by - GWJ on 02/13/2002 11:08:44
|
|
|
|
ginnie
Posts: 527 From: St. Louis MO USA Status: offline
|
RE: What am I missing??? - 2/13/2002 12:44:04
Hi Paula, The problem with the second picture is because you have two quotes at the end of the first part of your anchor tag, one using " and the other using & quot; (without the space. I had to put it there so that it wouldn't appear as a regular quote mark) <a href="javascript:void(0)" onClick="window.open ('yukker.htm','yukker','height=300,width=480,toolbar=no,scrollbars=no')""> Picture 1 works as intended. Picture 3 doesn't execute a JavaScript popup. It's just a link to a page with the photo on it. Hope that helps. ginnie Global Presence Web Design Edited by - ginnie on 02/13/2002 12:47:42
|
|
|
|
PBailey
Posts: 907 From: San Antonio, Texas USA Status: offline
|
RE: What am I missing??? - 2/13/2002 17:41:07
Thanks Brian and Ginnie, I have taken out the & quot; ( I found 2, didn't think they should be there) and picture 2 is still not working. Still referring me back to a scripting error reference line 1 before published and just not working when published. Ginnie, what is & quot; and where did it come from when I copied the code over to notepad and then into html? Couldn't find it in my handy dandy reference books. Could you please take another quick look? Thanks. Paula
|
|
|
|
ginnie
Posts: 527 From: St. Louis MO USA Status: offline
|
RE: What am I missing??? - 2/14/2002 12:14:33
Paula, You took out a couple of quote marks that you needed, plus you took out a space that was needed. & quot; (without the space) is the escape code for the quotation mark. (You can use either one). Sorry, I guess I didn't explain that well enough, but I just wanted you to remove the one at the end of the first part of the anchor tag where you had an actual quotation mark AND the escape code for the quotation mark, which actually gave you 2 quotation marks in a row ... causing the error. You can use the escape code or the actual quotation mark, and it will act the same way. The problem is that you had one of each together creating 2 quotes. Does that make sense? Getting the escape codes sometimes happens during the copy and paste, but somehow you ended up with both. When you removed a couple of & quot; (and a space) from the other area towards the beginning of the link for the 2nd picture, where you have: <a href="javascript:void(0)onClick=window.open you need to have a quote after (0) then a space, and a quote before window. Just copy the code that you used for the first picture because that one works fine. Hope that clarifies just a little ... ... and not to confuse you more, but you don't need to include toolbar properties that are set to "no" such as: scrollbars=no. The way it works is that if you set any window properties (such as the height and width), then for anything else to be included you must set it to yes.) Otherwise it assumes "no" (no toolbar, no menu, no scrollbars, etc). I just included it in my original code because I was using the original poster's example. It won't hurt anything but it's not necessary. ginnie Global Presence Web Design Edited by - ginnie on 02/14/2002 12:18:58
|
|
|
|
gijoe
Posts: 3 Joined: 2/14/2002 From: mangawhai northland New Zealand Status: offline
|
RE: What am I missing??? - 2/16/2002 23:02:10
Hi Justjay ,I went to your site and have noticed you use frames what are your views on meta tags and frames, like you i have a web hosting and design business and am considering not using frames anu more to get my customers better ranking on search engines. cheers gijoe
|
|
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
|
|
|