PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
vchris
Forum Contributor
Posts: 204 Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec
Post
by vchris » Wed Sep 07, 2005 9:10 pm
Hey!
Is there anyway I can redirect a user to a certain page when he clicks on the radio button without clicking a submit button in php?
I managed to do it with javascript. In php would be the best.
My javascript code:
Code: Select all
function modifycontact() {
location = "contactlist_mod_admin.php?cid="+document.contactlistform.modify.value;
}
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Sep 07, 2005 10:00 pm
you could have javascript submit the form, that's the only way php will get involved..
josh
DevNet Master
Posts: 4872 Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida
Post
by josh » Thu Sep 08, 2005 12:53 am
He could do something like:
onChange="document.myIFrame.location='/myscript.php'"
and he could have myscript.php output:
Edit:
viewtopic.php?t=37881
double post?
vchris
Forum Contributor
Posts: 204 Joined: Tue Aug 30, 2005 7:53 pm
Location: Canada, Quebec
Post
by vchris » Thu Sep 08, 2005 8:37 pm
Yes jshpro2 it's kind of a double post but I thought it's a question about php code not javascript so that's why I posted here.
So there is no simple way to do this only using php. I guess I'll stick with javascript for redirecting.
Thanks