Jump to content

What to do when a link isn't a link?


Recommended Posts

I have a table of data that is generated by a javascript. Each row of the table highlights on hover and shows a GIF that appears to be a link to the specific data. When I look at the properties of the link, it is just an image (/controlPanel/images/actions-hover-left.gif) and the only thing I can find that seems like it is a link is an onclick="javascript:gradeAssignment('nnnnnn');return false; **The 'nnnnnn' is a variable, different for each "assignment" that has been submitted for a grade.

The original version of this script just called a link using IEGetObjectbyName, and since the grading program was updated, it isn't able to find that link.

So, can anyone tell me what I have to do in order to launch that javascript?

Thanks!

Link to comment
Share on other sites

I tried adding the Function "IEEval" to my AutoIT script and have to admit I have no idea what it is supposed to do.

It looks like Return $o_object.document.parentwindow.eval ($s_eval) is supposed to supply the onclick=javascript:gradeAssignment as a variable?

Then I should replace what was submitting the mouse click before with a call to this function?

I am not even sure of what I don't know at this point ;)

The event onclick="javascript:gradeAssignment doesn't occur until a tablerow in the assignment table is activated with a mouse over.

So I guess what I need to do is know how to "trigger" the javascript:gradeAssignment each time the assignmentsGrade.asp window is opened, or the focused window.

Is there any other information that I can provide that would be beneficial in figuring this out?

Thanks so much for the help so far. I just don't know if it is what I need....

F~

Link to comment
Share on other sites

You'll likely need to get a reference to the gif or table cell and then call _IEAction, click

Dale

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

I think I know what you mean, but I also think I have isolated the root of my issue. What I have found is that until one of the table rows is highlighted, the onclick=javascript:gradeAssigment isn't available. Until that mouseover occurs, there is no item to select.

So, what I now have to work out is how to activate the tablerow in such a fashion as to present the onclick=javascript:gradeAssignment event. Then have that continue to happen as each assignment is graded and the window changes.

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...