Jump to content

Following java link, IE


furrycow
 Share

Recommended Posts

Okies, so ive looked at Dales DebugBar, ive looked at previous posts about clicking java links, but can still not get this to work.

This site is:

http://www.fonetastic.com/global/login.php

The code i have been trying to use to get this to work:

$oIE = _IECreate("http://www.fonetastic.com/global/login.php", 0,1,1,0)
Sleep(1000)

$oForm = _IEFormGetCollection ($oIE,0)

$ologin = _IEFormElementGetObjByName ($oform, "nickname")
$opassword = _IEFormElementGetObjByName ($oform, "password")
$ocode = _IEFormElementGetObjByName ($oform, "secimg")

_IEFormElementSetValue ($ologin, $username)
_IEFormElementSetValue ($opassword, $password)
_IEFormElementSetValue ($ocode, "1234")

_IENavigate($oIE,"java script:document.loginBOX.submit()")

EDIT: java script having no space in between

i understand its java, but java i dont understand. Currently, this fills in all the correct boxes, but when it comes to submitting it, it loads the page as if it has correctly submitted the data, but it must go wrong somewhere as it doesnt log in. (Yes my credentials are correct)

Have i missed off something really simple??

I know that the submit button is called "login", but....

$osignin = _IEFormElementGetObjByName ($oform, "login")

.
.
.

_IEAction ($osignin, "click")

does not work (im assuming because it is in java)

Any help would be greatfully received!

Edited by furrycow
Instant Lockerz Invite - www.instantlockerzinvite.co.uk
Link to comment
Share on other sites

Please don't confuse Javascript and Java. They only thing they have in common is... the first 4 letters of their names...

Why not try:

_IEImgClick ($oIE, "http://www.fonetastic.com/img/template/default/index/btn-login.gif")

Dale

Edit: typo... missing )

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...