Javascript extensions

I found very wonderful instructions on how to create/ deploy Java Extensions. Are there any similar instructions if I want to create a JavaScript extension?

Also are there any JavaScript extension written as part of the PSO Toolkit that I can use as sample to model my Javascript extensions?


I saw a sample JavaScript Extension: sys_setSecurityInfo under the System view of the workbench.

However, when I go to Content Design view, this extension doesnot shows up under any of the 5 tabs (Input Transform, Output Transform, Validations, Preprocessing, Post Processing)of the properties page of a Content type.

Or am I looking under the wrong place, and it should be available/ configured somewhere else. I need to somehow be able to have it invoked on creation of the content item.


JavaScript extensions haven’t been used for years. They were used in the XML server that originally underlay the Rhythmyx CMS. They still exist for backward-compatibility.

What is it you want to do with JavaScript? Is there a reason you can’t do it with Java?


Thanks Johnson for your response.

When a creates a content item that has a field for an external URL, one of our requirement is to validate that the URL exists or not.

For that, we were thinking to launch the browser with the entered URL, and validate to the user whether that URL exists or not.

I was thinking to use the Javascript code to launch the browser with the entered URL.


There’s no way a JavaScript extension could have done this, that’s not what they were originally intended for.

To accomplish this will require you to write a Validation extension in Java. This can be an “item” validation, which means that it executes when the content item is approved in the workflow, or a field validation which means that it executes when the content item is saved (with the insert or update button).

The Java code that you have to write is not that complicated, but it’s considerably different between the 2 cases.


The requirement is to launch the web browser with the URL entered by the user in the title field. Since extensions are server side code, is there any way to launch the browser with the url from the Java extensions?

Or is there any other better way to meet this requirement. IF the user entered a non existent URL, we need to somehow give the user a warning that the URL they entered is NOT EXISTENT but at the same allow them to continue further if they choose to.

I am not sure at what point you want to launch the browser? On form submit? how do you check in javascript whether the browser is launched with that web page or not.
If you are thinking of providing a button to launch the browser by the contibutor to check whether he added a right URL or not, then you have to create a custom control that does that for you.
You can also add the Jquery URL validator, and may be some AJAX call to validate the existance of the webpage. (I have not explored this part though)