--- Jeevan_Sunkersett <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I was successful in extending the List widget as
> MyList with:
>
> <script>
> function MyList()
> {
> this.dynlayer = List;
Change this.dynlayer = List to:
this.List = List
this.List()
> this.selectedIndex = List.selectedIndex;
> this.selectedItem = List.selectedItem;
> this.ievents = new EventListener(this);
> this.ievents.onselect = function(e) {
> e.getTarget().select(e.getSource());
> }
> this.ievents.ondeselect = function(e){
> e.getTarget().deselect(e.getSource());
> };
> return this;
> }
>
> MyList.prototype = new List();
>
> MyList.prototype.select = function(item)
> {
> alert("in myList select func " +
> this.getIndexOf(item));
> //this works
> window.url = http://localhost:8090
> <http://localhost:8090>
> //but this does not! Why ?
For IE and Dom browsers you should use
window.location.href instead.
> }
> MyList.prototype.deselect = function(item)
> {
> //how to call super() - The deselect function
> provided in
> the List widget
Simply use the following:
MyList.prototype._oldDeselect=List.prototype.deselect;
MyList.prototype.deselect = function(item){
this._oldDeselect(item)
// ^ this will call List deselect() function
}
> }
>
> </script>
>
> 1>But I do not wish to code a "deselect" function in
> MyList.
> It should call the default deselect() of
> List.js.
> I could not figure out how to do this.
> With an OOP like java I would normally call
> super() but what to do in
> case of JavaScript ?
>
> 2> The alert() in the select function returns the
> selected index correctly,
> but the following line (to redirect to a another
> page) does not function.
>
> Rgds
>
>
**************************************************************************
>
> This email (including any attachments) is intended
> for the sole use of the
> intended recipient/s and may contain material that
> is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance
> by others or copying or
> distribution or forwarding of any or all of the
> contents in this message is
> STRICTLY PROHIBITED. If you are not the intended
> recipient, please contact
> the sender by email and delete all copies; your
> cooperation in this regard
> is appreciated.
>
**************************************************************************
>
>
>
-------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/dynapi-help
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help