I want to E-Mail a Java script program and an image attached to the program.?

I want to E-Mail a Java script program and an image attached to the program.

How do I structure the E-mail to Include the Script and Image, and to have the user automatically open the program with their web browser?

3 Answers

Relevance
  • 3 months ago

    You can attach files to an email, but no reputable email client will let you auto-run them. That would be a privacy and security hole the size of the Grand Canyon.

    Marvinator has the best suggestion so far. Put all files needed into a single folder (maybe with subfolders) and create a ZIP archive of that folder. Send the ZIP file as an attached file, and your addressee can extract the files needed to run your code into a folder and then double-click the main HTML file.

    And yes, you will need an HTML file to load and execute your JS code.

    This presumes that both you and your addressee are using real computers. This may be challenging for a mobile device user.

  • VP
    Lv 7
    3 months ago

    Java or JavaScript? Two totally different things.

    Your JavaScript would be part of an HTML file. Do like 'Marvinator' says and create a zip file with the HTML file and images, then mail that file to the user with instructions on how to unzip it.

    However, a Java program would need much more work in order to run on someone else's system.

  • 3 months ago

    Put the separate script and image files into a Zip file, email that.

Still have questions? Get your answers by asking now.