JQueryUI Dialogs ... Seperate javascript file in each?

Posted by matt2kjones, 02-12-2011, 02:32 PM
Hey guys, I'm writing a webapp for a project of ours. It does ajax calls to download and display "web applications". These web applications then use JQueryUI to display widgets and so on. Each web app is stored in a div... then each dialog and such the webapp has... is a child object of that parent div. Now... here is my problem... I want javascript and css to be private to each web application aka... div. How can I do this? I think the only way is to do it with an iframe. Put all the html, javascript and css which makes up the webapp into an iframe... then it is private to just that iframe. Any other ideas?

Posted by jeremyhaber, 02-13-2011, 03:05 PM
This is somewhat possible. It's all in the way you program it. You shouldn't need iframes for this. I have recently taken a turn in the way I do javascript. Complex projects will now use a core-sandbox-module system. Essentially it is the javascript equivalent to OOP. As shown in this tutorial: http://net.tutsplus.com/tutorials/ja...-architecture/ As well for a bit of a better understanding of OOP in javascript: http://net.tutsplus.com/tutorials/ja...ed-javascript/ What this all does is allows you to build specific parts of your application in javascript without relying on other aspects of your code. This allows you to include that module on any page you want without it breaking! Hope that helps.

Was this answer helpful?

 Print this Article

Also Read

SNMP Monitoring

Posted by g3tech, 08-27-2003, 10:23 PMHello, Was just wondering what you guys out there use to...

Question for PayPal programmer expert!

Posted by pronet-hq, 09-11-2008, 11:30 AMI am creating a website that allows sellers to offer...

Urgent problem: too much traffic, how to stop it?

Posted by fgalli, 05-04-2007, 09:33 AMHi, i've a vps with iptables, but i've too much traffic...

open_basedir off ?

Posted by travelmate2501, 04-20-2009, 09:32 AMHi ! I have dedicated server and my panel is...

/home/ privacy

Posted by Weedy, 04-14-2009, 09:19 AMHow do I keep users from spying on each others files? If I...