Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-12-2010, 10:23 PM   PM User | #1
davidhaymond
New to the CF scene

 
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
davidhaymond is an unknown quantity at this point
Dynamic HTML text

I have a webpage with a link on it to an HTML file, but I want the user to be able to download the HTML file instead of open it by right-clicking the link and selecting Save Target As... (IE) or Save Link As... (Firefox). The page has instructions for downloading the file, but I want the context-menu item label (Save Target As... or Save Link As...) to dynamically change depending on the user's browser.

What is the best way using JavaScript and HTML to do this?

Maybe a placeholder tag in the HTML? If so, which tag?
davidhaymond is offline   Reply With Quote
Old 04-12-2010, 10:33 PM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,857
Thanks: 9
Thanked 288 Times in 284 Posts
Dormilich is on a distinguished road
the download and context menu has nothing to do with HTML because that’s either server side or application internal. and I don’t like someone playing with my context menu.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 04-13-2010, 12:17 PM   PM User | #3
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,452
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
you can try to recreate an entire context menu for every browser (not reccommended or actually possible), but you can't modify a user's normal menu without coding your app as an extension.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.8% IE9:11.4% IE10:6.5%
rnd me is offline   Reply With Quote
Reply

Bookmarks

Tags
dynamic, placeholder, tag, text

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:15 AM.


Advertisement
Log in to turn off these ads.