Pop Up Windows

They have: 372 posts

Joined: Dec 1998

Hello,

I am not sure if this is possible, haven't found someone that knows the answer, do you???

When you setup a pop up window to come up when you click on a link. Is it possible to have a list of features for example in that pop up window and when you click on one of the links that point to that pop up window, it will scroll down to the related contetnt of that particular link.

I tried using this code:

This on the "link" coding:
This is the "example" page coding:

However, that didn't work. Do you know what I''m doing wrong?

Thanks for your time!

Curtis Stevens

Curtis Stevens
Simple Solutions - Web Hosting Made Simple!
Got Merchant Account? - Free online merchant guide to accepting credit cards!

They have: 372 posts

Joined: Dec 1998

Oh, sorry, those need to be the same, I just stole them off of a site, to show an example.

It doesn't work when they are the same, sorry for the confussion.

Curtis

Curtis Stevens
Simple Solutions - Web Hosting Made Simple!
Got Merchant Account? - Free online merchant guide to accepting credit cards!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

if this works, it should go to my post above...
http://www.webmaster-forums.com/showthread.php?threadid=12803#post74102

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

it works for me....

can we see your code?

They have: 372 posts

Joined: Dec 1998

Ok, this is what I have.

The Script part, in the header:

<script LANGUAGE="JavaScript">
function launchemail()
{ msgWindow=window.open("html/email.shtml","email",
"width=425,height=400,status=no,toolbar=no,scrollbars=yes,menubar=no,location=no");
}
</script>

The part I have for the actually link:

Unlimited Email Aliases

The part I have that is on the email.shtml page that is suppose to come up:

Nothing, know why?

Thanks for all of your help, I think this is a real doosie.

Curtis

Curtis Stevens
Simple Solutions - Web Hosting Made Simple!
Got Merchant Account? - Free online merchant guide to accepting credit cards!

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

http://www.zerocattle.com/examples/popUp.html is a full pop-up window script (I think Vinny has one, too).

However, in your case...

<script language="JavaScript" type="text/javascript">
function launchemail()
{ msgWindow=window.open("html/email.shtml#1","email",
"width=425,height=400,status=no,toolbar=no,scrollbars=yes,menubar=no,location=no");
}
</script>

Unlimited Email Aliases

See? The target for the url has to be in the JavaScript function, not in the HTML. (You also have an extra closing font tag).

Ideally, for a nice degrading script, you would have the function in the tags, but even as you have it here, it would be nicer if in the tag you have this:

Unlimited Email Aliases

Which would make the page viewable for those with JavaScript turned off, et cetera.

Smiling Suzanne

They have: 372 posts

Joined: Dec 1998

Hey Suzanne!

Thanks for the help.

I changed it to this:

<script language="JavaScript" type="text/javascript">
function launchemail()
{ msgWindow=window.open("html/email.shtml#1","email",
"width=425,height=400,status=no,toolbar=no,scrollbars=yes,menubar=no,location=no");
}
</script>

This worked, however, having like several of these just for one html page isn't good right? I will have like 5 times as man of these on my html document if I did this. (Already have 12) Wouldn't this slow down the download time and hog it down?

Also, this:

Unlimited Email Aliases

Is by passing the pop up window script because it stays in the same window, which I don't want.

Thanks!!!!

Curtis

Curtis Stevens
Simple Solutions - Web Hosting Made Simple!
Got Merchant Account? - Free online merchant guide to accepting credit cards!

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

What you ideally want is the function in the tags:

(from my page linked above):

<script language="JavaScript" type="text/javascript">

</script>

And in the HTML, you would have this for each link:

whatever you call the link

Subsequent links would look like this:

whatever you call the link

whatever you call the link

If you change the name of the new window ('email' currently) you will have a bunch of new windows. If you leave it the same, you will have all the files opening in a new window.

http://www.netmarketing.org/about.htm -- check out the committee members, lower right of the page. One new window for all board members, and the committee members are all on one page and open to the target. One function.

