princessk1
Programmer
I am trying to pass 2 variables from my server side code to a client side function. I can pass one with no problem but can't seem to get the syntax to pass 2. This is part of my code.
<SCRIPT LANGUAGE = VBScript>
Function Calculate (ctgy,num)
msgbox(ctgy)
msgbox(num)
End Function
<form name= "Percents" method="post" action="SaveInfo.asp" >
<% ctgy = "General" %>
<td align = right><input type = "text" align=right name = "general<% =n%>" size=4 value=<% =actualpercent %> onchange=Calculate("<% =ctgy %>"
></td>
This passes the the value of ctgy (general) to the function.
When I try to add a second parameter, it causes an error on the page.
<form name= "Percents" method="post" action="SaveInfo.asp" >
<% ctgy = "General" %>
<% num = 5 %>
<td align = right><input type = "text" align=right name = "general<% =n%>" size=4 value=<% =actualpercent %> onchange=Calculate("<% =ctgy %>", <% =num %>)></td>
Any ideas
<SCRIPT LANGUAGE = VBScript>
Function Calculate (ctgy,num)
msgbox(ctgy)
msgbox(num)
End Function
<form name= "Percents" method="post" action="SaveInfo.asp" >
<% ctgy = "General" %>
<td align = right><input type = "text" align=right name = "general<% =n%>" size=4 value=<% =actualpercent %> onchange=Calculate("<% =ctgy %>"
This passes the the value of ctgy (general) to the function.
When I try to add a second parameter, it causes an error on the page.
<form name= "Percents" method="post" action="SaveInfo.asp" >
<% ctgy = "General" %>
<% num = 5 %>
<td align = right><input type = "text" align=right name = "general<% =n%>" size=4 value=<% =actualpercent %> onchange=Calculate("<% =ctgy %>", <% =num %>)></td>
Any ideas