mackie123
Member
Posted 3 years ago #
I'm playing with sack,
i have this :
die( "document.getElementById('$results_id').innerHTML = '$results'");
If i want to update 2 divs (say results_id , and results_id2 , how would i do this with one die statement?
Is there any other method other then die to accomplish this using sack?
thanks
If the code above is working, then you could just include the second argument within that same statement:
die( "document.getElementById('$results_id').innerHTML = '$results';document.getElementById('$results_id2').innerHTML = '$results2'");
Using a semi-colon is a valid approach in Javascript for having two statements on the same line.