WordPress.org

Ready to get started?Download WordPress

Forums

sack question (2 posts)

  1. mackie123
    Member
    Posted 5 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

  2. Daniel Bachhuber
    Hand Built
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic