Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking to new IE window to open PDF files...

Status
Not open for further replies.

adaaje

Technical User
May 26, 2006
60
AU
Hi guys,

I've got this part of xml code
Code:
- <Context path="/awn" docBase="../../ANav/Web" debug="0" reloadable="true">
  <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_anav_log." suffix=".txt" timestamp="true" /> 
  </Context>
  <Context path="/pdfboeing737800SRM/" docBase="../../PDF/SRM_R25/" debug="0" /> 
  <Context path="/pdfboeing737800SRM" docBase="../../PDF/SRM_R25" debug="0" /> 
  <Context path="/pdfboeing737800FMSM/" docBase="../../PDF/FMSM_R7/" debug="0" /> 
  <Context path="/pdfboeing737800FMSM" docBase="../../PDF/FMSM_R7" debug="0" /> 
  <Context path="/pdfboeing737800DDG/" docBase="../../PDF/DDG_R11/" debug="0" /> 
  <Context path="/pdfboeing737800DDG" docBase="../../PDF/DDG_R11" debug="0" />

all docbase link to pdf files, and they open pdf files in a new window, but I want it opens in new IE window. So I can have navigation bar in IE window as there's no navigation bar in acrobat reader.

So the question is, is there any command should I add to get all the pdf link open in new IE window ?

and could you guys let me know where exactly or which line should I put that command line to ?

Thx guys, greatly appreciated.
 
How to specifically request the system to open it in internet explorer in these particular circumstances rather than ordinarily (default) using acrobat reader, I don't know. But, if the system is set to open by default .pdf in internet explorer, the behaviour will be what you've requested.

To configuer the system to open by default in ie, it is the settings in the registry. Through wizzard, you can make it through the explorer's tools | folder optins | file types... and edit the pdf file type with the line like:
[tt]"c:\...\iexplorer.exe" "%1"[/tt]
and then set it to be the default action.

That would make .pdf open by double-click or default to be in the iexplore window with acrobat reader embedded within it.

If you want xml setting to get that functionality for that particular case only in tomcat or whatever application, then I don't know.
 
Amendment
iexplorer.exe should of course be read iexplore.exe
 
Thx for your input tsuji,

much appreciated.
 
Hi tsuji,

I did what you suggested me. to open pdf files from normal folder, yes it's working and IE is embedded.

But when I access through the link. the pdf files open still using acrobat reader??

have any more idea ?
 
Hi tsuji,

Could you please have a look this code :
Code:
AWACCESS="../../../pdfboeing737800FMSM/CHAPTERLIST_FMSM.PDF" AWDOC="" AWTARGET="FLOAT" AWTITLE="FMSM (Revision number=07 ,Revision Date=Oct 10/05)" AWENCL="" AWTYPE="url" AWACTIVATE="normal">FMSM (Revision number=07 ,Revision Date=Oct 10/05)</A><BR/><IMG CLASS="AWNDECO" src="../images/awn/cat_url.gif" align="absmiddle"/><A class="clsCatLink" HREF="#" onclick="return awlink(this)" AWSCOPE="lig" AWMODE="manual"

Can we change the {onclick="return awlink(this)"} to a new window ?? like in html (target = "_new") ??

What do you suggestion ??

 
Try put a target attribute to the anchor?
[tt]
<A class="clsCatLink" HREF="#" onclick="return awlink(this)" AWSCOPE="lig" AWMODE="manual" [blue]target="_blank"[/blue] [green]...?[/green]
[/tt]
That is the usual way to get a file loaded into a new instance of ie.
 
Further note:

If xlink is applicable, you can achieve this in the original xml, read through a xlink-aware application, by specifying the show attribute by new. Figuratively, something like this.
[tt]
<Context xlink:type="simple" xlink:href="some.pdf" xlink:show="new">
some link text
</Context>
[/tt]
If I test it in nn7 which is xlink-aware, it would open the pdf in a new nn window with acrobat reader embedded in it.

Don't know how to integrate with your xml though.
 
Hi tsuji,

I've tried your command which is this before change
Code:
 <Context path="/pdfboeing737800SRM/" docBase="../../PDF/SRM_R25/" debug="0"></Context>
<Context path="/pdfboeing737800SRM" docBase="../../PDF/SRM_R25" debug="0"></Context>

after change would be
Code:
        <Context path="/pdfboeing737800SRM/" docBase="../../PDF/SRM_R25/" debug="0" xlink:type="simple" xlink:show="new"></Context>
        <Context path="/pdfboeing737800SRM" docBase="../../PDF/SRM_R25" debug="0" xlink:type="simple" xlink:show="new"></Context>

Is my code correct ?? if it's correct, it's still not working ...
 
One crucial ingredient for xlink to work is the xlink:href. It is missing from your trial. I would try.
[tt]
<Context xlink:href="../../PDF/SRM_R25/pdfboeing737800SRM" debug="0" xlink:type="simple" xlink:show="new"></Context>
<Context xlink:href="../../PDF/SRM_R25/pdfboeing737800SRM" debug="0" xlink:type="simple" xlink:show="new"></Context>
[/tt]
I don't know what is your secret weapon one having trailing "/" and one not. In any case, xlink:href must point to a document (be it .pdf, I suppose).

You have to clare xlink namespace in your root element, say.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top