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

Javascript mysteriously stopped working

Community Beginner ,
Oct 05, 2006 Oct 05, 2006

Copy link to clipboard

Copied

I have been using the twisty (from Peter Grainge's site) in my Help topics as part of a Related Topics link. I use the twisty next to the words 'Related Topics', and then create a drop down hot spot of both the image and text. When the user clicks the image or the text, the list of related topics expands and the arrow changes to point down. I have created 17 projects with this in and all is fine. I have a template with this in and always add the down.gif and twisty.js to the baggage files (although the twisty.js does have to be added by editing the rhbag.apj file). I have gone to create another project and the javascript just won't work. I have tried creating a topic with the template and also by manually typing in the extra lines of code needed. The necessary files are in the baggage files but it just won't work. There is no error when you click on 'Related Topics' - you just see the links but no change in the arrow. I have tried importing a topic from a project that does work but this stops working. I have tried renaming a working project to trick it into being another project but this doesn't work either. I am really stuck. Hoping someone can shed some light. Thanks

Views

411

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
Community Expert ,
Oct 07, 2006 Oct 07, 2006

Copy link to clipboard

Copied

Could it be as simple as a relative path issue?

Create another project and try there. Let us know if it works there.

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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
Community Beginner ,
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

Peter

Thanks for your reply. It is true that the project it stopped working in is in when I put some topics in a folder and tried to edit the path (pressumably incorrectly). However, before realising this I tried to copy a working project and the twisty also stopped working in this copy. I am baffled why it should stop working when I hadn't made any changes. I went to your site and downloaded a new copy of the javascript with the images and created a new project. All worked fine. However, if I try to edit the javascript with the names of my images it stops working (maybe I am breaking the javascript without realising). I think I will just rename my images to match your javascript and go with the working project. So, in short I still can't figure why my copy of the javascript stopped working in all cases after the relative path issue as the code still looks the same. However, work pressure means I will have to resist trying to solve the mystery and go with what currently works.
Thanks for your Help and also for your useful Web site.

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
Advisor ,
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

Line breaks (carriage returns) can disable JavaScript.

There may be a more elegant way of testing this possibility, but here's what I do: Copy the JavaScript code into Word and turn on the Show/Hide button to reveal hidden paragraph marks. Remove any line breaks revealed by this process in the TrueCode (do not edit in Word and copy back into RH!).


Good luck,
Leon

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
Community Expert ,
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

LATEST
Maybe you used a filename with a space and no quotes? Maybe you didn't edit the script in the topic to be an exact match? Maybe you missed a reference in the javascript? Or something as Leon has suggested.

You should be able to change the image name but if it ain't broke...
Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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