Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to call a onclick function that having SQL statement in a image?

    Hi,

    If I'm having an image and when I onclick on the image, the onclick function should call a function which will do the UPDATE SQL statement .

    Ex:

    <img......onclick="update()">

    function update()
    {
    update mmpo(table name) set user(field name) = 0;

    }

    how can I do using ASP & Microsoft SQL?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    never tried this before, not sure if it would work or not...

    try using VBScript (Note, this will only work in IE4+)

    <script language="VBScript" runat="Server">
    Function update()
    update mmpo(table name) set user(field name) = 0
    End Function
    </script>






    Please keep in mind that I have no idea if this will work or not even in Internet Explorer. Just one of the random ideas I got.

    Happy programming

    ~Quack


  •  

    Posting Permissions

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