darkdrops Posted March 25, 2013 Share Posted March 25, 2013 (edited) need help with a code i have placed a image instead of a button. but when i click on it it not redirekt to the page its supose to go anyone have the answer for this? excuse my bad english:) <td> <select name=\"upgrade$membership[id]\"> "; for($x=0; $x<count($tpackages); $x++) { $temp_price=($tpackages[$x]*$membership['price']); $includes[content].="<option value=\"".$tpackages[$x]."\">".($tpackages[$x])." ". iif($membership[time_type]=="D","Day"). iif($membership[time_type]=="W","Week"). iif($membership[time_type]=="M","Month"). iif($membership[time_type]=="Y","Year"). iif($membership[time_type]=="L","Lifetime"). " Membership - $cursym $temp_price"; } $includes[content].=" </select> </td> <td><input type=\"image\" src=\"images/paypal.png\" onclick=\"buyupgrade($membership[id],document.form.upgrade$membership[id].value)\" value=\"Buy Now!\"></td> Edited March 25, 2013 by ignace Added code tags Quote Link to comment https://forums.phpfreaks.com/topic/276139-help-modify-a-code/ Share on other sites More sharing options...
requinix Posted March 25, 2013 Share Posted March 25, 2013 And what's the code for buyupgrade()? Because now that I see this it's probably a Javascript question. Quote Link to comment https://forums.phpfreaks.com/topic/276139-help-modify-a-code/#findComment-1420978 Share on other sites More sharing options...
darkdrops Posted March 25, 2013 Author Share Posted March 25, 2013 this is how the orignal code looks like. and this working fine. <input type=\"button\" onclick=\"buyupgrade($membership[id],document.form.upgrade$membership[id].value)\" value=\"Buy Now!\"> but this not have a picture to click on just a button Quote Link to comment https://forums.phpfreaks.com/topic/276139-help-modify-a-code/#findComment-1420979 Share on other sites More sharing options...
Solution Barand Posted March 25, 2013 Solution Share Posted March 25, 2013 Try just making it an img tag and not an input of type image Quote Link to comment https://forums.phpfreaks.com/topic/276139-help-modify-a-code/#findComment-1421009 Share on other sites More sharing options...
darkdrops Posted March 25, 2013 Author Share Posted March 25, 2013 thanks <img src=\"images/paypal.png\" so easy have tried for a day now Quote Link to comment https://forums.phpfreaks.com/topic/276139-help-modify-a-code/#findComment-1421011 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.