Another question... it's a mix of jquery and php strings..
I have 5 sql tables that i'm displaying results from, I've written a jquery statement that calls out the div parent and first children and parents table .siblings..
like so:
$("#phone_book tr").click(function(){
var id = $(this).children().first().html();
var type = $(this).parents('table').siblings('div.module_header').html();
//alert(type);
window.location.href='index.php?q=patient/demographics/armdme&'+ patient + '=<?php $patient_id; ?>' '+ doctors + ' '+referral+ ' etc etc.... [COLOR="#DDA0DD"]<confused on the url string here.[/COLOR]
});
});
So when users hover it allows them to know what div category they're searching... well the window.location.href event needs to visit the correct card based on their selection..
my categories are patients, doctors, alt doctors, referral, pharmacys...
here's my code:
<div id='phone_book'>
<?php
echo "<div>";
echo "<div class='module_header'> Patients</div>";
echo lookup_gen::query_results_table("Select TOP 10 code, last + ', ' + first as name, phoneday, phonenight, cellnumber as Cell_Phone FROM " . event_table('patient_dg()') . " WHERE (phoneday is not null and phoneday <> '') or (phonenight is not null and phonenight <> '')");
echo "</div>";
echo "<br /><br />";
echo "<div class='module_header'> Doctors</div>";
echo lookup_gen::query_results_table ("Select TOP 10 CODE_, Last_ + ', ' + First_ as name, phone, fax FROM WARE.APS.FDME");
echo "<div class='fj'> - Alternative Address - </div>";
echo lookup_gen::query_results_table ("Select TOP 10 doctor_id, phone, fax FROM event.dbo.docr_alt_address WHERE (phone is not null and phone <> '') or (fax is not null and fax <> '')");
echo "<div>";
echo "<br /><br />";
echo "<div class='module_header'> Referral</div>";
echo lookup_gen::query_results_table ("Select TOP 10 CODE_,NAME_ as name, phone, fax FROM ARE.APS.RFDM");
echo "</div>";
echo "<div>";
echo "<br /><br />";
echo "<div class='module_header'> Pharmacy</div>";
echo lookup_gen::query_results_table ("Select TOP 10 id, name, call_back as Phone, fax_back as Fax FROM phar.dbo.chain");
echo "</div>";
?>
</div>