<%= functionName(value1, value2) %>
Trying to call a function which returns the modulo of two numbers, can l simply whack the function name in and the value will be returned ?
Hope that makes sense.
| SitePoint Sponsor |



<%= functionName(value1, value2) %>
Trying to call a function which returns the modulo of two numbers, can l simply whack the function name in and the value will be returned ?
Hope that makes sense.





<%= value1 Mod value2 %>



Thanks for the answer Jim, unfort the function does a few other things, so in essense l need to call it for other values, the function name is set with the modulo.
If the function is working correctly <%= functionName(value1, value2) %> should work just like <%= Date() %> shows the current date.Trying to call a function which returns the modulo of two numbers, can l simply whack the function name in and the value will be returned ?
J. Paul Schmidt
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips



Thanks Paul![]()




As long as you return the value in the function your fine. However, if you want to display the result then you need to make sure you write the code to do it
Response.write functionName(value1, value2)
or as you have done above
<%= functionName(value1, value2) %>
If you know you are always goinf to write the result to screen you could use a subroutine and just response.write the answer withing the subroutine. But the function gives you more flexibility and allows you to work with the result.



Thanks for all the answers. The function is now working as expected![]()
Bookmarks