BrightNail
11-24-2002, 12:43 AM
hey all,
still trying to wrap my brains around Object orientedness in Javascript..
anyways..
lets say I have a "selectdropdown" object.....in that there are a few on a page..........and I will pass to that object parameters that will then call a certain function...
so,
lets say, that I derive something I need from the "selectedIndex" from a dropdown when the select something..
Okay,, I want to call to a function...THAT THEN (because I read the selected index, and then pass the appropriate arrays to the selectdrptdown oject...which then puts these arrays into certain fucntions that change the drop dowsn....so,,
---> onChange from a select box passes the selecteIndex to a function.
--> this function then says, for instance, ok...we just got passed index 3...so, I will now pass this to a object...
selectdropdown(priceselect3,location3,item3)
---> now this object "selectdropdown"...will take those arrays...(priceselect3, location3,item3)...and then pass them to the appropraite functions..how?
this.price=popuplateSelectprice
this.location=popuplateLocation
this.item=popuplateItem
?
am I making sense?????
I think I am not understanding the creation of the object and its values and how to use those values to throw at functions..
james
still trying to wrap my brains around Object orientedness in Javascript..
anyways..
lets say I have a "selectdropdown" object.....in that there are a few on a page..........and I will pass to that object parameters that will then call a certain function...
so,
lets say, that I derive something I need from the "selectedIndex" from a dropdown when the select something..
Okay,, I want to call to a function...THAT THEN (because I read the selected index, and then pass the appropriate arrays to the selectdrptdown oject...which then puts these arrays into certain fucntions that change the drop dowsn....so,,
---> onChange from a select box passes the selecteIndex to a function.
--> this function then says, for instance, ok...we just got passed index 3...so, I will now pass this to a object...
selectdropdown(priceselect3,location3,item3)
---> now this object "selectdropdown"...will take those arrays...(priceselect3, location3,item3)...and then pass them to the appropraite functions..how?
this.price=popuplateSelectprice
this.location=popuplateLocation
this.item=popuplateItem
?
am I making sense?????
I think I am not understanding the creation of the object and its values and how to use those values to throw at functions..
james