Hello everyone,

First, thanks for all the help througout these last few months, I've learned quite a lot from this forum and I always recommend to people starting with php to come here.

Ok, so this is what I'm trying to do.

I have a setup like this: top bar with top menu's, below that, a dynamic body

So when you click on any of the top buttons, the body changes depending on what you click on.

One of the bodies has 6 buttons on the side and a main text div on the right.

When a user clicks on any of these buttons, dyanamic content gets loaded to the right.

Ok... NOW, that was the viewer side of the website. There's now an editor side.
Basically a CMS system to edit the dynamic content.

I used wysiwyg, which is an open source browser text editor.

They way I structured this was:

1: Top menu page that used php include to get the dynamic body

2: dynamic body page that used php include to get text area

3: text area contains wysiwyg editor

Here lies my problem: If you access the last php file with the wysiwyg editor, it shows up fine with the editor.

But if you try to view the main page, which grabs all these child files, it doesn't show the editor, but just a plain textarea.

For the wysiwyg editor to work, you have to include the script, wysiwyg.js, somewhere on the page your using it.

So I put it at the top of the text area page, but I'm guessing when it eventually gets accessed by the main page through php's includes and ajax, it doesn't load the wysiwyg.js file.

I tried including it in the main php file to see if it worked, nothing.

The statement I used:

<script src="Includes/wysiwyg.js"  language="JavaScript" 
type="text/javascript"></script>

And I changed around the script src path accordingly to match it's location from the different directories, so that's not the problem.

Anyone know how I could get this to work? It seems to be just a problem accessing the js file from the last page to the main page.

Thanks again. Sorry for the long post.

    Write a Reply...