VBA excel find value from HTML inside javascript element to open new ie window

smithcorya

New Member
Joined
Aug 31, 2012
Messages
8
I have a webpage with an agravating amount of javascript within the HTML code. I can view the source and find the objectID=xxxxx.xxxxx.xxxxx.xxxxx value that i need to use. I want to use the value to open a final webpage directly. I am doing this to avoid opening several pages with sendkeys.

I have tried document.innerHTML and outerHTML and I can't get the full code to parse the result.
I have tried to search by element and had no luck.

I can right click in the page in two places and click on copy shortcut and extract the links where the tag I need is listed. I don't have the skills to get the value into a variable in VBA.

Can someone shed some light on this for me? I'm stuck.

How do I find this long number in the code and hold it in a variable or see it via debug so I can make use of it?

HTML:
</tr>
<tr class="even"><td style="text-align: center"><input type="checkbox" name="emxTableRowId" value="10007.24273.17721.11501" *******="doCheckboxClick(this); doSelectAllCheck(this)">********>strPageIDs += "10007.24273.17721.11501" + "~";*********></td><td>Generic Request </td><td><table border="0">
                                    <tr><td valign="top"><a href="JavaScript:emxTableColumnLinkClick('../components/emxInfoManagedMenuEmxTree.jsp?emxSuiteDirectory=components&relId=null&parentOID=null&jsTreeID=null&suiteKey=Components&objectId=10007.24273.17721.11501', '', '', 'false', 'content', 'Show Content')"  class="object"><img border="0" src="images/iconSmallSCO.gif"></a></td><td> <a href="JavaScript:emxTableColumnLinkClick('../components/emxInfoManagedMenuEmxTree.jsp?emxSuiteDirectory=components&relId=null&parentOID=null&jsTreeID=null&suiteKey=Components&objectId=10007.24273.17721.11501', '', '', 'false', 'content', 'Show Content')" class="object">33102-1</a> </td></tr>
</TBODY></TABLE>
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,329
Messages
6,124,301
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top