Can someone please give me some advise here. I'm not a super javascript programmer but i can get around a little. i'm either overlooking something or i'm doing something really wrong.
ultimately i'm trying to have php call a javascrpt function. but i can only get it to work with double quotes around the data field and not sure why.
function:
calling using php (NOT WORKING).
* var d is this WITHOUT quotes:
The only way it is actually working (with double quotes around last argument):
ultimately i'm trying to have php call a javascrpt function. but i can only get it to work with double quotes around the data field and not sure why.
function:
JavaScript:
function readOnlyGame(title, date, data) {
window.location = "../pages/forward_readonly.html?data=" + escape(data);
}
calling using php (NOT WORKING).
* var d is this WITHOUT quotes:
Code:
&teams=8&sets=1&groups=1&modeVal=dko.html&modeTxt=Double%2520Elimination&title=My%2520Tournament%2520Name%252056555&shuffleLooser=true&?data=&matchDetail=11.3.2023%20Double%20Elimination%2C%208%20Teams&matchData=shuffleOrder%253D0.23023348552613987%25252C0.013753975196499457%25252C0.183546196452959%25252C0.18362271900778593%25252C%253Bteam0_1%253Dvjgv%252520ju%253Bresult0_1_0%253D1%253Bteam0_2%253Douhoiunb%253Bresult0_2_0%253D2%253Bteam4_1%253Douhoiunb%253Bresult4_1_0%253D%253Bteam4_2%253D%253Bresult4_2_0%253D%253Bteam6_1%253D%253Bresult6_1_0%253D%253Bteam6_2%253D%253Bresult6_2_0%253D%253Bteam1_1%253D%253Bresult1_1_0%253D%253Bteam1_2%253D%253Bresult1_2_0%253D%253Bteam2_1%253D%253Bresult2_1_0%253D%253Bteam2_2%253D%253Bresult2_2_0%253D%253Bteam5_1%253D%253Bresult5_1_0%253D%253Bteam5_2%253D%253Bresult5_2_0%253D%253Bteam3_1%253D%253Bresult3_1_0%253D%253Bteam3_2%253D%253Bresult3_2_0%253D%253Bteam7_1%253D%253Bresult7_1_0%253D%253Bteam7_2%253D%253Bresult7_2_0%253D%253Bteam9_1%253D%253Bresult9_1_0%253D%253Bteam9_2%253D%253Bresult9_2_0%253D%253Bteam11_1%253D%253Bresult11_1_0%253D%253Bteam11_2%253D%253Bresult11_2_0%253D%253Bteam12_1%253D%253Bresult12_1_0%253D%253Bteam12_2%253D%253Bresult12_2_0%253D%253Bteam8_1%253D%253Bresult8_1_0%253D%253Bteam8_2%253Dvjgv%252520ju%253Bresult8_2_0%253D%253Bteam10_1%253D%253Bresult10_1_0%253D%253Bteam10_2%253D%253Bresult10_2_0%253D%253Bteam13_1%253D%253Bresult13_1_0%253D%253Bteam13_2%253D%253Bresult13_2_0%253D%253B&matchDetail=11.3.2023 Double Elimination, 8 Teams&matchData=shuffleOrder%3D0.21865197396416836%252C0.9990132343964383%252C0.08503560342563254%252C0.5529512381303724%252C0.06779914862511305%252C%3Bteam0_1%3Dvjgv%2520juxccccc%3Bresult0_1_0%3D1%3Bteam0_2%3Douhoiunb%3Bresult0_2_0%3D2%3Bteam4_1%3Douhoiunb%3Bresult4_1_0%3D%3Bteam4_2%3D%3Bresult4_2_0%3D%3Bteam6_1%3D%3Bresult6_1_0%3D%3Bteam6_2%3D%3Bresult6_2_0%3D%3Bteam1_1%3D%3Bresult1_1_0%3D%3Bteam1_2%3D%3Bresult1_2_0%3D%3Bteam2_1%3D%3Bresult2_1_0%3D%3Bteam2_2%3D%3Bresult2_2_0%3D%3Bteam5_1%3D%3Bresult5_1_0%3D%3Bteam5_2%3D%3Bresult5_2_0%3D%3Bteam3_1%3D%3Bresult3_1_0%3D%3Bteam3_2%3D%3Bresult3_2_0%3D%3Bteam7_1%3D%3Bresult7_1_0%3D%3Bteam7_2%3D%3Bresult7_2_0%3D%3Bteam9_1%3D%3Bresult9_1_0%3D%3Bteam9_2%3D%3Bresult9_2_0%3D%3Bteam11_1%3D%3Bresult11_1_0%3D%3Bteam11_2%3D%3Bresult11_2_0%3D%3Bteam12_1%3D%3Bresult12_1_0%3D%3Bteam12_2%3D%3Bresult12_2_0%3D%3Bteam8_1%3Dvjgv%2520juxccccc%3Bresult8_1_0%3D%3Bteam8_2%3D%3Bresult8_2_0%3D%3Bteam10_1%3D%3Bresult10_1_0%3D%3Bteam10_2%3D%3Bresult10_2_0%3D%3Bteam13_1%3D%3Bresult13_1_0%3D%3Bteam13_2%3D%3Bresult13_2_0%3D%3B
JavaScript:
<script language="javascript">
var t = "<?php echo $tourny_title;?>";
var d = "<?php echo "$tourny_data";?>";
//TITLE, DATE, DATA
readOnlyGame(t ,"2",d );
</script>
The only way it is actually working (with double quotes around last argument):
JavaScript:
<script language="javascript">
readOnlyGame(t ,"2","&teams=8&sets=1&groups=1&modeVal=dko.html&modeTxt=Double%2520Elimination&title=My%2520Tournament%2520Name%252056555&shuffleLooser=true&?data=&matchDetail=11.3.2023%20Double%20Elimination%2C%208%20Teams&matchData=shuffleOrder%253D0.23023348552613987%25252C0.013753975196499457%25252C0.183546196452959%25252C0.18362271900778593%25252C%253Bteam0_1%253Dvjgv%252520ju%253Bresult0_1_0%253D1%253Bteam0_2%253Douhoiunb%253Bresult0_2_0%253D2%253Bteam4_1%253Douhoiunb%253Bresult4_1_0%253D%253Bteam4_2%253D%253Bresult4_2_0%253D%253Bteam6_1%253D%253Bresult6_1_0%253D%253Bteam6_2%253D%253Bresult6_2_0%253D%253Bteam1_1%253D%253Bresult1_1_0%253D%253Bteam1_2%253D%253Bresult1_2_0%253D%253Bteam2_1%253D%253Bresult2_1_0%253D%253Bteam2_2%253D%253Bresult2_2_0%253D%253Bteam5_1%253D%253Bresult5_1_0%253D%253Bteam5_2%253D%253Bresult5_2_0%253D%253Bteam3_1%253D%253Bresult3_1_0%253D%253Bteam3_2%253D%253Bresult3_2_0%253D%253Bteam7_1%253D%253Bresult7_1_0%253D%253Bteam7_2%253D%253Bresult7_2_0%253D%253Bteam9_1%253D%253Bresult9_1_0%253D%253Bteam9_2%253D%253Bresult9_2_0%253D%253Bteam11_1%253D%253Bresult11_1_0%253D%253Bteam11_2%253D%253Bresult11_2_0%253D%253Bteam12_1%253D%253Bresult12_1_0%253D%253Bteam12_2%253D%253Bresult12_2_0%253D%253Bteam8_1%253D%253Bresult8_1_0%253D%253Bteam8_2%253Dvjgv%252520ju%253Bresult8_2_0%253D%253Bteam10_1%253D%253Bresult10_1_0%253D%253Bteam10_2%253D%253Bresult10_2_0%253D%253Bteam13_1%253D%253Bresult13_1_0%253D%253Bteam13_2%253D%253Bresult13_2_0%253D%253B&matchDetail=11.3.2023 Double Elimination, 8 Teams&matchData=shuffleOrder%3D0.21865197396416836%252C0.9990132343964383%252C0.08503560342563254%252C0.5529512381303724%252C0.06779914862511305%252C%3Bteam0_1%3Dvjgv%2520juxccccc%3Bresult0_1_0%3D1%3Bteam0_2%3Douhoiunb%3Bresult0_2_0%3D2%3Bteam4_1%3Douhoiunb%3Bresult4_1_0%3D%3Bteam4_2%3D%3Bresult4_2_0%3D%3Bteam6_1%3D%3Bresult6_1_0%3D%3Bteam6_2%3D%3Bresult6_2_0%3D%3Bteam1_1%3D%3Bresult1_1_0%3D%3Bteam1_2%3D%3Bresult1_2_0%3D%3Bteam2_1%3D%3Bresult2_1_0%3D%3Bteam2_2%3D%3Bresult2_2_0%3D%3Bteam5_1%3D%3Bresult5_1_0%3D%3Bteam5_2%3D%3Bresult5_2_0%3D%3Bteam3_1%3D%3Bresult3_1_0%3D%3Bteam3_2%3D%3Bresult3_2_0%3D%3Bteam7_1%3D%3Bresult7_1_0%3D%3Bteam7_2%3D%3Bresult7_2_0%3D%3Bteam9_1%3D%3Bresult9_1_0%3D%3Bteam9_2%3D%3Bresult9_2_0%3D%3Bteam11_1%3D%3Bresult11_1_0%3D%3Bteam11_2%3D%3Bresult11_2_0%3D%3Bteam12_1%3D%3Bresult12_1_0%3D%3Bteam12_2%3D%3Bresult12_2_0%3D%3Bteam8_1%3Dvjgv%2520juxccccc%3Bresult8_1_0%3D%3Bteam8_2%3D%3Bresult8_2_0%3D%3Bteam10_1%3D%3Bresult10_1_0%3D%3Bteam10_2%3D%3Bresult10_2_0%3D%3Bteam13_1%3D%3Bresult13_1_0%3D%3Bteam13_2%3D%3Bresult13_2_0%3D%3B" );
</script>