Posts

Showing posts from February, 2011

Iframe busy inidcating spinning bar.

I got one solution on delving the internet <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <title> Iframe Loading Notice - Demo</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> #holder, #holder iframe { position:relative; width:500px; height:400px } # loading { height:50px; width:125px; padding:1ex; position:absolute; top:50%; left:50%; margin-top:-25px; margin-left:-63px; display:none; border:2px groove gray; background-color:#cccccc; color:#333333; } </style> <script type="text/ javascript "> var loadit=function(){ var f=document.getElementById('myframe'), l=document.getElementById(' loading ').style; l.display='block'; if(f.onload==null){ f.onload=function(){l.display='none'}; if(window.atta...

Convert PHP array into Javascript array

I got a chance to write a script that converts php array into javascript  array. Here it is.. <?php   $phparray= array(1,2,3,4,5); ?> <script type="text/javascript" language="javascript">     var mydata = new Array (     <?php       for ($i = 0; ($i < count($phparray)); $i++) {         if ($i > 0) {           echo ",\n";         }         echo "    \"";         echo $phparray[$i];         echo "\"";       }           ?>     ); </script>