Skip to main content
New_guy1
Inspiring
December 12, 2016
Answered

"On Success Open URL or File"

  • December 12, 2016
  • 2 replies
  • 352 views

I have a smartshape used as a button that when clicked, would open a file that contains about three paragraphs which instruct the user on a particular procedure.

However, I would like this file (HTML? RTF? Word Doc?) to open in a window of specific dimensions so that the user can still see the larger "calling" smart shape button behind it.

I'll be sizing this for mobile devices too.

    This topic has been closed for replies.
    Correct answer StevePixel

    Hi New_guy,

    I'm pretty sure you can do this with JavaScript. TLC, I believe has offered the code in these forums before. You might want to do a search.

    Cheers

    Steve

    2 replies

    SauravGhosh
    Adobe Employee
    Adobe Employee
    December 12, 2016

    Hi New_guy,

    You may try the following:

    1. Use google docs to view a word doc in frame. Note that the word doc must be hosted on a web server:

    <iframe src="http://docs.google.com/gview?url=http://your.url/path/to/document.doc&embedded=true"></iframe>

    2. Use window.open and document.write methods to render your content in an HTML container.

    var instructionWindow=window.open("", "instructionWindow", "width=600,height=400");

    instructionWindow.document.write("<p>Instructions 1 text and para.</p>");

    instructionWindow.document.write("<p>Instructions 2 text and para.</p>");

    instructionWindow.document.write("<p>Instructions 3 text and para.</p>");

    This could be closest to what yoou're looking for.

    Thanks,

    Saurav

    StevePixelCorrect answer
    Inspiring
    December 12, 2016

    Hi New_guy,

    I'm pretty sure you can do this with JavaScript. TLC, I believe has offered the code in these forums before. You might want to do a search.

    Cheers

    Steve