Pages

Tuesday, June 10, 2008

Learning process...

Time passed really really fast and this is my 2nd week of working at Accenture. Even though, it's just a week but I felt that time really passed even faster than I ever imagined. I have a lot of opportunity to learn about new technologies and started to build on the skeleton the web development project. Eventhough, I have few sleepless night but I had an amazing feeling that always keep me fresh and awake. I believe that is what we called "The passion"?

Today, I've learnt about DOM, JavaScripts ando a little bit DWR. While doing a window shopping yesterday, I bought a book called "Practical JavaScripts, DOM, Scripting and AJAX Projects". I have been learning DOJO since last week and I have start building some skeleton of the web interface. During the web development, I was informed about the "Select All" checkbox function which is not workable in the dijit.layout.AccordionPane. As usual, I have include the javascript in the jsp file and the following is the first implement script which is not workable:

function checkAll (a, b){
alert("I am here");
for (i = 0; i < checked =" b.checked?">

And the following is the checkbox input that trigger the checkAll function:


<input id="selectAll" dojotype="dijit.form.CheckBox" name="selectAll" value="selectAll" onclick="checkAll(document.form1.checkbox,this)" type="checkbox">

However, by implementing the above scripts will not work if those checkboxes are place inside the
dijit.layout.AccordionPane

After looking into the DOM from w3schools, the following scripts is the workable scripts where it will check all the checkboxes in the
dijit.layout.AccordionPane. Instead of implementing the checked(), I have changed to the click()


function checkAll(a, b){
var x=document.getElementsByName("selectAll");
for (i = 0; i
< a.length; i++) a[i].click()
}


There are more to come. Even though I am not a geek but I hope i can share more on my knowledge along this learning journey.

Adios ~ Kay Nny



No comments:

Post a Comment