at.varley
09-20-2007, 01:13 PM
Hey, I have some code where I want to pass a PHP parameter through to a javascript function. Basically I want the parameter in expand content to be identical to div id. I.E when the expandcontent function is called, the function calls the div id content to expand.
...bit unclean without variables but I just want it to work 1st.
Cheers
<h3 onClick="expandcontent(<?php echo $row_display_results['plan_name'];?>)" style="cursor:hand; cursor:pointer"><?php echo
$row_display_results['plan_name'];?></h3>
<div id="<?php echo $row_display_results['plan_name']; ?>" class="switchcontent">
...bit unclean without variables but I just want it to work 1st.
Cheers
<h3 onClick="expandcontent(<?php echo $row_display_results['plan_name'];?>)" style="cursor:hand; cursor:pointer"><?php echo
$row_display_results['plan_name'];?></h3>
<div id="<?php echo $row_display_results['plan_name']; ?>" class="switchcontent">