These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Http error and openUrl

GARYSR591
Registered: Aug 9 2007
Posts: 3

I created a button on a form in Adobe 8. The button runs a java script openURL. The link goes to an anchor on a web page. It works fine if the user as Adobe 8 installed. But the link does not work with adobe 7. They get the error http 404 page not found. But if the page address and anchor is put in the address bar, it works. Why? What am I missing?

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First, there is no product named Adobe. Adobe is a company. Acrobat is the name of one product, another product is Adobe Reader.

the "openURL" function is problematic. It does different things in Acrobat Pro and Reader. It also works differently between different versions of Acrobat. This is becuase it performs actions outside of Acrobat. This means it's subjects to system restrictions and Acrobat security restrictions. Both of which have changed over the recent years. The funtion itself is meant to covert an HTML page into a PDF. This doesn't include the concept of anchors. So there's lots of things that could go wrong and it looks like you hit one of them.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

GARYSR591
Registered: Aug 9 2007
Posts: 3
so what is an alternative?
pddesigner
Registered: Jul 9 2006
Posts: 858
If the form works properly in Reader version 8, write a document level JavaScript to check the users version of Adobe Reader.

if (app.viewerVersion < 8) {
app.alert("You must have Adobe Reader 8.0 or later to use this form.")
this.closeDoc(true)
}

My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.