Menu sits on a different domain...

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mraspiller
Beginner
Beginner
Posts: 1
Joined: Mon Oct 27, 2003 10:20 pm

Menu sits on a different domain...

Post by mraspiller »

Can I have my Milonic DHTML menu on one domain & still reference it from another domain?

If so, how do I do this...simply putting an absolute path to the .js files doesn't work, & I can't make the references to each menu item absolute, they have to stay relative...

Is this even possible?

Thanks in advance!
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

mraspiller wrote:Can I have my Milonic DHTML menu on one domain & still reference it from another domain?
What do you mean by "reference it". You mean load the .js script files, or do you mean run menu functions across domains?


Off the top of my head... I suppose you could load the menu scripts from another domain, as long as security settings don't prevent it. But then again, doing so would cause the page to load more slowly. However, I'm not sure about this:
...simply putting an absolute path to the .js files doesn't work, & I can't make the references to each menu item absolute, they have to stay relative...
I can't imagine how you'd access any type of file across domains without specifying the source domain. How could one achieve a relative path to a different domain?

There's also the practical matter of licensing to consider: the menu license is per domain.

If you're talking about running functions across domains, that's another story. Suppose, for example, that you have two frames, each containing a document from different domains. Maybe you'd like to have a menu in one frame open a submenu in the other frame. Or maybe you'd like to have a menu selection in one frame cause something to happen in the other. Since the two frames display documents from doffernet domains, you'll normally get a security violation error and it won't work. This isn't a menu issue, it's a security issue. Under normal circumstances, you can't have a script in one domain control behavior in another domain, unless you take steps to circumvent the normal security restrictions. I suppose you could do something with trusted domains at the servers. Some browsers also let you establish trusted domains so that you can do this type of thing, but that'd only work if you have control over the workstations accessing the site (e.g., an intranet).

I'm no expert on security, but that's my take, for what it's worth.

Kevin
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You'll run into a problem with licensing if you do. You would need a license for each domain running the menu.
John
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

If it makes you feel any better Kev, I agree with you, there will be security implications if you call javascripts across domains. Just thought I would let ya know so you you know either you're security smarts aren't that bad, or we both shouldn't read up alittle more on the subject.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply