aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Problem loading static content from webserver using Dojo's Tab Container Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem loading static content from webserver using Dojo Watch "Problem loading static content from webserver using Dojo New topic
Author

Problem loading static content from webserver using Dojo's Tab Container

Srimoyee Misra
Greenhorn

Joined: Apr 01, 2010
Posts: 6
Hii All,

I have created my JSP with some functionalities written in Dojo for displaying a tabbed page and with click of every tab appropriate page needs to show up. All the html pages are stored in the webserver and needs to get loaded from there.I have made use of dijit.TabContainer and dijit.Contentpane. In contentpane we can make use of href to point to htmls in the same domain so when i put var page2 = new dijit.layout.ContentPane({title :"B",href :"Tree.html"}); it works but when i do something like var page1 = new dijit.layout.ContentPane({title :"A",setHref :"http://2k3-ws-rsc/root/cm/data/CPT0001.html"}) it doesnt. Please find my code below :


Can someone please help.

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I am betting you can not do it because of Cross Domain security. JavaScript can only read content from the same domain.

If it is on another domain, you would have to use a proxy on the server.


Note: Not many people hang around here that use Dojo so you may want to post this on the Dojo message boards if you have not done so already.

Eric
Srimoyee Misra
Greenhorn

Joined: Apr 01, 2010
Posts: 6
Hi,

There is something call as a cross domain Dojo as per this document : http://www.dojotoolkit.org/reference-guide/quickstart/cross-domain.html#usage-example

I just found it on the net, so is it not possible to do it by using cross domain dojo??

Can this problem be solved using Jquery instead??

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
CDN is different than what I am talking about. All that is saying is you can load the JavaScript files from a shared resource on the web.

Eric
 
Don't get me started about those stupid light bulbs.
 
subject: Problem loading static content from webserver using Dojo's Tab Container