That is not how http works. You will have to submit the form and then in the
new page returned by that request to the server, add Javascript code to do
whatever further processing you need.
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Andre" <aa@no.it> wrote in message
news:uhNKD9gXEHA.2844@TK2MSFTNGP12.phx.gbl...[color=blue]
> Thanks, but in fact, i need that value from ASP in the procedure
> hfd_onclick() because that value must be tested further in that procedure.[/color]
I[color=blue]
> put msgbox just to check the value. For example, if the value = 2, then
> button "A" in the page must become visible, otherwise button "B" etc ...
>
> "Patrice" <nobody@nowhere.com> wrote in message
> news:eMb0vyeXEHA.3016@tk2msftngp13.phx.gbl...[color=green]
> > It looks like you expect the change to take place immediately after[/color]
> calling[color=green]
> > the submit method. Display the HTML source for your page. It's likely[/color]
> you'll[color=green]
> > see :
> >
> > dtot.submit
> > a=0
> > MsgBox a
> >
> > So :
> > - the page is "submitted" (actually it's more likely "queued" as the[/color]
> script[color=green]
> > must terminate before the page is really submitted)
> > - a is 0
> > - 0 is displayed
> >
> > The script ends, the page is submitted and you get the new updated[/color][/color]
client[color=blue][color=green]
> > side code...
> >
> > Patrice
> >
> > --
> >
> > "Andre" <aa@no.it> a écrit dans le message de
> > news:OK2SCgeXEHA.3112@tk2msftngp13.phx.gbl...[color=darkred]
> > > Hi,
> > >
> > > I need to fetch a value in an Access db, so i use a form to pass the
> > > parameter for the SQL statement fromVB client to ASP. After the submit[/color]
> > line[color=darkred]
> > > in VBscript, i expect the value in order to test it and go further in
> > > VBscript. But my problem is when clicking on the button, that the VB[/color][/color]
> code[color=green][color=darkred]
> > > doesn't wait to get that value and continues directly, so the[/color][/color]
> a=<%=totd%>[color=green][color=darkred]
> > > line give 0 in stead of the real value. If i click a second time, i[/color][/color][/color]
get[color=blue][color=green]
> > the[color=darkred]
> > > value.
> > > Any way to let de VB code after dtot.submit wait before it gets the[/color][/color]
> value?[color=green][color=darkred]
> > > See the code:
> > > <%
> > > totd = 0
> > > dat=Request.Form("dt")
> > > If Request.Form("dt") <> "" Then totd = records()
> > > Function records()
> > > set objdc = Server.CreateObject("ADODB.Connection")
> > > objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
> > > =d:\access\newres.mdb")
> > > sql="select logon, count(uur) as totdag from studres where[/color][/color][/color]
cdate(dag)='"[color=blue]
> &[color=green][color=darkred]
> > > dat & "' "
> > > set rs=Server.CreateObject("ADODB.recordset")
> > > rs.open sql, objdc, 3, 3
> > > records=rs.recordcount
> > > Set rs = Nothing
> > > End Function
> > > %>
> > > <html><head><title>Nieuwe pagina 1</title></head><body>
> > > <script language=vbscript>
> > > sub hfd_onclick()
> > > a=0
> > > dat="6/30/2004"
> > > document.getElementById("dt").value=dat
> > > dtot.action="test3.asp" '=name of this file
> > > dtot.method="post"
> > > dtot.submit
> > > 'too fast here
> > > a=<%=totd%> '=0 on the first click, the real value on the[/color]
> > second[color=darkred]
> > > click
> > > msgbox a
> > > end sub
> > > </script>
> > > <form name=dtot>
> > > <input name="dt" type="hidden" value="" >
> > > <INPUT name=hfd TYPE="button">
> > > </form>
> > >
> > > Thanks
> > > andré
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]