473,325 Members | 2,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Embedding Files In HTML

Oralloy
985 Expert 512MB
Folks,

This is a rather obtuse question, but I have an application where it might be advantageous for me to embed an arbitrary file in a HTML/DHTML file, and make it accessible via a button.

What I want to do is create a number of elements - images are fine, hang a javaScript function references on the onClick() (or is it onMouseUp()) events.

The javaScript function should then pop a browser or save dialogue for the user to deal with the embedded content.

Is this reasonable? If so, how best to go about it?

Thank You!
Oralloy
Aug 25 '10 #1
6 1241
gits
5,390 Expert Mod 4TB
so basically it should be a file download?
Aug 25 '10 #2
Oralloy
985 Expert 512MB
Essentially, gits.

What I'm trying to do is build a project final report which holds all files that were archived as part of the project. This is just the most ticklish aspect.

I'd be even happier, if I could set this up as a word document or a PDF, but I'm not certain how to go either under Java.
Aug 25 '10 #3
gits
5,390 Expert Mod 4TB
not sure whether i get it already ... you have some files and and want the user to have access to them? you have a webpage where you want to have some 'action-elements' that trigger a download of any of that files. basically a simple link to the file would do the job ... you could even open a window with window.open() and set it's location property to the file-path. if you want to force a download then you might have a serverside service that reads the file and deliver the plain content and additionally you would set the content-disposition header to attachment.

or did i misunderstand the issue?
Aug 25 '10 #4
Oralloy
985 Expert 512MB
Well, the page is a physical archive element, so it would be best if the body of the documents were carried in the page.
Aug 25 '10 #5
gits
5,390 Expert Mod 4TB
hmmm ... i cannot imagine what you mean or i just don't get it :( ... could you give a short example or description how the 'page' looks like? is it a html-document? what is it what the browser should/will get?
Aug 25 '10 #6
Oralloy
985 Expert 512MB
Gits,

Here's a word document setup with embedded objects.

Ultimately I'd like to produce something like this for my report.

However, I'll settle for HTML in the near term, as it will at least give me everything in one place.

And yes, it's being generated out of a web application, although that's not the core problem, as far as I can tell.

Thanks,
Oralloy


p.s. The file is in the .zip, the bare document file exceed the forum limit.
Attached Files
File Type: zip This is a demo.zip (20.4 KB, 55 views)
Aug 25 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Els | last post by:
***newbie question*** Hi, I am trying to make my server (Apache) parse .html files as .php. I found this line of code: ForceType application/x-httpd-php placed it in an .htaccess file and...
4
by: John Pastrovick | last post by:
When writing an HTML table after a PHP database query very occasionally (1 out of ten times -- same code) the HTML page is truncated and cells/or full final rows of table are missing. Looking at...
2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
5
by: Victor | last post by:
Hi I need to open an html file from the file system and embed that html file within my main aspx form. I have 2 questions: 1) How do I open the html file? I tried the File.open(Path, mode) didnt...
3
by: VK | last post by:
Hello: This is an ASP.NET app - once user logs in using username and password (kind of hard coded, since it is temporary solution) they have access to a series of html files. What happens is...
8
by: Alan Lue | last post by:
Hi, I'm trying to set up a webpage so that I can view multiple HTML files from the same page. For example, you might go to http://example.com/lab_tests.html and be able to view lab1.html,...
0
by: Dean | last post by:
Can anyone tell me how to display the file name under the icon of an embedded file? Basically I drag and drop a file into a RichTextBox control and it gives me the file type as opposed to the file...
59
by: Lennart Björk | last post by:
Hi All, I have a tiny program: <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>MyTitle</title> <meta...
2
by: forumnewbie2006 | last post by:
Hello, How would you recommend embedding an html file in an ASP.NET 2.0 page? Essentially, I'm looking for the simplest & most light weight way to embed the content of an html file (from the...
78
by: Robert Baer | last post by:
The homepage i have had up and seemingly working is: http://oil4lessllc.com/ However, the validator has so many complaints, and being so incompetent, i have no clue as to how to fix it all. Would...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.