JavaScript and VBScript

Discussion in 'Javascript' started by JWM, May 24, 2004.

  1. JWM

    JWM Guest

    Hello: Here is what I am trying to do......

    The user clicks on the delete icon, and gets a JavaScript client-side popup
    to confirm that he wants to delete. I am passing this client-side function
    a contactID.
    Then, I want to send the result of this confirm (true|false) to a
    server-side VBScript function, along with the contactID.
    The VBScript function will then perform a delete in the database for the
    specified contactID.

    I have seen many examples about sending stuff back and forth between
    JavaScript and VBScript, between server and client, but all the examples I
    see are just popping up generic alerts and such. I need to execute some JS
    on the client side, return a value, and send it to a VBScript function on
    the server side.

    Someone please help me.

    Joe
    JWM, May 24, 2004
    #1
    1. Advertising

  2. JWM

    Randy Webb Guest

    JWM wrote:
    > Hello: Here is what I am trying to do......
    >
    > The user clicks on the delete icon, and gets a JavaScript client-side popup
    > to confirm that he wants to delete. I am passing this client-side function
    > a contactID.
    > Then, I want to send the result of this confirm (true|false) to a
    > server-side VBScript function, along with the contactID.
    > The VBScript function will then perform a delete in the database for the
    > specified contactID.


    Why do you want to call the server side script if the user doesn't want
    to delete? Seems the only time you want to send the data is when they
    want to delete.


    > I have seen many examples about sending stuff back and forth between
    > JavaScript and VBScript, between server and client, but all the examples I
    > see are just popping up generic alerts and such. I need to execute some JS
    > on the client side, return a value, and send it to a VBScript function on
    > the server side.
    >
    > Someone please help me.


    The solution will depend on the answer to one more question:

    What do you want to happen *after* the user says "Yes, I want to
    delete". Do you want the page to refresh? I would assume so. <form
    onsubnmit="return confirm('Are you sure you want to delete that record?"
    action="myFile.asp"> And have the button be a submit button, and let it
    submit the form. myFile.asp would pick up the form values, and then act
    on it.

    If you don't want the page to refresh/update, you could simply change
    the source of an image and have the myFile.asp called on the server, as
    the img src.


    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/
    Randy Webb, May 24, 2004
    #2
    1. Advertising

  3. JWM

    Randy Webb Guest

    Randy Webb wrote:

    > What do you want to happen *after* the user says "Yes, I want to
    > delete". Do you want the page to refresh? I would assume so. <form
    > onsubnmit="return confirm('Are you sure you want to delete that record?"
    > action="myFile.asp">


    That should be:

    onsubmit="return confirm('Are you sure you want to delete that record?')"




    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/
    Randy Webb, May 24, 2004
    #3
  4. JWM

    TedJM Guest

    Randy Webb <> wrote in message news:<>...
    > JWM wrote:
    > > Hello: Here is what I am trying to do......
    > >
    > > The user clicks on the delete icon, and gets a JavaScript client-side popup
    > > to confirm that he wants to delete. I am passing this client-side function
    > > a contactID.
    > > Then, I want to send the result of this confirm (true|false) to a
    > > server-side VBScript function, along with the contactID.
    > > The VBScript function will then perform a delete in the database for the
    > > specified contactID.

    >
    > Why do you want to call the server side script if the user doesn't want
    > to delete? Seems the only time you want to send the data is when they
    > want to delete.
    >
    >
    > > I have seen many examples about sending stuff back and forth between
    > > JavaScript and VBScript, between server and client, but all the examples I
    > > see are just popping up generic alerts and such. I need to execute some JS
    > > on the client side, return a value, and send it to a VBScript function on
    > > the server side.
    > >
    > > Someone please help me.

    >
    > The solution will depend on the answer to one more question:
    >
    > What do you want to happen *after* the user says "Yes, I want to
    > delete". Do you want the page to refresh? I would assume so. <form
    > onsubnmit="return confirm('Are you sure you want to delete that record?"
    > action="myFile.asp"> And have the button be a submit button, and let it
    > submit the form. myFile.asp would pick up the form values, and then act
    > on it.
    >
    > If you don't want the page to refresh/update, you could simply change
    > the source of an image and have the myFile.asp called on the server, as
    > the img src.


    what do you know about those two? stop pretending you know something.
    useless reply.
    TedJM, Jun 8, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jamie
    Replies:
    1
    Views:
    722
    Jamie
    Dec 5, 2003
  2. William F. Robertson, Jr.

    javascript and vbscript in the same page

    William F. Robertson, Jr., Dec 7, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    6,621
    bruce barker
    Dec 7, 2004
  3. COHENMARVIN
    Replies:
    2
    Views:
    875
    Jason Kester
    Oct 20, 2005
  4. Martin

    Javascript and VBScript

    Martin, Dec 3, 2003, in forum: HTML
    Replies:
    17
    Views:
    2,254
    Whitecrest
    Dec 4, 2003
  5. Shadow Lynx
    Replies:
    10
    Views:
    5,417
    Dave Anderson
    Aug 9, 2006
Loading...

Share This Page