Jump to content

Save As?


Recommended Posts

I am thinking about making a ringtone website

and started on the files but I came accross a HUGE problem,

sending the ringtones to the phone  ;D

But I came up with a solution,

I want to create a link that links to the mp3 file,

such as

<a href="/music/song.mp3">Get File</a>

But then i realized that the link will only take you to the page

where the ringone is located,

can someone let me know what the javascript code is

so that when they click on the link it will save?

i tried looking this up on google,

and i think you need to be using the "onClick"

thing but since I dont really know anything about javascript

I have no idea what exactly to put it.

I found a code that does this in javascript

<html>
<head>
<script language="JavaScript">

var isReady = false;
function doSaveAs(){
if (document.execCommand){
if (isReady){document.execCommand("SaveAs");}
}else{
alert('Feature available only in Internet Exlorer 4.0 and later.');
}
}

</script>
</head>

<body onload="isReady=true">
<a href="javascript:doSaveAs(/music/song.mp3)">
Get File
</a>
</body>
</html>

but it only worked in

IE, and i figured that it wont work through a phone,

does anyone know how to make a javascript code that

saves the target (the song) and works through a phone?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.