X
Xeno Campanoli
Say, I usually have .rhtml/eruby access to all my values, but I'm seeing this
weird case, possibly because I'm using https instead of http (I cannot think of
anything else) that doesn't allow the values from <%= $x %> to be utilized in
javascript methods. When I do the following:
<%
$x = $cgi['x']
puts "trace $x: #{$x}"
%>
<script type="text/javascript">checkX("<%= $x %>");</script>
in the source view from the browser it always shows:
<script type="text/javascript">checkX("")</script>
even though my logs show the line with "trace $x: value of x".
What gives? Is this a known or unexpected behavior? Is there a way I can get
around it?
I have tried it several ways, and I know I'm not mistaken.
Sincerely, Xeno
weird case, possibly because I'm using https instead of http (I cannot think of
anything else) that doesn't allow the values from <%= $x %> to be utilized in
javascript methods. When I do the following:
<%
$x = $cgi['x']
puts "trace $x: #{$x}"
%>
<script type="text/javascript">checkX("<%= $x %>");</script>
in the source view from the browser it always shows:
<script type="text/javascript">checkX("")</script>
even though my logs show the line with "trace $x: value of x".
What gives? Is this a known or unexpected behavior? Is there a way I can get
around it?
I have tried it several ways, and I know I'm not mistaken.
Sincerely, Xeno