> I just get a input from another form, then pass it to a JS
> function, but it causes error, pls help to solve it.
[quoted text clipped - 10 lines]
> return str_arg.substr(1,1)
> }
What is this function? If it's supposed to be executed on the server, it should
be enclosed in <% %> delimiters. If it's supposed to be executed on the client,
it should be enclosed in <script> </script> tags *and* it can't be called by
your server-side code later on. As it is now, the code is simply an anonymous
block inside the page's head element, where it's invalid markup.
> </HEAD>
> <BODY>
[quoted text clipped - 7 lines]
> </BODY>
> </HTML>

Signature
Steve
Authority without wisdom is like a heavy axe without an edge, fitter to bruise
than polish. -Anne Bradstreet
But, how can I pass arguments to other functions, which
may be outside of <% %>?
Daniel
>-----Original Message-----
>> I just get a input from another form, then pass it to a JS
[quoted text clipped - 29 lines]
>> </BODY>
>> </HTML>
Steve Fulton - 24 Nov 2003 18:35 GMT
[quoting fixed]
>>> I just get a input from another form, then pass it to a JS
>>> function, but it causes error, pls help to solve it.
[quoted text clipped - 29 lines]
>>> </BODY>
>>> </HTML>
> But, how can I pass arguments to other functions, which
> may be outside of <% %>?
You don't have a function called jsFunction! The 'function' isn't enclosed in
<script> </script> tags or <% %> delimiters; it's just text, not code!
Your server-side code seems to expect a return value from jsFunction. If the
function is supposed to execute on the client, you can't do this. Code on the
sever executes first. The output from this code (including client-side
functions) is sent to the client, where it is parsed. Only then do client-side
functions exist as executable code--after the server-side code is destroyed!

Signature
Steve
Failures are divided into two classes--those who thought and never did, and
those who did and never thought. -John Charles Salak