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

frequent rebooting - what can cause this?

Posted by Premier, 07-14-2007, 12:28 AMI have a server that is monitored with a system that...

need help with SEO

Posted by dennis1, 09-10-2008, 08:48 AMthis is a site I'm playing with hxxp://w...

copy sql?

Posted by Calibaba, 01-11-2008, 05:08 PMQuick question. How do I copy an entire mysql sql...

DNS management problems on DirectAdmin

Posted by Narcolog, 06-02-2012, 06:46 PMNeed to add this 2 lines for domain via DirectAdmin...

how to config my domain ???

Posted by hangnguyen, 03-27-2008, 12:50 PMPlease move this post if I posted on wrong box . I...