alkoor
07-14-2003, 02:46 PM
Say you have a window:
<window name="win1" title="Sample window"/>
I am trying to programmatically get/set this window's title:
canvas.win1.getAttribute('title')
//just returns empty string
canvas.win1.getTitle()
//returns error: no such method
canvas.win1.setAttribute('title', 'new title');
//doesn't do anything
canvas.win1.setTitle('New win title')
//this one works
So two questions:
1. why can't I work with title as with any other attribute ?
2. How come there's setTitle() but no getTitle() ? How can I read window title then ???
<window name="win1" title="Sample window"/>
I am trying to programmatically get/set this window's title:
canvas.win1.getAttribute('title')
//just returns empty string
canvas.win1.getTitle()
//returns error: no such method
canvas.win1.setAttribute('title', 'new title');
//doesn't do anything
canvas.win1.setTitle('New win title')
//this one works
So two questions:
1. why can't I work with title as with any other attribute ?
2. How come there's setTitle() but no getTitle() ? How can I read window title then ???