The view-core.js file does various things, one of which is to change the image from the code above when a function is called. Here is the relevant bit of code:
As you can see, right now, all i want to happen is for anytime one of these is called, it changes the image to lepr.gif
In the other js file - survey-logic.js, I have a way of dynamically generating text areas, radio buttons, etc, but for this example we will just use the text area. I want to change the image from above using onFocus() event.
So, in the survey-logic.js file I have this:
Which in my head, should call the Update_Avatar() function from view-core.js, and change the image from my html page to ./images/lepr.gif whenever I focus on the text area. But this is not happening. So I think i either have a syntax issue with how I am using
I am doing something wrong with this
Someone mind giving me an idea where I might be screwing up here please?
True wisdom is in knowing you know nothing - Socrates
Well first it was saying focus_event is undefined, so I changed that to "2" and it doesnt give me that error. Now it is saying avatar_image is undefinedm which I assume means I need something more than what I have here:
Yeah, i know how, I just was breaking it down further and further as i was trying to get it to work. But thanks for the tip, I will be doing so, I just wanted to show what I was going for in case anyone else sees this and it can help them.