Skip to main content
Inspiring
December 4, 2009
Question

Dropdown menu removes TOC when loading PDF

  • December 4, 2009
  • 3 replies
  • 741 views

RH8 HTML

Hi all,

I've added a drop-down menu to my webhelp project with a list of PDFs.

The user selects the PDF from the drop down menu and click Go.

This loads the PDF, and it works fine.

The only thing is the TOC is gone when the PDF loads in a browser, this happens in IE, FF and Chrome.

The Index, Content, and Glossary buttons are present (all top navigation) but noe respond to clicks.

If I create a plain html link to the same PDF(s) it loads within the topic pane and all other TOC navigation remains and works.

Any ideas? This is the HTML code for the menu.

<form name="myForm" action="" style="width: 305px;">
<select name="jumpTo" class="SmallText" size="1" style="width: 190px;">
<option selected="selected">Select version...</option>
<option value="../36.pdf">Doc 36</option>
<option value="../35.pdf">Doc 35</option>
<option value="../34.pdf">Doc 34</option>
</select>&#160;<input type="submit" value="View" class="SmallFormField" onclick="parent.document.location.href = myForm.jumpTo[myForm.jumpTo.selectedIndex].value; return false"
     style="width: 57px;" />
</form>

This topic has been closed for replies.

3 replies

Nick27Author
Inspiring
December 7, 2009

what can I say....my knowledge of JS is terrible.

much cleaner solution, thank you.

Willam van Weelden
Inspiring
December 7, 2009

Haha,

It's good that Rick's around. I thought you embedded the from in the button toolbar itself (whskin_tbars.htm)

Greet,

Willam

Nick27Author
Inspiring
December 7, 2009

Success!

I got it working, I had to remove the [1] tag where it said frame[1] in the new code that you sent me Willam. Now it loads the pdf inside the topic pane perfectly.

so the code looks like this.

<form name="myForm" action="" style="width: 305px;">
<select name="jumpTo" class="SmallText" size="1" style="width: 190px;">
<option selected="selected">Select version...</option>
<option value="../36.pdf">Doc 36</option>
<option value="../35.pdf">Doc 35</option>
<option value="../34.pdf">Doc 34</option>
</select>

<input type="submit" value="View" class="SmallFormField" onclick="parent.frames.bsscright.document.location.href = myForm.jumpTo[myForm.jumpTo.selectedIndex].value; return false" style="width: 57px;" />
</form>

Very pleased with this. Thanks for the help.

Captiv8r
Legend
December 7, 2009

Hi Nick

I'm a bit puzzled with this thread. Why? Well, you seem to be desiring to reference a PDF.Normally this is quite straightforward.

What seems to be missing here is some background of exactly where this code lives. Are you inserting it in the main WebHelp Toolbar or just inside another topic? If it's just inside another topic, what is the reason for all the deducing of the frame? I mean, if you are already inside the frame where you will ultimately display the PDF, why doesn't the code simply look like this:

onclick="document.location.href = myForm.jumpTo[myForm.jumpTo.selectedIndex].value

Cheers... Rick

Helpful and Handy Links

RoboHelp Wish Form/Bug Reporting Form

Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!

Adobe Certified RoboHelp HTML Training

SorcerStone Blog

RoboHelp eBooks

Willam van Weelden
Inspiring
December 4, 2009

Hi,

Try parent.frames[1].bsscright.document.location.href instead of parent.document.location.href

It works for Print buttons so it'll probably work for other uses as well, see: http://forums.adobe.com/thread/521408?tstart=0

Greet,

Willam

Nick27Author
Inspiring
December 4, 2009

no such luck, just reset the dropdown menu to the default option and doenst load anything....ill keep looking online for an answer......would love to get this working.

Willam van Weelden
Inspiring
December 4, 2009

Can you post a small example project so we can play around with it?

Greet,

Willam