I encountered an issue where one block of code works fine on its own, but when combined with another block, only one of them functions properly.
The problem arises when I try to invoke a method from a dropdownlist
using the onchange
event, especially after adding my Protovis/JavaScript code.
<script type="text/javascript">
function getDate()
{
alert("dateValue");
}
</script>
<script type="text/javascript+protovis">
function Colour(color) {
new pv.Panel()
.width(12)
.height(20)
.anchor("center").add(pv.Dot)
.strokeStyle(null)
.fillStyle(color)
.radius(5)
.root.render();
}
</script>
<select name="mydropdown" onchange="getDate(this)">
<option value="None">Select Date</option>
</select>
I am looking for a solution to make both components work correctly together.