how to redirect page | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to redirect page

i have html button and just like javascript onclick we can give user defined function is there any method in python also that i define function in python and when i clicked that button the yy hon function call...thankyou in advance

13th Jul 2016, 9:56 AM
swapnil Singh
swapnil Singh - avatar
5 Answers
0
and also in that function i want to reload the page itself so what is the procedure for that
13th Jul 2016, 9:57 AM
swapnil Singh
swapnil Singh - avatar
0
Why not use JavaScript to reload the page, you are already using it.
13th Jul 2016, 10:03 AM
Gershon Fosu
Gershon Fosu - avatar
0
okk for reloading i can use javascript and if i type a button of html a python function call how to do that
13th Jul 2016, 10:07 AM
swapnil Singh
swapnil Singh - avatar
0
Just assign the action of the button to window.location = "path of file";
13th Jul 2016, 10:09 AM
Gershon Fosu
Gershon Fosu - avatar
0
and no you can't make html interact with python like that. Not using cgi anyway...
13th Jul 2016, 10:12 AM
Gershon Fosu
Gershon Fosu - avatar