Jump to content

Java Script and _IExxx functions


CaverDude
 Share

Recommended Posts

Does Java Script that produces HTML create objects that can be referenced by _IExxxx functions?

And if it does, which functions would I use to get to ' id="rowCETH" ' via these functions? (See below.)

Thanks, this is on great tool.

CaverDude

<html>

<head>

<title>Order Status</title>

<META NAME="TITLE" CONTENT="Order Status">

<META NAME="DESCRIPTION" CONTENT="Find information about your open orders, your order activity, and your filled orders (trades) for the time period of your choosing.">

<script language="javascript">

parent.init('snapticket','/cgi-bin/apps/u/EquityTrade?snapid=snap');

//fields sorted by these variables

var sortorder = "DOWN";

var sortfield = "date";

var topbtns = false;

//quick select vars

var allCheckName = "allOpenOrders";

var allCount = 1;

var totalItems = 1;

var qs = []; //do not load quick select objects until user attempts to cancel

qs["CETH"] = [2563617320];

//do not load object until user attempts to cancel/modify order

var holdOrder = []; var holdComplexOrder = [];

var rowidmap = [];

holdOrder["2563617320"] = "new Openorder('2563617320','CETH','Limit','2600','0.67','','12','20','06','','open'); ";

</script>

<script language="javascript" src="/amer/scripts/Openorder.js"></script>

<script language="javascript" src="/amer/scripts/universal.js"></script>

<script language="javascript" src="/amer/scripts/orderstatus.js"></script>

<script language="javascript" src="/amer/scripts/quickselect.js"></script>

<script language="javascript" src="/amer/scripts/more.js"></script>

<link rel="stylesheet" type="text/css" href="/amer/css/universal.css">

<link rel="stylesheet" type="text/css" href="/amer/css/quickselect.css">

<link rel="stylesheet" type="text/css" href="/amer/css/headers.css">

<link rel="stylesheet" type="text/css" href="/amer/css/more.css">

<link rel="stylesheet" type="text/css" href="/amer/css/tables.css">

<link rel="stylesheet" type="text/css" href="/amer/css/broadcast.css">

<link rel="stylesheet" type="text/css" href="/amer/css/errors.css">

<style>

.expandicon, .collapseicon {cursor:pointer;cursor:hand;margin-top:2px;width:11px; height:11px; background-repeat:no-repeat;border:none;}

.expandicon {background-image:url(/amer/images/btn_plus.gif);}

.collapseicon {background-image:url(/amer/images/btn_minus.gif);}

