Portlet Factory, Version 6.1.2


 

Modifying imported JavaScript

When you import a page, you usually want to work with the HTML. However, many of the pages you import will also contain JavaScript that is imported along with the HTML. There is a handy way to rid yourself of unwanted JavaScript that comes with the HTML on an imported page. For example, if an input tag has an onChange=some JavaScript associated with it, you will be unable to add a HTML Event Action builder to this control. The solution is to create a property setter and set theonChange= "(Make an empty assignment)." Next, create the HTML Event Action builder.

The original value for onChange is replaced by the property setter, and the HTML Event Action builder can now create a fresh onChange event overriding the original JavaScript.

Parent topic: Imported Page builder


Library | Support |