Jump to content

Javascript button with no ID#


 Share

Recommended Posts

Trying to click on a Java button but it has no ID  , The menu I'm trying to click on is named "r.2". Standard scripts do not seem to work without a ID.

 

Partial source code from Java script

 <div class=sbmenu OnMouseOver="dOver(this);" OnMouseOut="dOut(this);" id="r" parentmenu="GMS">
<table cellspacing=0>
<tr menuname="r.1" onclick="modclk(this,'WEB.CLAIMS','CUSTOM*SSE','SSE');" OnMouseOver="mOver(this);" OnMouseOut="mOut(this);"><td><b>SSE</b><br>Serial Number Eligibility</td><td align=right><img src="images/..\Custom\images\module.gif" align=absmiddle></td></tr>
<tr menuname="r.2" onclick="modclk(this,'WEB.CLAIMS','O*CLAIMS','CLAIMS');" OnMouseOver="mOver(this);" OnMouseOut="mOut(this);"><td><b>CLAIMS</b><br>Warranty Claim Entry</td><td align=right><img src="images/..\Custom\images\module.gif" align=absmiddle></td></tr>
<tr menuname="r.3" onclick="modclk(this,'WEB.CLAIMS','O*CLAIM.RPT.WEB','CLAIM.RPT.WEB');" OnMouseOver="mOver(this);" OnMouseOut="mOut(this);"><td><b>CLAIM.RPT.WEB</b><br>Warranty Claim Report</td><td align=right><img src="images/..\Custom\images\module.gif" align=absmiddle></td></tr>
<tr menuname="r.4" onclick="modclk(this,'WEB.CLAIMS','CSOP*CLAIM.APP','CLAIM.APP');" OnMouseOver="mOver(this);" OnMouseOut="mOut(this);"><td><b>CLAIM.APP</b><br>Claims Paid and Application Breakdown</td><td align=right><img src="images/..\Custom\images\module.gif" align=absmiddle></td></tr>

 

Regards,

 

Link to comment
Share on other sites

Have you looked into using _IETagNameGetCollection? You would get a collection of TR elements and then process them one by one until you find the desired one. Search the forum for examples of doing this with other element types.

You could also take a look at this function to retrieve the element using xpath.

Link to comment
Share on other sites

Trying this but can't seem to make it work.

Local $onClicks = _IETagNameGetCollection($oIE, "tr")
For $onClick In $onClicks
    If $onClick.classname == "r.2" Then _IEAction($onClick, "click")
Next

Here's part of the webpage source code.

 <div class=sbmenu OnMouseOver="dOver(this);" OnMouseOut="dOut(this);" id="r" parentmenu="GMS">
<table cellspacing=0>
<tr menuname="r.1" onclick="modclk(this,'WEB.CLAIMS','CUSTOM*SSE','SSE');" OnMouseOver="mOver(this);" OnMouseOut="mOut(this);"><td><b>SSE</b><br>Serial Number Eligibility</td><td align=right><img src="images/..\Custom\images\module.gif" align=absmiddle></td></tr>
<tr menuname="r.2" onclick="modclk(this,'WEB.CLAIMS','O*CLAIMS','CLAIMS');" OnMouseOver="mOver(this);" OnMouseOut="mOut(this);"><td><b>CLAIMS</b><br>Warranty Claim Entry</td><td align=right><img src="images/..\Custom\images\module.gif" align=absmiddle></td></tr>
<tr menuname="r.3" onclick="modclk(this,'WEB.CLAIMS','O*CLAIM.RPT.WEB','CLAIM.RPT.WEB');" OnMouseOver="mOver(this);" OnMouseOut="mOut(this);"><td><b>CLAIM.RPT.WEB</b><br>Warranty Claim Report</td><td align=right><img src="images/..\Custom\images\module.gif" align=absmiddle></td></tr>

 

Regards,

 

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