Jump to content
xisto Community
Sign in to follow this  
szupie

External XUL Files How to include them inside a main XUL files

Recommended Posts

I'm creating an XUL page that contains many sections. To keep the coding looking clean, I decided to separate them into different files. I used iframes to do this.

However, when I use an iframe, the external XUL files all have to have their own doc-type, style-sheets, all those other declarations, and worst of all, their own JavaScript files. The JavaScript functions in the different XUL files are not carried over to the main XUL file, which means they cannot interact with each other.

 

So, is there any other way to include external XUL files? The main requirement I'm looking for is that their JavaScript codes should be able to interact with each other.

Share this post


Link to post
Share on other sites

I don't know if this will work, but you could try using the php include() function.

<? include("pagename.xul"); ?>

Then, in the XUL page, declare what javascript file you're using.

Share this post


Link to post
Share on other sites

Actually, I can't use PHP for the pages I'm making. It won't be hosted on my server. I can only JavaScript and XUL.But if I could use PHP, I would have done what you suggested too.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.