"Active content" is just a term I made up, as I said it's pages with
"HTML _and_ JavaScript", mixed together. Loading in things via AJAX is
a very different environment to the usual "load a page in the browser,
run the JavaScript" scenario. Many scripts aren't built to cope with
this.

If you need to load in a WYSIWYG then load the script into the page
(you could use $.getScript()) and then "apply" the editor two the
various fields you need to be WYSIWYGified.

If you want to make the pages publicly accessible (which is quite
reasonable), I suggest you "cut down" the pages to the smallest size
you can, while keeping them in their "not working" state. Basically
just publish a version of the pages that don't work, without all the
other stuff (and without anything that's not supposed to be public).
Kind of like a "unit test".

Of course this is also a good way of debugging code, and usually
quickly shows you what's actually causing the problem.

Karl Rudd

On Fri, May 16, 2008 at 10:55 AM, hubbs <[EMAIL PROTECTED]> wrote:
>
> Hi Karl,
>
> Can you explain what you mean by "active" content.  And what you meant
> by loading in the js and html seperatly?  I am not sure how this would
> be possible with a WYSIWYG editor that is heavy on js.  I have an
> example, but I don't really want to publicly post the URL.
>
>> My advice is don't use AJAX to bring in pages of "active" content,
>> that is HTML _and_ JavaScript. There's lot's of issues you'll have to
>> deal with and it's usually easier to load HTML and JavaScript content
>> in separately.
>>
>> Karl Rudd
>>
>> On Fri, May 16, 2008 at 9:56 AM, hubbs <[EMAIL PROTECTED]> wrote:
>>
>> > I am using the jQuery ajax function using GET to load data into a
>> > div.  Part of the page contains a WYSIWYG editor, which contains alot
>> > of javascript code.  When I try to load that page, it starts to load
>> > it, but then basically refreshes the page, and just sits there and
>> > tries to load something.
>>
>> > So, my question is, what kind of javascript would screw up when loaded
>> > using ajax, or innerHTML?  Are there some known parts of javascript
>> > that cannot be brought in through ajax?  I am just trying to debug
>> > this, and it is a huge pain.
>

Reply via email to