Using VBscript msgbox with ASP

Results 1 to 5 of 5

Thread: Using VBscript msgbox with ASP

  1. #1
    Joe Contreras Guest

    Default Using VBscript msgbox with ASP

    Hi, I&#039m trying to do the following:<BR>A user enters a new invoice record and submits the record, but before submitting the record I want a msgbox to prompt if they would like to continue entering more records or go to the summary invoice page.<BR><BR>I&#039d liked to use this process, but I&#039m not sure how I can interact an ASP only page with VBScript. I&#039m using a SQL Server 7.0 database.<BR>Thanks<BR>

  2. #2
    Ali Guest

    Default RE: Using VBscript msgbox with ASP

    A little JavaScript is the easiest, actually:<BR>window.alert("MyMsg")<BR>You can call a function that sends the alert from your onSubmit procedure.

  3. #3
    Joe Contreras Guest

    Default RE: Using VBscript msgbox with ASP

    But what is the equivalent of the Yes/No msgbox. Also I&#039m using an ASP page (no HTML) to process my records to SQL Server. This is pretty much a transparent page just prompting a message box.<BR><BR>Thanks

  4. #4
    Mark Jinkens Guest

    Default RE: Using VBscript msgbox with ASP

    In Order for it to pop up on their screen and not the webservers you have to use Client Side Script.<BR><BR>&#060;script language=vbscript&#062;<BR>Function frmMain_OnSubmit()<BR> Action = MsgBox "Would you like to input more invoices?",4,"Message Title"<BR> If Action = 6 then<BR> Window.navigate("addmoreinvoices.asp")<BR> else<BR> window.navigate("doneinputtinginvoices.asp")<BR> end if <BR>End Function<BR>&#060;/script&#062;<BR><BR>COMMENTS: <BR> VB lang reference -<BR> ON the message box 6=yes, 7=no<BR> You can write server side values by &#060;%=SOMEVARIABLE%&#062;

  5. #5
    Joe Contreras Guest

    Default RE: Using VBscript msgbox with ASP

    Thanks, but I&#039m still not where I want to be. My situation is I don&#039t have a form, the following is what I have:<BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;%<BR>DataConn=Session("pit_conn") <BR>MDFID = Request.QueryString ("MDFID")<BR><BR>ClaimNo = Request.form("Claims")<BR>If MDFID &#060;&#062; "" Then<BR> &#039==========================<BR> &#039SQL using MDFID to update<BR> &#039current record<BR> &#039==========================<BR>SQL = "SELECT * FROM tblMDFProgramClaims WHERE MDFID = " & MDFID<BR>Set oRS = Server.CreateObject("ADODB.Recordset")<BR>oRS.Open SQL, DataConn,3,3<BR> oRS("ClaimsNo") = ClaimNo<BR> oRS.Update<BR> oRS.MoveLast<BR> oRS.Close<BR> set oRS = nothing<BR>End if<BR>%&#062;<BR><BR>How Do I Call the VB Script function within my current asp page? or Can I accomplish this?<BR><BR>Thanks<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts