Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Help with using iweb


  • Please log in to reply
8 replies to this topic
NewGuest
  • Guests
  • Last active:
  • Joined: --
I have recently tried to use iweb [Project Development]IE Web Recorder Developers Needed...

But I dont seem to get things working out at a particular point. Hope the developers might help me with this one.

Here is the scenario how it works if i do the task manually. We have a website where in there are a few dropdown lists, upon clicking on a particular dropdown menu and selecting an option the page would refresh accordingly based on the selection.

Now I tried to automate this stem using iweb. and I used the following code:
iWeb_setDomObj(pwb,"arid740001272","Whats in my box")

This runs fine and the the item in the dropdown shows "Wants in my box", however I dont know if it really sets the option to the one in the list or it just types it out. and moreover after setting it the page does not refresh based on the option. which should ideally happen if I do it manually by mouse click.

Please help.
iweb is a great start.
My best regards

sinkfaze
  • Moderators
  • 6367 posts
  • Last active: Nov 30 2018 08:50 PM
  • Joined: 18 Mar 2008
iWeb_setDomObj simply sends the text to the dropdown, if there is a conditional JavaScript event based on selecting a dropdown option it will not fire that (yet). In virtually all cases the JS event for a dropdown is "onchange", which you can confirm by checking the OuterHTML box in the recorder one you're focused on the dropdown. Here's an example of a JavaScript event in the OuterHTML for the Bold button while posting a reply here at the forums:

<INPUT class=button onmouseover="helpline('b')" style="FONT-WEIGHT: bold; WIDTH: 30px" accessKey=b [color=red]onclick=bbstyle(0)[/color] type=button value=" B " name=addbbcode0>

If you want to just give it a try with onchange, try this:

iWeb_setDomObj(pwb,"arid740001272","Whats in my box")
COM_Invoke(pwb,"document.all[arid740001272].fireEvent","onchange")

It's a little tedious to have to fire the event as a separate instance but that should be corrected in the near future. In the meantime, here is a JavaScript event reference so you can see all of the different events you might find on a web page.

jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
fireEvent - for some reason I wasn't aware you could do that. Thanks sinkfaze :D .

NewGuest
  • Guests
  • Last active:
  • Joined: --
Thank you sinkfaze I will try it and let you know if it works or not.

NewGuest
  • Guests
  • Last active:
  • Joined: --
I have somehow managed to get my task done, and in continuation of this task I have a button on the page which is used to refresh the list to check any new updates.

Well I have also got it working with the code: iWeb_clickText(pwb,"Refresh")

I have set a timer to run at interval 1 min where it calls iWeb_clickText(pwb,"Refresh")

The problem now is that it does work and refreshes the page, but the window comes on top of all the other window if I am working on any other program. Is there anyway to make it work in the background and not come in focus.

Thanks in advance