Need help just starting javascript

admin

Administrator
Staff member
I am having a problem getting a numerical variable to be recognized as a string variable.

Eg.

<script language=javascript><!--
var weight = 3
function goldprice(){
var price
var goldcost = 350
price = goldcost * weight
}
-->
</script>

<INPUT type="hidden" name="postmode" value=http://www.webdeveloper.com/forum/archive/index.php/"SINGLEPOST">
<span>7 inch SS Box</span><br>
<select name="order">
<option value="">Choose Weight

<script language=javascript><!--

goldprice()

document.write('<option value = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->\"ssboxxlt7----7 Inch Sterling Silver Extra-Light Box Link Chain----')
document.write(price) //doesn't work, but if I put an actual # in it works
document.write('----2----1/">X-Light $')
document.write(price)
-->
</script>

<option value=http://www.webdeveloper.com/forum/archive/index.php/"ssboxlt7----7 Inch Sterling Silver Light Box Link Chain----6.00----2----1">
Light $6.00
 
Back
Top