Talk About Network

Google





Software > Macromedia Dreamweaver > OT: JavaScript ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 98346 of 99640
Post > Topic >>

OT: JavaScript Remote Control Question

by David Blomstrom <webforumsuser@[EMAIL PROTECTED] > Nov 17, 2008 at 08:36 PM

I have a website/CMS - "MySite" - with a World section at MySite/World. 
On that page is an index of continents and oceans, each one linked to a 
JavaScript pop-up windows that features links to each continent/ocean's 
"children" (nations, states, etc.).

Each pop-up features the following JavaSript:

<td style="background: #fcc;">&#8226; <a href="javascript:;" 
onclick="opener.location='/World/Canada/'">Canada</a></td>

It functions as sort of a remote control. Click on the link and the 
pop-up remains unchanged, while the main page - MySite/World - is 
forwarded to MySite/World/Canada.

I just learned that the following code accomplishes the same thing:

<input type="button" onClick="window.opener.location='/World/Canada/'">

(Is there a significant difference? In other words, is one code better 
than the other?)

Now imagine a second website - MySite2 - that features an identical 
World page at MySite2/World. The JavaScript pop-ups aren't just 
identical - they're the same. There's just one set of JavaScript pop-ups 
- on MySite. The World pages on several other web sites are linked to 
these same pop-ups.

The problem is that they don't work cross website; click on a link and 
nothing happens. I changed the link from /World/Canada to 
http://MySite2/World/Canada,
but it didn't fix anything.

I'm confused, because I could have sworn it did work cross-site at one 
time, and I can't figure out what I did to mess it up.

The obvious solution is to copy a set of pop-up windows to each website. 
However, I hate to duplicate all those files if I can make a single set 
work. Can anyone tell me how to make a JavaScript pop-up window based on 
MySite control a page on MySite2?

Thanks.
 




 4 Posts in Topic:
OT: JavaScript Remote Control Question
David Blomstrom <webfo  2008-11-17 20:36:24 
Re: OT: JavaScript Remote Control Question
Alan <please_dont_mail  2008-11-17 23:42:14 
Re: OT: JavaScript Remote Control Question
David Blomstrom <webfo  2008-11-18 03:54:10 
Re: OT: JavaScript Remote Control Question
David Blomstrom <webfo  2008-11-18 04:07:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 16:45:05 PST 2009.