Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Srimoyee Misra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic