Hey,
Can anybody help me program, using Dreamweaver, a dialogue box to pop up on a custom website? I.e. "You're about to download... Open/Save File/Cancel"
Thanks in advance. :)
Printable View
Hey,
Can anybody help me program, using Dreamweaver, a dialogue box to pop up on a custom website? I.e. "You're about to download... Open/Save File/Cancel"
Thanks in advance. :)
Woah, what on earth are you trying to achieve here?
I think a little more detail is required
from the one-liner above, it sounds like you're trying to mimic what browsers already do (Ie. manage file downloads)
This is not a good thing to try to do
if you try to override people's browsers,
1) you won't succeed, you will not be able to support all browsers on all platforms under all circumstances
2) even if you do, you will piss people off by doing it
3) any simple update to a browser could render your mimic worthless
I'm assuming the "open" option means download the file to a temp location and open it in some application local to the user
you cannot do this (not properly anyway)
you can't control what the user does on his machine
seriously, if you want to offer something for download, just use a simple anchor
let the user decide what they want to do with the file
what exactly are you offering to your visitors?
I think he just wants an automatic browser based download box to come up, but is unsure how to get one to, as opposed to file automatically opening in the browser.
if the user wants to download it, he'll download it
if he wants to have it open in his browser via a plugin, he'll do that
trying to override what someone's browser does is futile and will only annoy them
I don't think a website can do that, that would be a browser setting. Just add a line of text that says "Ctrl + Click and Press Download Linked File As..." right above the link.
Ok, so I guess I just paste the file into html document and link to that?
Still not sure, but I realize how simple it is.
Link to the file on your webserver and it'll download or display automatically.
HOW!!??
rofl
Upload the file via ftp to a server you own, then use a normal link directing to the file.
Thanks everyone, I'll post again if something's not right.
;D
To create an anchor to a file on your server, assuming your server is located at the domain name www.example.com, use the following line of HTML:
<a href="http://www.example.com/example.mp3">click here to download musicillegally</a>
Cheers! :)
Also, how do I:
1. Allow for scroll bars if images are larger than the window?
2. Fix the width of sub-windows/frames?
1. I think it's default auto(?)
2. Fixing a table width is as easy as slightly adjusting the html if you're using Dreamweaver.
Tables are areas for cells.
TR stands for table row, and creates rows within the table.
TD is table data, and creates cells within the row.
So you should see (in Dreamweaver's html view section - I assume they have one) something similar to this throughout the html:
You can use width as either a set number like this:HTML Code:<table>
<tr>
<td>
</td>
</tr>
</table>
or a percentage like this:HTML Code:<table width="300">
<tr>
<td>
</td>
</tr>
</table>
The fixed will not auto adjust in a browser if the user adjusts the size of the window.HTML Code:<table width="80%">
<tr>
<td>
</td>
</tr>
</table>
The percentage adjusts the table to the browser window, using the value you set.
The same can be done with the TD cells in relation to the table:Also alignment the same way:HTML Code:<td width="100%"></td>
HTML Code:<td width="100%" align="left"></td>
Nice! Thanks a lot. ;)
Actually, although that post is awesome, ClouD, I don't think you answered my question.
You know when you contract the window size and the content/text re-arranges? There is "fixed width" which fixes this so it doesn't move while the window is re-sized. I can only find that option so far in the templates, but not as a command/code yet.
You really need to start to basics. :P
Here's some code that will allow for scroll bars.
Any image larger than your set height and width will have a scroll bar show up. If you only want it scroll in the x/y direction, change overflow:scroll to either overflow-x:scroll or overflow-y:scroll depending on how you want it to scroll. The display:block is not really necessary since I have defined height and width, but I'm so used to throwing it in everywhere that I just put it in anyway.HTML Code:<div style="display:block; width:500px; height:500px; overflow:scroll;">
<img src="/..." alt="" />
</div>
It's good practice to:
A) Define width and height in some sort units, like pixels above.
B) Avoid using tables to format.
C) Link all CSS to a CSS file instead of using style="..." in the div tags like I did in the code above.
Thanks everybody! :) Nice.
Using a fixed-width div would accomplish the same thing, and be far less complex and use less code. Simply define the width of the div in your CSS file. W3Schools.com has all the info you need, and honestly, you're better off just messing around with it until you've got a good grasp of the different CSS dfinitions.