I'm sorry the other one didn't work, I didn't think about the function you had not having the cancellation of the link. The function above will kill the href if JavaScript is enabled, otherwise if no JavaScript, people still get the page.

Smiling Suzanne

They have: 372 posts

Joined: Dec 1998

Hey,

Thanks for all of your help, you are so helpful!!!!

Few questions.

On this: type="text/javascript" where is this? Is this just standard on all browsers and is in the customer's folders where their browser is stored at???

Is there a lot of ways to use Java Scripts to make pop up windows? Is this the most common way that works with all browsers, such as AOL, etc.. This one is so much easier!

So is this all I need?

In the header:

<script language="JavaScript" type="text/javascript">

</script>

In the html coding:

whatever you call the link

Is that all I need or is their some scripting missing? It works on my IE 5.0 browser.

This is so cool, MUCH easier.

Last question. The 'email' in the above coding in the html place, why is that their? Don't I need some scripting to tell the browser that name "email" is associated with that html document. How does it know, and how does it work?

Thanks!!!! Smiling

Curtis

Curtis Stevens
Simple Solutions - Web Hosting Made Simple!
Got Merchant Account? - Free online merchant guide to accepting credit cards!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

the 'email' is built in.
window.open() is a standard JavaScript function. You just pass it the URL of the page to open, the name of the window, and any properties the window should have.

If you don't want your current window to go anywhere use this:

<a nohref style="cursor: hand" onClick="window.open('test.html', 'email', 'width = 425,height = 400,scrollbars = yes')">whatever you call the link</a>
'
If you use this code, you don't need the stuff in the header.

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 372 posts

Joined: Dec 1998

Neither one of these java scripts work in Netscape 3.0 or up.

Grrrrr.

Curtis

They have: 372 posts

Joined: Dec 1998

oooooh, I found the problem.

Regarding Netscape browsers:

TEST

DOESN'T WORK.

whatever you call the link

DOES WORK. The spaces between the = and the features screws it up.

Hmmmm, you might want to know this Suzanne. You also might want to notify the client you referred me to, they have it messed up too!

Curtis

Curtis Stevens
Simple Solutions - Web Hosting Made Simple!
Got Merchant Account? - Free online merchant guide to accepting credit cards!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

then use this:

TEST

2 benefits:
1) don't need anything else in the header
2) I like it better Smiling

They have: 372 posts

Joined: Dec 1998

That doesn't work in Netscape 3.0 and up. The link isn't clickable.

Curtis

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

It works in Netscape 4.7, not in Netscape 6, apparently. JavaScript used to allow spaces around the equals sign, but if it works without spaces, I'll remove them so it works in everything, thanks!

And glad it's working for you.

Laughing out loud Suzanne

They have: 372 posts

Joined: Dec 1998

Hey,

I don't think it works in 4.5 either.

On this coding in html:

Five OC3s (155Mbs each)

Do you have to use 'email' in there where "NET" is? Why? And how come that one works but nothing else?

Thanks
Curtis

Curtis Stevens
Simple Solutions - Web Hosting Made Simple!
Got Merchant Account? - Free online merchant guide to accepting credit cards!

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

You would have the answer to that question, sir!

The variables that go to the standard function, window.open, are as follows:

url -- 'html/page.html'
name of new window -- 'net'
properties of new window -- 'width=xxx,height=xxx'

There can be NO spaces between the commas within the properties section, but there can be spaces around the equal sign. Usually. I will have to check for Netscape 6.

For the others that aren't working, you will need to troubleshoot the following things:

1. Spaces in the JavaScript -- making sure there aren't any is usually the safest unless you really know what you are doing, but sometimes different browsers screw you up anyway.

2. Make sure the is in place. Netscape 6 apparently wants there to be nothing in that tag.

3. Validate your HTML -- I use http://www.htmlvalidator.com pro, but you can use the free validation service at http://www.w3c.org with the same results.

4. Post the url to the page and let us walk through it and troubleshoot for you.

Smiling Suzanne

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.