Hi, Return false from the function to stop de default action (opening the file). Also you don't need to change the jQuery shortcut '$', just do this, won't cause any conflicts:
(function($){ $(document).ready(function() { $('.download').click(function() { var link = $(this).attr('href'); $('.dialogBox').show().click(function(){ window.location.href = link; //or window.open $(this).unbind('click'); }); return false; }); })(jQuery); On Nov 4, 8:47 pm, Genu <[EMAIL PROTECTED]> wrote: > Ok here is my problem: > > I have a link: > > <a href="http://www.myserver.com/01-01-08-PM.mp3" class="download" > id="7">Download</a> > > I wrote this js: > > var $j = jQuery.noConflict(); > > $j(document).ready(function() { > $j('.download').click(function() { > var link = $j(this).attr('href'); > > }); > > }); > > The idea, is that I want the script to fetch the url (href), and > return it in the form of a download dialog. The problem that I am > facing, is that when people click "Download", it just opens up the > file directly with the associated player. Can Jquery overcome this > issue if it does an httprequest in the bacgkground to fetch the file? > > please let me know what my options are.