Pages

Sunday, June 15, 2008

Check All Checkbox with DOJO Checkbox

I found a function which able to check all checkbox with DOJO Checkbox. Here is the following:

function checkAll(a,b){
var bChecked = false;
eval("dml = document.frTAMain");
var len = dml.elements.length;
for(var i=0 ; i<;i++){
if (dml.elements[i].type == "checkbox") {

for ( m=0; m <a.length;m++){
var id = (m+1);
if ((dml.elements[i].name == "selectAll") && (dml.elements[i].checked==true)) {
dijit.byId("comp"+id).setValue(true);
bChecked.setValue = true;
}

if ((dml.elements[i].name == "selectAll") && (dml.elements[i].checked==false)) {
dijit.byId("comp"+id).setValue(false);
bChecked.setValue = false;
}
}
}
}
}

At first I thought of putting in the function of click() which is the DOM function, however after the further studies on DOJO, dijit has their own method to check all which is dijit.byId().setValue (true/false).

Last weekend, I finally being able to pass value to DWR and DWR to Spring to the database and passing back to DWR to the javascripts. And now, it's time to learn how to display the value in the dijit.form.FilteringSelect with dwr values.


Wish me luck!

-Kay Nny

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



Tuesday, June 3, 2008

Delete shared map drive user

I learnt a new windows command where it can delete the initial map drive login users from the windows. The command goes like this:

C:/> net use
Status Local Remote Network
-------------------------------------------------------------------------------
OK Z: \\xxx.xxx.xxx.xxx\Share_Folders Microsoft Windows Network

The command completed successfully.

Enter the following command for the syntax help:

C:/> net use /?

The syntax of this command is:


NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]

[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME
NET USE [/PERSISTENT:{YES | NO}]

In order to delete the shared map drive user, follow the following command:

C:/>
net use /delete \\xxx.xxx.xxx.xxx\Shared_folder
\\xxx.xxx.xxx.xxx\Shared_folder was deleted successfully.

So here is a little bit of tips to remove the mapping.

Cheers,
-Kay Nny-

New working environment

Hm! There is alot to blog about my new working environment. I started my job on the first of June and it was the same date when I started my previous job in 2 years back. Kind of excited about it and can't wait to move forward. The first 2 days was about understanding the company background and the administrative procedure. They are all covered in the Orientation day.

Yesterday I was assigned to a new project and I am really really excited about it. I am pretty much clear about my career path and direction compare with last time and I really have a plenty of plans in my mind now. Today is pretty much about requirement study, knowing people surrounding me and kick off my ass to learn! More to learn tho~ will blog about about it after today.

~Passion about my new job~
-Kay Nny-