Hello,
I'm working on a project, which requires some tasks to be accomplished in JavaScript. Sadly enough, I have no JavaScript experience.
Well, I'm trying to send over to .js two variables. Sending the first one works great. The second variable is related to <option> tag (see the code below) and cannot be put elsewhere (in the original program that part of the code is in a loop). I found that "this.value" outputs content of value attribute, but the second variable cannot be put into value attribute, because value is already occupied with some other vital content. I was trying to put it into title, class attributes, but "this.title" and "this.class" didn't work. Where should I put that final variable?
HTML Code:
<select onchange="exchange(<?php echo $one ?>,this.title)">
<option value="vital" title="$second">Some text</option> <!-- putting it into title doesn't work... -->
</select>
I hope I described the problem well enough so that someone could help me solve it. Thank you in advance!
|