Skip to main content
added 95 characters in body
Source Link

here's my js:

function DoNav(theUrl) { document.location.href = theUrl; } 

here's my alternating color table code

while($i < $num) { if ($i % 2 == 0) { echo "<tr class='even' onclick=\"DoNav('physicianInfo.php');\">"; } else { echo "<tr class='odd' onclick=\"DoNav('physicianInfo.php');\">"; } } 

but I wanted to add a class="colorbox" when I click the row

class colorbox allows me to have an iframe modal: http://colorpowered.com/colorbox/

since my TR has a class for alternating colors, and I have a clickable row with javascript to open a link physicianInfo.php. How can I call colorbox (class="colorbox") inside the tr. can I have 2 class in 1?

I usually call the class via "a href"

Sample: <a class='colorbox' href="physicianInfo.php">

here's my js:

function DoNav(theUrl) { document.location.href = theUrl; } 

here's my alternating color table code

while($i < $num) { if ($i % 2 == 0) { echo "<tr class='even' onclick=\"DoNav('physicianInfo.php');\">"; } else { echo "<tr class='odd' onclick=\"DoNav('physicianInfo.php');\">"; } } 

but I wanted to add a class="colorbox" when I click the row

class colorbox allows me to have an iframe modal: http://colorpowered.com/colorbox/

since my TR has a class for alternating colors, and I have a clickable row with javascript to open a link physicianInfo.php. How can I call colorbox (class="colorbox") inside the tr. can I have 2 class in 1?

here's my js:

function DoNav(theUrl) { document.location.href = theUrl; } 

here's my alternating color table code

while($i < $num) { if ($i % 2 == 0) { echo "<tr class='even' onclick=\"DoNav('physicianInfo.php');\">"; } else { echo "<tr class='odd' onclick=\"DoNav('physicianInfo.php');\">"; } } 

but I wanted to add a class="colorbox" when I click the row

class colorbox allows me to have an iframe modal: http://colorpowered.com/colorbox/

since my TR has a class for alternating colors, and I have a clickable row with javascript to open a link physicianInfo.php. How can I call colorbox (class="colorbox") inside the tr. can I have 2 class in 1?

I usually call the class via "a href"

Sample: <a class='colorbox' href="physicianInfo.php">

cleaned up code
Source Link
zzzzBov
  • 180k
  • 57
  • 328
  • 375

here's my js:

function DoNav(theUrl)

{

document.location.href = theUrl;

}

function DoNav(theUrl) { document.location.href = theUrl; } 

here's my alternating color table code

while($i < $num)

 while($i < $num) {     if ($i % 2 == 0) {     echo "<tr class='even' onclick=\"DoNav('physicianInfo.php');\">";     }     else {     echo "<tr class='odd' onclick=\"DoNav('physicianInfo.php');\">";     } } 

but I wanted to add a class="colorbox"class="colorbox" when I click the row

class colorbox allows me to have an iframe modal: http://colorpowered.com/colorbox/

since my TR has a class for alternating colors, and I have a clickable row with javascript to open a link 'physicianInfo.php'physicianInfo.php. How can I call colorbox (class="colorbox"class="colorbox") inside the tr. can I have 2 class in 1?

here's my js:

function DoNav(theUrl)

{

document.location.href = theUrl;

}

here's my alternating color table code

while($i < $num)

  {     if ($i % 2 == 0){     echo "<tr class='even' onclick=\"DoNav('physicianInfo.php');\">";     }     else{     echo "<tr class='odd' onclick=\"DoNav('physicianInfo.php');\">";     } 

but I wanted to add a class="colorbox" when I click the row

class colorbox allows me to have an iframe modal: http://colorpowered.com/colorbox/

since my TR has a class for alternating colors, and I have a clickable row with javascript to open a link 'physicianInfo.php'. How can I call colorbox (class="colorbox") inside the tr. can I have 2 class in 1?

here's my js:

function DoNav(theUrl) { document.location.href = theUrl; } 

here's my alternating color table code

while($i < $num) { if ($i % 2 == 0) { echo "<tr class='even' onclick=\"DoNav('physicianInfo.php');\">"; } else { echo "<tr class='odd' onclick=\"DoNav('physicianInfo.php');\">"; } } 

but I wanted to add a class="colorbox" when I click the row

class colorbox allows me to have an iframe modal: http://colorpowered.com/colorbox/

since my TR has a class for alternating colors, and I have a clickable row with javascript to open a link physicianInfo.php. How can I call colorbox (class="colorbox") inside the tr. can I have 2 class in 1?

Source Link

How add another class to a javascript function

here's my js:

function DoNav(theUrl)

{

document.location.href = theUrl;

}

here's my alternating color table code

while($i < $num)

 { if ($i % 2 == 0){ echo "<tr class='even' onclick=\"DoNav('physicianInfo.php');\">"; } else{ echo "<tr class='odd' onclick=\"DoNav('physicianInfo.php');\">"; } 

but I wanted to add a class="colorbox" when I click the row

class colorbox allows me to have an iframe modal: http://colorpowered.com/colorbox/

since my TR has a class for alternating colors, and I have a clickable row with javascript to open a link 'physicianInfo.php'. How can I call colorbox (class="colorbox") inside the tr. can I have 2 class in 1?