Results 1 to 6 of 6

Thread: Webbrowser control?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234

    Question Webbrowser control?

    Hi,
    I'm using webbrowser control in my vb appliaction to submit some web pages and I have a problem. I put some value in html text box then I fire 'onChange' event (then javascript populate some values on web page, this is must) and then in some cases javascript open alert window with some question 'blah, blah... Yes or No?'
    Problem is how to close this alert window?
    How to 'click' on Yes button from webbrowser control?

    When javascript from web page show alert window webbrowser control fire BeforeNavigate2 and DocumentComplete events, but NewWindow2 event doesn't fire and webbrowser.document didn't changed.

    Does anyone have experience with this issue?

    thanks j

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Webbrowser control?

    yes.. but this can be a hard one.. depending on the situation

    is the JS in the html doc? or is it loaded from a js file?

    if its in the doc u can remove the line in the download complete event... will show u how if u need it.. if its loaded from a file.. I dont thin it can be done
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234

    Re: Webbrowser control?

    It's Murphy's Law again in the action

    Yes, javascript is in the external .js file. Are you sure that it cann't be done in some way?

    thanks j

  4. #4
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Webbrowser control?

    can u give me the url??

    I really dont think that the external js file is accesable....
    what is it populating? can u reproduce what it does in VB then populate the fields yourself?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234

    Re: Webbrowser control?

    I can't give you URL, this is on intranet. Also I can't do job instead javascript. I saw some solutions on net with inserting <SCRIPT defer> tag, with this tag is possible to prevent showing javascript alert messages on the screen, I'll try with this.

    thanks j

  6. #6
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: Webbrowser control?

    This may help. (google cache)
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


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