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
https://forums.phpfreaks.com/topic/208275-h-ref-link-in-drop-down-list/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.