Results 1 to 3 of 3

Thread: how to simulate click on an image as the submit button

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    Hong Kong
    Posts
    62

    Question

    I'm using webbrowser control. I use the web1.Navigate method to go to "http://www.abc.com/abc.htm" . On this html there is a form called "form1". Inside this form there are several input textboxes for user to key in the values. At the end of this form there is something like this:
    Code:
    <input type="image" src="../image/abc.gif" border=0>
    How can click on this image using programme code? If it is something like this:
    Code:
    <input type=submit name=hello value="GO">
    then I'd do something like this:
    Code:
    web1.document.forms("form1").hello.click
    and I can click on it. How about the image?? Thanks!
    Please Visit My WebCam!!
    http://www.hmcheung.com

  2. #2
    Guest
    First , for your image button write something like this :

    <a href="javascript:void(0);" onClick="YourFunction();">
    <img src="anysource" name="youName">
    </a>

    Now, you don't have to call click event from a code.
    You just call YourFunction(); when you want to.

  3. #3
    Fanatic Member
    Join Date
    Jun 2000
    Posts
    537

    i'm not sure i understand....

    <input type=button src=../images/mypic.gif onClick=window.location='myNewPage.asp'>

    this will show an image for inplace of a button and when clicked send the load myNewPage.asp into the browser.


    i've never heard of web1.navigate method....??
    pnj

Posting Permissions

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



Click Here to Expand Forum to Full Width