It is possible to use an absolute path when specifying where the external HTML file of your menu is located in (on your server). The trick is to dynamically construct the hostname portion of the URL so it reflects the hostname of the current page, for example:
Code:
ddsmoothmenu.init({
mainmenuid: "smoothmenu-ajax",
//customtheme: ["#1c5a80", "#18374a"], //override default menu CSS background values? Uncomment: ["normal_background", "hover_background"]
contentsource: ["smoothcontainer", "http://"+window.location.hostname+"/somedir/smoothmenu.htm"] //"markup" or ["container_id", "path_to_menu_file"]
})
This works because Ajax treats "http://dynamicdrive.com" and "http://www.dynamicdrive.com" as separate domains. If you hardcode the hostname within the URL and the user is viewing your page using the alternate alias, an Ajax security error pops up. By dynamically constructing the hostname portion based on the URL of the current page, this problem is bypassed.
Bookmarks