Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

open file using Javascript

$
0
0
I am trying to open a file using a javascript dropdown menu. I know acrobat allows users to open a single file using the standard features, but I have about 30 different files that need to be referenced. the general idea is currently;

window.open("C:\Documents and Settings\Desktop\" + event.value + ".pdf");

Besides the fact it doesn't work at all, I'm getting an error message "unterminated string literal". This is due to the \ right before the end of the directory string. but I cannot think of a way to finish the directory string without using this methoid. (i've also tried assigning the '\' to it's own variable but that is throwing the same error. if you have any idea, please let me know. I may have fixed this issue, i'm using \\ instead of \ after Desktop, but the file still will not open. I've also tried using app.launchURL to no avail. please help me with another open command, please.

Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>