[thelist] ASP passing value to javascript for loop

Simon Willison cs1spw at bath.ac.uk
Mon Mar 18 14:07:08 CST 2002


Gary Swanson wrote:

>I am trying to pass a value to javascript from an ASP page and am stuck.
>I have passed the value within the ASP by creating a hidden input field with
>the value assigned to it.
>
Why not just get the ASP code to output the value as a JavaScript
assignment somewhere in the <script> bit:

<script language=javascript>
repeatval = <% response.write(value) %>
/* more javascript here */
</script>

No idea if that's correct syntax, I'm a PHP monkey.







More information about the thelist mailing list