Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Javascript - VBScript interface ... need help


Message #1 by "Bob Burkett" <bobb0198@h...> on Sun, 19 Aug 2001 17:24:07 -0500
The standard way to do this sort of thing is:
1. on the server-side when the page is first sent to the browser give the 
hidden field a (arbitrary) value that indicates that input has not been 
validated
2. on client-side provide a link to javascript validation function.  If 
all inputs are valid use js to change the value of the hidden field with 
something like document.formname.Apple.value="validated", and then use 
document.formname.submit() to send it to the server.  (Dont forget that js 
can be bypassed so you need to repeat validation at server-side).
3. back at server you can read the value using the standard Request.Form
("Apple") syntax - assuming your form has POST method.  If GET method you 
need Request.QueryString("Apple")

> 
> I have several questions ...
> 
> Suppose we are looking at VBScript  on the server side, <% .....%>, and 
> that we have a form hidden field set up as <Input type=3D"hidden" 
> name=3D"Apple"> ..., no value set at this point.   It is  my 
> understanding that I can read from and write to this hidden field using 
> client side Javascript .  My question is, "How do I read it and write to 

> it using VBScript ,<% ... %> code, back on the server side? ... other 
> than using the "value=3D something" in the input tag?"
> 
> Suppose I have a server side javascript function, and I want to call it 
> from code within <% ... %>?
> How do I do it?  I know I can do it on the client side from a link with 
> "<a href=3D"javascript:functionName(arguments) >... Can I do it outside 
> of an "href"?  Also can this part, "javascript:functionName(arguments) 
> >..., be used outside an href?
> 
> My problem is that I often have a hidden field that I want to use as a 
> flag, set to something based on some user action.  Must the use do 
> something that triggers a javascript function to set some value into 
> that hidden field?  Guess I could also do it using a client side 
> VBScript function?
> 
> Can you refer me to one or more articles or books where this interface 
> between javascript and VBScript,  client side and server side, is 
> discussed in detail?

  Return to Index