close a popup box with page change

They have: 59 posts

Joined: Mar 2000

Hi,

I wonder if any of you could take a look at this website and tell me how to modify a particular piece: I put together a newsletter located at http://www.afsaonline.org/Credit2000/ On this newsletter, there is a table of links across the top. If you drag your mouse over the table cell called "News Briefs" you'll get a drop-down menu that includes an item called "Auto Finance Division News." Clicking on "Auto Finance Division News" will bring up a popup box that allows you to choose one of two stories. When you click on the story you want, it changes the page underneath to that story. I want it to also close the popup box when you click on a story. But if I include a close command it closes the box and doesn't change the story underneath. I've also tried the onBlur command but I end up with several open windows. Any ideas?

Phyllis

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

in the popup window itself?

What I would recommend is that you put something in the story page that checks to see if the window you opened (the little choice window) is open, and if it's open, close it.

That will prevent any malfunctioning of the little window, and it shouldn't interfere with the story. Since you opened the window, you can close the window.

Smiling Suzanne

They have: 59 posts

Joined: Mar 2000

Hey Suzanne:

onBlur doesn't work in the body, and it's not exactly what I'm trying to say. Here is what SHOULD (in my opinion) work:

The link inside the popup would be like this:

That actually does work in Explorer but not in Netscape. In Netscape it closes the popup without changing the main frame.

Any ideas?

For checking inside the story to see if the window is open: I'm not sure how that would work since the window isn't actually opened from the frame itself. It's opened from a function in an external JavaScript file. That entire menu is an external JS object. The of the document runs a script called "linksmenu.js" -- here's a plain text copy of that script. You'll see the function "showAutoMenu" at the top of the script. That's what creates the popup.

Phyllis

[Edited by phyllis on Dec. 21, 2000 at 04:12 PM]

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

And as such rarely get into the guts of other people's scripts. I'm just letting you know so it doesn't seem odd that I'm not jumping up to fix the script.

First off though, I don't get any links in Netscape 6. Nothing. I have no idea what you are talking about. I see them in IE 5, though. Not good that they aren't there in Netscape 6.

With all respect, this seems to be a very complex way of doing things. Could you not have an index of story titles on the page, or a more simple pop-up remote with the list of titles? Since you are dealing with pages within your own site (or under your control, I would recommend you investigate the tutorials at http://www.irt.org ( http://www.zerocattle.com/examples/popUp.html has links to the tutorials and I have compiled the tutorials into a script) for how the "remote" window works.

They also have great tutorials on how to use JavaScript through frames to do the same things.

The navigation, while interesting, is very complex and not intuitive. Once I get to an article, I really don't know how to get back to get another one -- do I have to do the whole process again? Mouse over the link, move down and choose the section, wait for the pop-up and then choose a different story (hopefully not the same one by accident)?

It seems unfriendly.

Anyway, I hope the pointers help, perhaps Vinny will be able to help?

Smiling Suzanne

They have: 59 posts

Joined: Mar 2000

Okay, nine years later, I'm returning to this topic. Smiling I went out of town for a while and was swamped with other stuff when I got back.

So, in Netscape 6, the drop-down menus don't work at all? That being the case, I'll see if I can find a newer version of the topnavbar script.

The "Auto Finance" division section is the ONLY one that has a pop-up box. The reason it's different is because it will be password-protected (eventually) and that pop-up will be where they enter the password to get into the articles. All other articles are there when you mouse over a section and click on the article title. There is also a Full Table of Contents link under Homepage. That was the best I could manage for organizing this! It's the only way I could think of where every article (except Auto Finance) is available from every page without having to go back to a TOC page.

Does anyone know how to reword this statement:

so that it would work in Netscape also? Maybe that's just a bug in NS (?).

Phyllis

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.