Click to See Complete Forum and Search --> : Popup windows expanded


amacfarl
10-16-2003, 03:20 PM
Hi,

I would like implement the following functionality into my web site.

1) User Clicks on a link
2) Popup window appears with a list of options
3) User clicks on a option.
4) Popup window closes
5) orginal window changes based on the option selected

I know how to do step 1),2),3),4) but dont know how to do (5)

I have seen this in many site, but unsure how it is done.

Any ideas?
Thanks
Angus

BestZest
10-16-2003, 03:46 PM
In the popup you can use window.opener to reference to the opening window, but I havn't used this much, so I don't know if it will work.

BestZest

Charles
10-16-2003, 04:21 PM
The trick is in making sure that your site still works for the folks who do not use JavaScript and he folks who have blocked pop-ups.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>

<p><a href="test2.html" onclick="window.open(this.href, 'child' , 'height=400,width=300'); return false">Links</a></p>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>

<ul>
<li><a href="http://www.w3.org/TR/REC-html32" onclick="if (window.opener && !window.opener.closed) {window.opener.location = this.href; return false}">HTML 3.2</a></li>
<li><a href="http://www.w3.org/TR/html4/" onclick="if (window.opener && !window.opener.closed) {window.opener.location = this.href; return false}">HTML 4.01</a></li>
</ul>

amacfarl
10-16-2003, 04:55 PM
That is a good point regarding Javascript...

Is there any research done on how many folk do not have javascript activated?

I am selling research service. I just wanted to know what is the risk to force folk to use javascript.

I have seen many sites with, e.g. travel sites... which use javascript.

yours views would be great.