Jump to content

h ref link in drop down list.


will_1990

Recommended Posts

Hi everyone,

 

I have the need to create a dropdown list and when an item is selected I would like to start a file download via a h ref link eg h ref "http://server1/sadf/file.xls"

 

Is this even possible - I have read that it may not be possible to use a h ref in an options list as obviously they are normally used to pass information in a form to the server.

 

Am I going about this the wrong way?

 

Any advice would be greatly appreciated or any other alternatives!

 

Many thanks,

 

Will

 

 

Link to comment
Share on other sites

You can't put anchor tags inside options.

 

You should add an <input> button that triggers the download after a selection has been made. Then you can use javascript to hide that button, and set an onchange handler to the select element so that when the user selects an item, the download automatically stops.

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.