.orderstring{color:#003366;font-size:10px;}

.osCriteria td { white-space:nowrap; }

.highlightOn {background-color:#ff9900;width:3px;height:26px;font-size:1px; line-height:1px;}

.highlightOff {background-color:#fff;width:3px;height:26px;font-size:1px; line-height:1px;}

#nestedsectable td {border:none}

.t0 a { color:#2e66b5; font-weight:bold; }

.t0 tr.header td { border-bottom:1px solid #d8d8d8; }

.t0 tr.header td a { font-weight:normal; }

.t0 tr.osspacerrow td { background-color:#fff; height:6px; }

.t0 tr.bottomBorder td { border-top:1px solid #808080; height:1px; line-height:1px; }

.t0 tr.rows td { background-color:#ededed; border-bottom:1px solid #ededed; color:#666666; border-top:none; }

.t0 tr.rows td a { color:#666666; font-weight:normal; }

.t0 tr.rowssec td { background-color:#f4f4f4; border-bottom:1px solid #ededed; color:#666666; font-family:arial; }

.t0 tr.openrows td { background-color:#d8e8da; }

.t0 tr.openrowssec td { background-color:#eff7eb; border-bottom:1px solid #D5DEE8; color:#666666; font-family:arial; }

.t0 tr.pendingrows td { background-color:#FFF8DB;}

.t0 tr.pendingrowssec td { background-color:#fffcee; border-bottom:1px solid #fcedb0; color:#666666; font-family:arial; }

.t0 tr.cancelrows td { background-color:#ffe4af; border:none; }

.t0 tr.cancelrowssec td { background-color:#fff3e5; border-bottom:1px solid #ffeacb; color:#666666; font-family:arial; }

.modifiedtext { border:2px solid #ff9900; }

td.rejected_order td { font-weight:bold; font-size:11px; white-space:normal; }

td.rejected_order td.rejected_order_label { color:#FF0000; padding:0 5px 0 0; white-space:nowrap; }

</style>

</head>

<body onload=" init();">

<div class="navigation">

<table cellspacing="0" class="headerDropdownsTable">

<tr>

<td><a href="/cgi-bin/apps/u/Home" class="noHover"><img src='/amer/images/logo_apex.gif' alt='Home'>

</a></td>

<td width="100%"><div class="spacer">&nbsp;</div></td>

<td style="vertical-align:bottom; padding-bottom:5px;">

<table cellspacing="0">

<tr class="headerLabels">

<td>Shortcuts</td>

<td colspan="2">Get Quotes</td>

<td colspan="2">Search</td>

<td height="15">Account</td>

<td align="right" style="padding-right:3px;"><a href="#" onclick="top.location.href='/cgi-bin/apps/LogOut'">Log Off</a></td>

</tr>

<tr>

<td style="padding-right:8px;"><form name="myShortcutsform" id="myShortcutsform" >

<select name="myShortcuts" style="width:149px; background-color:#FFF8DB;" onchange="if (this.value != 'none') { parent.myShortcuts('/cgi-bin/apps/u/AccountSettings?pagehandler=PHShortcutsLauncher&id=',this.value); return false; }">

<option value="none">Select...</option>

<option value="SSQ">Quicklaunch Streamer Suite</option>

<option value="STC">Streamer Console</option>

<option value="SP">Streamer Portfolio</option>

<option value="SC">Streamer Charts</option>

<option value="CC">Command Center</option>

<option value="BP">Balances &amp; Positions</option>

<option value="OS">Order Status</option>

<option value="MMD">Market Motion Detector</option>

<option value="QS">QuoteScope</option>

<option value="TS">Trade Stocks</option>

<option value="TO">Trade Options</option>

<option value="TMF">Trade Mutual Funds</option>

<option value="HS">History &amp; Statements</option>

<option value="WL">Watch Lists</option>

<option value="CH">Charts</option>

<option value="none">---------------------------</option>

<option value="ES" style="font-weight:bold;">Edit shortcuts</option>

</select>

</form></td>

<!--start quote form-->

<form name="findform" id="findform" method="get" onsubmit="return parent.submitFind(document.findform, 'https://research.ameritrade.com/wwws/stocks/overview/overview.asp?CDI=A000000013076936&user_id=A000000013076936&Domain=https://wwws.ameritrade.com&vendorDomain=ameritrade.com&wDir=wwws');">

<!-- if example text in the input field changes, make those changes also in main.js //pd -->

<td><input type="text" name="symbol" style="width:100px" value="ex: MSFT, +IBMAT" onclick="parent.clearField(this.form)"></td>

<td class="buttonPad" style="padding-right:8px;"><input type="hidden" value="go"><a href="#" id="navgobtn2" class="btnLinkOff" onclick="return parent.submitFind(document.findform, 'https://research.ameritrade.com/wwws/stocks/overview/overview.asp?CDI=A000000013076936&user_id=A000000013076936&Domain=https://wwws.ameritrade.com&vendorDomain=ameritrade.com&wDir=wwws');">Go</a></td>

</form>

<form name="searchform" id="searchform" onsubmit="return parent.launchSearchBox(document.searchform);">

<!-- if example text in the input field changes, make those changes also in main.js //pd -->

<td valign="middle"><input type="text" name="search" style="width:107px;" value="ex: Margin trading" onclick="parent.clearField(this.form)"></td>

<td class="buttonPad" style="padding-right:8px;"><input type="hidden" value="go"><a href="#" id="navgobtn1" class="btnLinkOff" onclick="if (parent.launchSearchBox(document.searchform)) document.searchform.submit();">Go</a></td>

</form>

<!--end search form-->

<form name="linkform" id="linkform">

<td colspan="2"><select name="link" style="width:116px;" onchange="eval(this.value);">

<option value="">more4don</option>

<option value="">-----------------------------</option>

<option value="location.href='/cgi-bin/apps/u/AccountManagement'" style="color:#D5801E; font-weight:bold;">Link Accounts</option>

</select></td>

</form>

</tr>

</table></td>

</tr>

</table>

<script type="text/javascript">

function linkTarget(url){

window.location.href = url;

}

</script>

<div id="topNav">

<table id="nav" width="100%" cellspacing="0">

<tbody>

<tr id="navIndicator">

<td colspan="2" id="homeIndicator"><div class="indicator1"></div><div class="indicator2"></div></td>

<td id="portfolioIndicator"><div class="indicator1"></div><div class="indicator2"></div></td>

<td id="tradeIndicator"><div class="indicator1"></div><div class="indicator2"></div></td>

<td id="researchIndicator"><div class="indicator1"></div><div class="indicator2"></div></td>

<td id="toolsIndicator"><div class="indicator1"></div><div class="indicator2"></div></td>

<td id="goalsIndicator"><div class="indicator1"></div><div class="indicator2"></div></td>

<td colspan="2" id="clientIndicator"><div class="indicator1"></div><div class="indicator2"></div></td>

</tr>

<tr><td colspan="9" valign="top"><div style="margin-left: 0px; margin-right: 2px;" id="topCurveUpper" class="hr">&nbsp;</div></td></tr>

<tr><td colspan="9" valign="top"><div style="margin-left: 0px; margin-right: 1px;" id="topCurveLower" class="hr">&nbsp;</div></td></tr>

<tr onclick="this.blur();" id="navb script:void(0)" onclick="window.open('https://research.ameritrade.com/wwws/delayedinfo.asp?CDI=A000000013076936&user_id=A000000013076936&Domain=https://wwws.ameritrade.com&vendorDomain=ameritrade.com&wDir=wwws ','','width=705,height=500,scrollbars=yes')" class="delayedLink">delayed</a>.

<!-- CAUTION: Must change multipleReview page... js escaped version. -->

</td>

</tr>

</table>

<table cellspacing="0" style="margin-left:4px;">

<tr>

<td><a href="#" id="bottomCancel" class="btnLinkOff" onclick="submitString();return false;">Cancel</a></td>

<td><div class="spacer" style="width:8px;">&nbsp;</div></td>

<td><a href="#" id="bottomReplace" class="btnLinkOff" onclick="submitString();return false;">Replace</a></td>

<td><div class="spacer" style="width:8px;">&nbsp;</div></td>

<td><a href="#" id="bottomCancelReplace" class="btnLinkOff" onclick="submitString();return false;">Cancel & Replace</a></td>

<td><div class="spacer" style="width:18px;">&nbsp;</div></td>

<td width="100%" class="orderstring" id="ordstring">&nbsp;</td>

<td><a href="#" id="bottomUndo" class="btnLinkOff" onclick="undoAllChanges();return false;">Undo All</a></td>

</tr>

</table>

<script language="javascript">

var sortUp = new Image(6,6);

var sortDown = new Image(6,6);

sortUp.src = "/amer/images/sort_up.gif";

sortDown.src = "/amer/images/sort_down.gif";

</script>

</form>

<!-- outer table-->

</div>

<div id="disclaimerShell">

<p class="disclaimerItalic">Options are not suitable for all investors as the special risks inherent to options trading may expose investors to potentially rapid and substantial losses. Please read <a href="http://www.optionsclearing.com/publications/risks/riskchap1.jsp" target="_blank">Characteristics and Risks of Standardized Options</a> before investing in options.</p>

<p class="footnote"><a href="http://www.tdameritrade.com/forms/ATI5334.pdf" target="_blank">Apply for options trading</a>.</p>

<p class="footnote">Please review the <a href="#" onclick="parent.popLegal('/cgi-bin/apps/u/MarginReq?filter=A');">Special Margin Requirements</a> for certain securities.</p>

<p class="footnote">Orders for OTCBB securities are subject to the <a href="#" onclick="parent.popLegal('/cgi-bin/apps/u/PLoad?pagename=legal/otcbb_traderules.html');">OTCBB Securities Trading Rules</a>.</p>

<div class="footnote"><p>Extended-hours quotations may be delayed, may reflect only the securities closing price, and may not include information from all extended-hours market participants. Extended-Hours Trading is subject to the <a href="#" onclick="parent.popLegal('/cgi-bin/apps/u/PLoad?pagename=legal/exthrs_traderules.html');">Extended-Hours Trading Rules</a>.</p></div>

<div class="footnote"><p>Execution price, speed and liquidity are affected by many factors, including market volatility, size and type of order and available market centers. Price can change quickly in fast market conditions, resulting in an execution price different from the quote displayed at order entry. We cannot guarantee prices on market orders. In addition, there is the risk that outages involving your access to the Internet or our own systems may interfere with your ability to access your online account. If you experience difficulties, please contact a <a href="/cgi-bin/apps/u/PLoad?pagename=clientbenefits/contactUs.html">Client Services representative.</a></p></div>

</div>

<script type="text/javascript">

var frameLocation = document.location.href;

function getFooterLink(url){

if (frameLocation.indexOf("display") > -1){

parent.opener.top.main.location.href = url;

parent.opener.focus();

}

else{

top.main.location.href = url;

}

}

</script>

<div id="footerShell">

<div id="footerShellLinks">

<a href="#" onclick="getFooterLink('/cgi-bin/apps/u/PLoad?pagename=clientbenefits/contactUs.html');">Contact Us</a>

<span class="divider">|</span>

<a href="http://www.amtd.com" target="_blank">TD AMERITRADE Holding Corp.</a>

<br />

<a href="#" onclick="getFooterLink('/cgi-bin/apps/u/PLoad?pagename=legal/minimum_requirements.html');">Minimum Requirements</a>

<span class="divider">|</span>

<a href="http://www.tdameritrade.com/forms/ATI800.pdf" target="_blank">Privacy</a>

<span class="divider">|</span>

<a href="#" onclick="getFooterLink('/cgi-bin/apps/u/PLoad?pagename=securitycenter/securityCenter.html');">Security Center</a>

<span class="divider">|</span>

<a href="#" onclick="getFooterLink('/cgi-bin/apps/u/PLoad?pagename=forms/account_forms.html');">Forms &amp; Agreements</a>

</div>

Unauthorized access and use is prohibited. Usage is monitored. TD AMERITRADE, Division of TD AMERITRADE, Inc., member NASD/<a href="http://www.sipc.org/" target="_blank">SIPC</a>. TD AMERITRADE is a trademark jointly owned by TD AMERITRADE IP Company, Inc. and The Toronto-Dominion Bank. &copy; 2006 TD AMERITRADE IP Company, Inc. All rights reserved. Used with permission.

<br>

<br>

As your agreement for the receipt and use of market data provides, the securities markets (1) reserve all rights to the market data that they make available; (2) do not guarantee that data; and (3) shall not be liable for any loss due either to their negligence or to any cause beyond their reasonable control.<BR><BR>

YOUR RECEIPT AND USE OF THIS SERVICE IS SUBJECT TO THE TERMS AND CONDITIONS OF YOUR <a href="http://www.tdameritrade.com/forms/exchange.pdf" target="_blank">ELECTRONIC AGREEMENT</a> WITH TD AMERITRADE.<BR>

</div>

<!-- VERSION: prd lapp3 - dev_WEB_2006_12_maint_BUILD_13 -->

<!-- File: orders/consolidatedOrderStatus.html PHConsolidatedOrderStatus -->

<form action="/cgi-bin/apps/u/OrderStatusReview" method="POST" enctype="application/x-www-form-urlencoded" name="openorders">

<input type="hidden" name="cancelreplacenow" value="">

<input type="hidden" name="pagehandler" value="PHOrderStatusReview">

</form>

<!--MORE INFO-->

<!--MORE INFO-->

<div id="displaymore" class="moreinfo" style="display:none;z-index:999;background-color:#f4f4f4;position:absolute;width:247px;">

<table cellspacing="0"><tr><td>

<table width="247" cellspacing="0" class="h01aw" style="margin-bottom:0px">

<tr>

<td><div class="spacer" style="width:8px; height:24px;"> </div></td>

<td width="100%" style="padding:3px 0;"><div id="moreDesc" style="display:inline"></td>

<td><div class="spacer" style="width:6px;"> </div></td>

<td valign="top" style="padding-top:4px"><a href="#" id="closelink" onclick="return false;"><img src="/amer/images/icon_attach_green.gif"></a></td>

<td><div class="spacer" style="width:4px;"> </div></td>

</tr>

</table>

<table width="100%" cellspacing="0" class="p01">

<tr class="headerspace">

<td rowspan="3"><div class="spacer" style="width:8px;">&nbsp;</div></td>

<td width="100%"></td>

<td rowspan="3"><div class="spacer" style="width:6px;">&nbsp;</div></td>

</tr>

<tr>

<td id="dynamicmore">&nbsp;</td>

</tr>

<tr>

<td colspan="3" style="height:5px"></td>

</tr>

</table></td></tr>

</table>

</div>

<iframe src="/amer/images/clear.gif" id="moreCover" marginwidth="0" marginheight="0" frameborder="0" style="position:absolute; left:0px;top:0px;width:10;height:10;visibility:visible;z-index:900;border:0px" border="0"></iframe>

<script language="javascript">

//initialize form buttons

btnInit("gobtn",false,true,false,false,false,false,true,false);

btnInit("bottomCancel",true,false);

btnInit("bottomReplace",true,false);

btnInit("bottomCancelReplace",true,false);

btnInit("bottomUndo",false,false);

</script>

<form name="viewtriggers" action="/cgi-bin/apps/u/TradeTriggers" method="post">

<input type="hidden" name="page_action" value="VIEW">

<input type="hidden" name="__chx" value="JAZOPT ">

</form>

<form name="osprint" action="/cgi-bin/apps/u/ConsolidatedOrderStatus" method="post">

<input type="hidden" name="mode" value="print">

<input type="hidden" name="sort" value="date">

<input type="hidden" name="order" value="DOWN">

<input type="hidden" name="type" value="">

<input type="hidden" name="days" value="">

<input type="hidden" name="fromMonth" value="">

<input type="hidden" name="fromDay" value="">

<input type="hidden" name="fromYear" value="">

<input type="hidden" name="toMonth" value="">

<input type="hidden" name="toDay" value="">

<input type="hidden" name="toYear" value="">

</form>

</body>

</html>

Webpage.txt

Edited by CaverDude
Link to comment
Share on other sites

Use _IEBodyReadHTML to see the rendered source of the page (after all Javascript processing is complete). This will show you the document structure you'll need to work with - the Javascript really no longer comes into play.

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

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