Feeds:
Posts
Comments

Posts Tagged ‘javascripts’

Problem: To create the following structure dynamically in javascript. var employees = {“accounting”: [   // accounting is an array in employees. { "firstName" : "John",  // First element "lastName"  : "Doe", "age"       : 23 }, { "firstName" : "Mary",  // Second Element "lastName"  : "Smith", "age"       : 32 } ] // End “accounting” array. } [...]

Read Full Post »

If you are trying to run the script in an updated div, that may work with the internal scripts – something like; <script type=”text/javascript”> alert(‘hello’); </script> But when you try to access some external javascrips, (e.g); <script type=”text/javascript”> <script type=”text/javascript” src=”/javascripts/my_script.js”></script> </script> that will not work. The work-around is; [if you are using mootools.js for [...]

Read Full Post »

function inspect_object( obj ) { var str = ”; for( var memb in obj ) str += memb + ‘ = ‘ + obj[memb] + ‘n’; alert(str); return str; }

Read Full Post »