Answer
Apr 24, 2007 - 04:28 AM
Have u already done this now? Have u had your exam? Hope it went well!
Just in case you still want a explanation
your function takes in two parameters
editor
sender (which does not appear to be used)
your web page must be making use of frames (a number of different webpages in one)
eg this html is saying to display three web pages in columns
You can assign each frame a name, so this line is basically referencing a specific frame (based on the value u pass in when u call this function)
windows.frames[editor+'_rEdit']
So
window.frames[editor+'_rEdit'].focus();
is saying that a particular frame now has focus
regarding this line, "this" refers to the current object, so its your main window.
.Document refers to a page itself on the specified frame
execCommand executes a command on the current document
execCommand takes 3 arguments,
command, display userinterface or not and optional value to assign
this[editor+'_rEdit'].document.execCommand('bold', false, null);
so with your line it looks like u are setting the document to be bold
this last line
sapw_update_toolbar(editor, true);
is simply calling another function of yours
I hope that makes sense!
Just in case you still want a explanation
your function takes in two parameters
editor
sender (which does not appear to be used)
your web page must be making use of frames (a number of different webpages in one)
eg this html is saying to display three web pages in columns
You can assign each frame a name, so this line is basically referencing a specific frame (based on the value u pass in when u call this function)
windows.frames[editor+'_rEdit']
So
window.frames[editor+'_rEdit'].focus();
is saying that a particular frame now has focus
regarding this line, "this" refers to the current object, so its your main window.
.Document refers to a page itself on the specified frame
execCommand executes a command on the current document
execCommand takes 3 arguments,
command, display userinterface or not and optional value to assign
this[editor+'_rEdit'].document.execCommand('bold', false, null);
so with your line it looks like u are setting the document to be bold
this last line
sapw_update_toolbar(editor, true);
is simply calling another function of yours
I hope that makes sense!
Add New Comment