This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-06-06 15:51:08

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Calling Javascipter Guru

As you may have heard, I am creating a framework/library in javascript called javaworkz. But its now working -.- .

Code:

<html>
<head>
    <title>testr</title>
    <script type="text/javascript">
        window.onload = function(){
(function(){  

  var javaworkz = {
            
        elems:[],
        
        //get the id
        get : function() {
            var tempElems = [];
            for(var 1=0;1<arguments.length; i++){
                var sep = [arguments[i] /1];
                if (sep[0] = '#'){
                    tempElems.push(document.getElementById(aguments[i]));
                }
                if (sep[0] = '.'){
                }
                if (sep[0] != '#' || '.'){
                    tempElems.push(this.arguments.nodeName);

                }                
            }
        }
    }
    if(window.i){ window.i = javaworkz;}
}); 
          
    
var test = i.get('hi');
 alert(test);  
}     
            
        
    </script>
</head>
<body>
<p id="hi">hi</p>
</body>
</html>

Offline

 

Board footer