• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Placing information before ".htm" using Java "location.href"

Explorer ,
Feb 01, 2007 Feb 01, 2007

Copy link to clipboard

Copied

Or it could be that I'm going about this wrong.

I'm setting up a testing environment, and am looking to get the emails pointing in the right direction, but from the production files. The user clicks the "email" link in the topic, and the result from

var mailBody = 'File Location: ' + location.href;

returns

File Location: ///file/HelpServer/Topic34.htm

in the email. With our testing, what I'm wanting is to have the result be

File Location: ///file/HelpServer/Topic34test.htm

So is there a way to modify the above code to get the word "test" in there before the ".htm"? I've been messing with the \b and $08 codes for backspace, but those just return small squares in the email.

Any ideas?

Views

317

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
community guidelines
Contributor ,
Feb 04, 2007 Feb 04, 2007

Copy link to clipboard

Copied

ClubHans -

You need to grab the current page href, parse it, and insert your new text before the extension. Try this inside your script;


Votes

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
community guidelines
Explorer ,
Feb 05, 2007 Feb 05, 2007

Copy link to clipboard

Copied

LATEST
Thanks, Roger, that worked great!

Votes

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
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp