|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
advanced use of images in objects
ok, noone touched my inner html issue so lets try this one.
anyone ever stored an Image inside an object? I want to declare an object which has an image as one of it's data items. so I created a constructor which passes the source file in. I tried this.mypic = new Image(); this.mypic.src = src_in; I tried mytmp = new Image(); mytmp.src = src_in; (which works) this.mypic = mytmp; (which does not) I am trying to scour the docs and also my o'reilly book but I am coming up short here. any ideas? |
|
#2
|
|||||
|
|||||
|
RE: advanced use of images in objects
here is a little test
here is the link http://www.hysteriaweb.net/stuff/temp/jsxmenu2/test.html do not worry about the graphics, watch the errors. this is IE only please. what I do is create an image as part of an object and assign a src to it, then I wish to use that image inside the object functions. I use a popup alert to test the src is being set, which you see it is, then I in the function I get an error. because the this.mysrc.src (and even this.mysrc) are not defined. I have used javascript function elsewhere just fine, and I can assign regular variables, just not Images. what is the deal here???? thanks, hope you guys can help. here is the code php Code:
|
|
#3
|
|||
|
|||
|
RE: advanced use of images in objects
Resolved by lack of activity.
Original poster, please place in unresolved status if you still need help. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > advanced use of images in objects |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|