Elxis CMS Forum
Support => Technical support => Topic started by: machinakias on February 14, 2008, 13:31:11
-
hi all...i have this code:
<tr class="order_table">
<th colspan="3">
$lang[Summary_cost]
</th>
<th id="summaryCost">
$aList[fSummary]
</th>
</tr>
<tr class="tfoot">
<td colspan="4">
CHECK OUT<input type="submit" value="$lang[send]" class="submit" />
</td>
<tr class="tfoot">
<td colspan="4">
CREDIT CARD <input type="submit" value="$lang[send1]" class="submit" />
</td>
==============================
these are two buttons...(one copied from the other)
what i need is the one of the two buttons to redirect to another page,anywhere....doesn't matter....
any ideas please? cause i'm new in php if possible pls send me some example code....) ;)
-
Use javascript.
<input type="button" onclick="javascript:dosomething('a');" value="<?php echo $lang['send']; ?>" class="submit" />
<input type="button" onclick="javascript:dosomething('b');" value="<?php echo $lang['send1']; ?>" class="submit" />
-
still dont get it done..i cant find the correct way...pls give me some clear answer if you please... i spend a lot of time trying various things....i just CANT do it....i know shit about scripts.... :-\
-
:-\ any one else got an idea to help me??? :'(
-
<form action="http://www.tzatziki.gr">
<input type="submit" value="Button TEXT BLA BLA">
</form>
Μη ξεχασεις να αλλαξεις το τζατζικι (http://www.tzatziki.gr/) ;D
-
kale mou file se yper eyxaristw giati kat'arxin mou apanthses....deyteron giati gelasa me to oraio sxolio sou.....pragmatika kalo...8a h8ela omos na se kouraso ligo kai na mou dwseis ligi boh8eia akoma mias ki eimai mesanyxta....egw exw ayto to rimadokodika...kai mou dineis ena allo kodika....aytos pou 8a kollisei me to diko mou kommati? 8ymisou oti einai dyo ta button,to ena copy tou allou...apla 8elw to ena apo ta dyo na kanei redir se alli selida....exw 3 meres pou paleyw me ekatontades grammes kai dekades posts na brw epitelous mia akri....se 8ermoparakalo,gine ligo pio safis....8a mou swseis ta neyra!!!
(parepiptontos,oraio to site sou! ki eimai kai fun tou tzatzikiou.... :D) elpizw na mi ginomai spastikos....eyxaristw poly!
(an tyxon xreiastei,8a steilw olo ton kodika...an boi8aei etsi..)
-
<tr class="tfoot">
<td colspan="4">
CHECK OUT<input type="submit" value="$lang[send]" class="submit" />
</td>
<tr class="tfoot">
<td colspan="4">
CREDIT CARD <input type="submit" value="$lang[send1]" class="submit" />
</td>
<tr class="tfoot">
<td colspan="4">
<form action="http://www.tzatziki.gr/">
Γραψε οτι θες <input type="submit" value="Button TEXT BLA BLA">
</form>
</td>
Αναλογα πως θελεις να εμφανιστει, πανω,κατω,δεξια,αριστερα, παιξε με τα td/tr. :)
-
eyxaristw poly...shmera 8a kanw th dokimh kai elpizw epitelous na paizei...giati exoun paiksei ta neurakia mou (kai ta dika sas...) ;)
-
Hi guys, please use english in this part of the forum ;)
-
yo! you got it! i was asking this: i use this part of code to create two buttons in quick cart.the one is used to checkout as usual,and the other one to redirect to a bank payment page.that's my question.how to make this button redirect....i gave the part of the code,cause i cant find what to do or where...
for info to others,i copied the code from the original button and i created another.the thing is that the two buttons are going to the same page.so,i need to fix the redirect...thanks Ivan!
(by the way,i hope you're ok!) :)
-
You can only do this with javascript. There are many ways you can do it with javascript. Add an "onsubmit", or an "onclick" event. When someone clicks a button a javascript function will submit the form and based on which button he clicked he will be redirected to another page. Or better the function's action will change to the desired url. It is a very simple task in javascript. You can even study includes/js/elxis.js file to see how the Elxis's submit buttons work and do something similar. Javascript functions to look: submitform and submitbutton.
Here is a sample (should work, I have nt test it):
<script language="javascript" type="text/javascript">
<!--
function mysubmit(act) {
var myform = document.formname;
if (act == 1) {
myform.action = "test1.php";
} else {
myform.action = "test2.php";
}
try { myform.onsubmit(); }
catch(e){}
myform.submit();
}
//-->
</script>
And the HTML part:
<form name="formname" action="test1.php" method="POST">
<input type="button" id="sub1" name="sub1" onclick="mysubmit(1);" value="Submit" />
<input type="button" id="sub2" name="sub2" onclick="mysubmit(2);" value="Submit" />
</form>
Modify it as needed.
-
thanks for your help guys,but i still dont get it right...the file that i use for modification is a .tpl (from quickcart) so i cant make it work... which html to modify? i'm totally lost...the pages of the quickcart are php,and also uses .tpl files....i send the hole thing in case it helps.... it opens with notepad...i renamed the .tpl to DOC
[old attachment deleted by admin]