Nesting javascript content

As with most things mySource, nesting a Javascript file does not work as expected. In fact, there is no sign of the nested content in the source and nothing happens (my .js file contains an alert and document.write). Can this be done?

You can't nest a the contents of a JS file (or any file) using nest content. You need to include the JS file in the contents of your page (using View Source in the WYSIWYG - or better yet a Raw HTML content DIV) and use a keyword to print the URL of the file.


Something like (assuming your JS file is asset 123):

<script type='text/javascript' src='%globals_asset_url:123'></script>

[quote]
You can't nest a the contents of a JS file (or any file) using nest content. You need to include the JS file in the contents of your page (using View Source in the WYSIWYG - or better yet a Raw HTML content DIV) and use a keyword to print the URL of the file.



Something like (assuming your JS file is asset 123):

<script type='text/javascript' src='%globals_asset_url:123'></script>

[/quote]



Thanks Greg.

Thought it might be something like that. Again, this is one of the many things I hate so much about mySource - no indication all that you can't nest js which would seem perfectly sensible (as you can drop any js between script tags into html) and then when viewing the page you don't get an error; the nested content is completely ignored.

If I were not forced to use mySource, I'd go nowhere near it - it's a travesty of a system.

Probably best to keep that opinion to yourself if you would like us to continue to provide the free support we do here.

[quote]
Thanks Greg.

Thought it might be something like that. Again, this is one of the many things I hate so much about mySource - no indication all that you can't nest js which would seem perfectly sensible (as you can drop any js between script tags into html) and then when viewing the page you don't get an error; the nested content is completely ignored.

If I were not forced to use mySource, I'd go nowhere near it - it's a travesty of a system.

[/quote]

Do you really hate Matrix or that you don't know how to?

[quote]
Probably best to keep that opinion to yourself if you would like us to continue to provide the free support we do here.

[/quote]



Way to go Greg!



Not sure why people would come onto the forums to bash Matrix over something so trivial.



I am pretty positive the frustration is from a lack of understanding how to use Matrix. Therefore, they are not realizing how great it really is.

[quote]
Do you really hate Matrix or that you don't know how to?

[/quote]



Oh I know how and I really hate mySource. From buggy Java to the worst html editor on the planet what good is there to say about it? All the competent web people I know think it is crap.

We have clients and roll-your-own community members who do not share your opinion.
Please keep the discussion on the Forum constructive. We have professional support services and public Bug Tracker for reporting of specific issues.



The original Matrix HTML content question has been answered. This thread is now closed.

Party pooper :slight_smile: Was just getting interesting.