By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,490 Members | 3,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,490 IT Pros & Developers. It's quick & easy.

Calling script form href

P: n/a
Hi,
I would like to call a python script from a link, something like this:

<a href="midir/file1.rar"
onclick="python_script?param1='cad1'&param2='cad'" >Download file1</a>

What is the correct sintax for this sentence? Or something similar... I want
to can download the file but at the same time execute the script.

TIA,
Catalin
Nov 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Catalin Lungu" wrote:
Hi,
I would like to call a python script from a link, something like this:

<a href="midir/file1.rar"
onclick="python_script?param1='cad1'&param2='cad'" >Download file1</a>

What is the correct sintax for this sentence? Or something similar... I want
to can download the file but at the same time execute the script.

TIA,
Catalin


Link directly to the python script, and get the script to redirect the user
to the download file by sending a 302 redirect header.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

Nov 23 '05 #2

P: n/a
Thanks.
but how can I redirect a link to a file download?
"Philip Ronan" <in*****@invalid.invalid> escribió en el mensaje
news:BF9E2B90.3AD04%in*****@invalid.invalid...
"Catalin Lungu" wrote:
Hi,
I would like to call a python script from a link, something like this:

<a href="midir/file1.rar"
onclick="python_script?param1='cad1'&param2='cad'" >Download file1</a>

What is the correct sintax for this sentence? Or something similar... I
want
to can download the file but at the same time execute the script.

TIA,
Catalin


Link directly to the python script, and get the script to redirect the
user
to the download file by sending a 302 redirect header.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

Nov 23 '05 #3

P: n/a
"Catalin Lungu" wrote:
Thanks.
but how can I redirect a link to a file download?


By sending a 302 redirect header.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.