Guys
Is it possible to execute asp code held in an include file from javascript?
I need to pass some validation before the asp code is executed and a form is submitted.
Cheers
:thumb:
Printable View
Guys
Is it possible to execute asp code held in an include file from javascript?
I need to pass some validation before the asp code is executed and a form is submitted.
Cheers
:thumb:
Yes, perhaps, using XMLHTTP, but you'd have to elaborate on what you mean by 'pass some validation'...
I just want to know can I execute some server side code from javascript?
You can execute a whole page, passing it querystrings and everything, through XMLHTTP.
You cannot directly call ASP functions from client-side JavaScript, if that's what you mean. (Although Mozilla has a SOAP extension that does exactly that.)
Right, I don't know anything about xmlhttp or soap so I'm kind of scuppered.
Ok, here's a slightly different angle.
Can I execute a javascript function using asp? For example
VB Code:
<%if x > 0 then return thisfunction(); end if%>
Never mind, I've sorted it.