traxion
-
Posts
33 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by traxion
-
-
i found i script on the web for my planning.i got a php array to a javascript array ut i dont get it in the ifstatmentCode:myarray = new Object(); myarray[1] = 5; myarray[2] = 5; myarray[3] = 5; myarray[4] = 4.5; myarray[5] = 5; myarray[6] = 4.5; myarray[7] = 5; myarray[8] = 5; myarray[9] = 5; myarray[10] = 5; myarray[11] = 6.5;obove is the arrayand i was hoping to read it out like this. the second statment is to check is the array works it does..Code: if (var i = 1 ;total == myarray[$i]; var i++) or if (total == myarray[5]) { totalCell.innerHTML = "<SPAN class='gelijk'> "+total+" </SPAN>"; } else { totalCell.innerHTML = "<SPAN class='ongelijk'> "+total+" </SPAN>"; }now i need to have the myarray [ variable ] so i can check the valuas but i cant make it varible plz help
-
hey alli got a script of javascript
function sum() { for (var col=0; col<numberOfCols; col++) { var total = sumCol(col); var totalCell = document.getElementById("total"+col); if (totalCell != null) { // Hier kun je de stijl van de totalen aanpassen document.write(total) if (total == <?php echo $a_uren[$z]; $z++?>) { totalCell.innerHTML = "<SPAN STYLE='background-color: #FF0000;'>"+total+"</SPAN>"; } else { totalCell.innerHTML = "<SPAN STYLE='background-color: : #000FFF;'>"+total+"</SPAN>"; } } } }
i got the php array with some numbers 5 5 5 4.5 4.5 5 5 5 5 5 5 <= from my databaseand total is also made of some numbers 5 5 5 4.5 4.5 5 5 5 5 5 5 <= these numbers come from document.write(total)as u can see the numbers are the same but the code give @ both of the 4.5 's that it is incorrect.. i dont use javascript much so i think i made a mistake somewhere but where?i got a new problemi put the text in a cell of a table if the stament is correct or not that must change the background of the complete cell and not just only the background of the text
js and php
in JavaScript
Posted
i got several files.. projecten.php, projecten.incl.php and selectuser.js and some more but u dont need them for the problemtrue AJAX i get a variable "q" (in projecten.incl.php and he shows every think i want to see that works great now i want from another file to call the ajax (go to a new page with a link) and i send a GET with it.. now im looking for somethink in js (or anther code) where i can get my GET variable from php to the selectuser.js file (he calls ajax). the probleem is i want to have done that compleetly automatic.. and i dont now howi hope u get the problem.. else just aski will post the code below.. i hope u can find what i need to changeselectuser.js
projecten.incl.php
projecten.php