Cleaning up old script in RH code--InitEffects...x-on-pageload

Engaged ,
Feb 05, 2016

Copy link to clipboard

Copied

I am upgrading help projects from RH9 to RH2015, and have come across some topics that include old script code in them. It's causing errors in IE. In its simplest form the code looks like this:

temp_RH initeffects code.png

Is there an easy to clean this up? Something similar to Tools > Update DHTML, perhaps? If I have to, I'll write a script to clean this up, but most instances are not laid out quite this simply, so i was kind of hoping for a canned solution.

Suggestions welcome. Thanks.

G

As suggested, I also use scripts to fix this up. I normally get the contents of the token (token.name) and do a test: if(token.name.indexOf("x-on-pageload") != -1) to check whether the conditions are met. If you identify two or three keywords that are unique, you can quickly remove the content. - Just my two cents.

TOPICS
WebHelp

Views

351

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Cleaning up old script in RH code--InitEffects...x-on-pageload

Engaged ,
Feb 05, 2016

Copy link to clipboard

Copied

I am upgrading help projects from RH9 to RH2015, and have come across some topics that include old script code in them. It's causing errors in IE. In its simplest form the code looks like this:

temp_RH initeffects code.png

Is there an easy to clean this up? Something similar to Tools > Update DHTML, perhaps? If I have to, I'll write a script to clean this up, but most instances are not laid out quite this simply, so i was kind of hoping for a canned solution.

Suggestions welcome. Thanks.

G

As suggested, I also use scripts to fix this up. I normally get the contents of the token (token.name) and do a test: if(token.name.indexOf("x-on-pageload") != -1) to check whether the conditions are met. If you identify two or three keywords that are unique, you can quickly remove the content. - Just my two cents.

TOPICS
WebHelp

Views

352

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 05, 2016 0
Adobe Community Professional ,
Feb 06, 2016

Copy link to clipboard

Copied

The only other solution that I can think of is something like Text Crawler.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2016 0
Engaged ,
Feb 08, 2016

Copy link to clipboard

Copied

No out-of-the-box answer for me, then. Thanks, Peter.

G

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 08, 2016 0
LEGEND ,
Feb 09, 2016

Copy link to clipboard

Copied

As suggested, I also use scripts to fix this up. I normally get the contents of the token (token.name) and do a test: if(token.name.indexOf("x-on-pageload") != -1) to check whether the conditions are met. If you identify two or three keywords that are unique, you can quickly remove the content. - Just my two cents.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2016 0
Engaged ,
Feb 09, 2016

Copy link to clipboard

Copied

Thanks, Willam. That's more or less what I just did. Some of our help projects have some really...interesting...old artifacts in them.

Cheers,

G

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 09, 2016 0