I have this php function, which I want to convert to javascript function, but I don't know how to create a table in javascript.
I guess I have to have a container (DIV) to insert the table into with javascript.
Here is the php function simplified: (it counts height and width and repeats a 1px shadow to create a drop-shadow effect)
function drpShadow($pic_url){
$pic_display="<table border='0' style='display:inline;' cellspacing='0' cellpadding='0'><tr><td width='4px' height='$height'><img src='/SV/Graphics/drop_shadow_top_left_corner_4x4.jpg'><br>";
for ($i=0; $i<($height-4); $i++){
$pic_display.="<img src='/SV/Graphics/drop_shadow_left_4x1.jpg'><br>";
}
$pic_display.="</td><td width='$width' height='$height'><img src='../temp_images/$pic_url'></td></tr><tr><td colspan='2' height='4px' width='($width+4)'><img src='/SV/Graphics/drop_shadow_left_bottom_corner_4x4.jpg'>";
for ($i=0; $i<=($width-6); $i++){
$pic_display.="<img src='/SV/Graphics/drop_shadow_bottom_1x4.jpg'>";
}
$pic_display.="<img src='/SV/Graphics/drop_shadow_right_bottom_corner_4x4.jpg'></td></tr></table>";
return $pic_display;
}
Please guide me, or even better, give me some code :)
Thanks