Hello,
I am trying to unravel some code from a predecessor.
There is a function in the head tag.
The value d_cnt is pulled from a record set later in the file.
I wanted to add another variable to pass to the same function from the same record set on the next line in the asp page.
It keeps showing as 'undefined' when I set an alert in the function to write the new variable out.
I am not really certain what this methodology is called in order to google it. What do I need to study/get advice on, to replicate this behavior with new variables. I am missing something elementary and can't get it to work.
Thanks
Patrick
I am trying to unravel some code from a predecessor.
There is a function in the head tag.
Code:
<script>
function submitForm(){
frm=self.document.Edit
// alert('d_cnt ' + d_cnt)
// alert('billto ' + billto)
if ( (Number(d_cnt)+Number(frm.order_quantity.value)) > 192 ) {
alert("Order quantity exceeds calendar month limit of 192.")
frm.order_quantity.focus()
frm.order_quantity.select()
}
else {
frm.submit()
}
}
</script>
The value d_cnt is pulled from a record set later in the file.
Code:
//connects to db, runs query
Write("<SCRIPT>var d_cnt="+icurs("d_cnt")+";</SCRIPT>")
I wanted to add another variable to pass to the same function from the same record set on the next line in the asp page.
Code:
Write("<SCRIPT>var billto="+icurs("Billto")+";</SCRIPT>")
It keeps showing as 'undefined' when I set an alert in the function to write the new variable out.
I am not really certain what this methodology is called in order to google it. What do I need to study/get advice on, to replicate this behavior with new variables. I am missing something elementary and can't get it to work.
Thanks
Patrick