<script>
$("select").change(function () {
var str = "";
var price = <?php echo $row[price];?>;
$("select option:selected").each(function () {
str += $(this).text() + " ";
});
$(".plan_price").text("price : " + parseInt(str)*price + " baht");
})
.change();
</script>
So I got this .each and .change function here and I wanted to return the value of str from this whole functions so that I can use the str variable value in other places in my code
The problem I have is where to put the return and the name of the function when I call it somewhere else in my code like document.write(nameOfFunction) Please help
Thanks Alot !
Tony