you can place as many statement on the same event, that include functions call. or you can write a function that perform both task. i guess you might want to pass some arguments, probably the value of selected option.
strictly said, isn't possible to have two or more separate values. however, you can have a single value in a certain format. say for example a string where each value is separate with a comma space. then split it and use accordingly.
Thank you so much, I appreciate your time helping me with this.
I understand using split() but am having issues executing it.
I can call both changePicture() or changeText() seperately but when I use the split() it breaks down.
Would you be kind enough to look at my script and tell me what you see?
You'll note the first dropdown breaks because of the value (it's pulling the whole string) but the first dropdown recognizes I want the 2nd item in the array because it's stating undefined..so the split is not making it clear.
I do not want to keep bugging you with this, but I am desperate to get it resolved for a project. VERY MUCH THANKS
var image = document.getElementById("framePic");
var dropd = document.getElementById("frameChoice");
image.src = dropd.value;
document.getElementById("frameDesc").innerHTML = select_element.value;
the event is defined such a way that the option value have to be formatted with a comma delimitation to separate values. in your html code only the first option is defined in such format, that's why you get undefined for others options.
and finally your functions, try with this:
document.getElementById("framePic").src = path;
document.getElementById("frameDesc").innerHTML = text;