Hi all,

Admittedly, I'm a complete novice when it comes to anything Javascript. I know basic HTML and CSS, nothing more. I'm really hoping someone can help me with this, and I really, really appreciate any assistance.

Basically, I visit a website where you can submit a javascript form, which has a drop down list where you can alter the value before you submit. It is to buy items for an online MMORPG. You can chose to buy 1, 2, 3, 4, 5, 10, 25 or 50.

I have included the code below. What I am trying to achieve is to set up a script, where you can set it running and it will automatically buy 50, without having to actually go into the game and go through page after to page until you reach this drop down.

I don't fully understand how this is done. I know it can be done, I just don't know how. I BELIEVE we will need to look around this area of the code, although I'm not sure.

Code:
<script type="text/javascript">
<form action="/investment.php?action=buy&inv_id=6&formNonce=d0e5619f747dde32bdfe7c0863e0dae6e969ef57&setTab1Badge=3&h=354a5800b88b6e10aee587aafa8754fba177e373" method="post" name="submitForm">
<table class="buyMore">
<tbody>
<tr>
<td class="buyMoreTxt" style="vertical-align: middle;width:300px">
Enslave
<select id="numberOfInv" onchange="updateInvestmentPrice(this.form.numberOfInv.value)" name="numberOfInv">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
</select>
more for
<br>
<span id="forInvPrice">
<span style="white-space: nowrap;">
<img width="9" height="12" style="padding-right:2px" src="http://static.storm8.com/vl/images/blood.png?v=330">
195,250,000
</span>
</span>
</td>
<td width="5px"></td>
<td class="reBuyAction" style="vertical-align:bottom;">
<a href="javascript:document.submitForm.submit()">
<div class="reBuyActionInner">
<div class="reActionInnerInner"> Enslave </div>
</div>
Here is the pages entire code:


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body class="game">
<div id="tab_bar">
<div id="gamewindow">
<iframe id="gamewindow" scrolling="yes" height="500px" frameborder="0" onload=" if(strpos(this.src, 'index.php')) {} else if(strpos(this.src,'missions.php')) {} else if(strpos(this.src,'fight.php')) {} else if(strpos(this.src,'equipment.php')) {} else if(strpos(this.src,'group.php')) {} else { tab1.src='../image/tab_bar/vl/tab1.png'; tab2.src='../image/tab_bar/vl/tab2.png'; tab3.src='../image/tab_bar/vl/tab3.png'; tab4.src='../image/tab_bar/vl/tab4.png'; tab5.src='../image/tab_bar/vl/tab5.png'; } " src="	http://vl.storm8.com/index.php?version=1.0&model=iPhone&udid=1f5cb9064eff40329cac1536275f208d226d40c9&pf=EE1E764603F1723A16A6D4CAD9975ECC" border="0" allowtransparency="true" name="game">
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<body class="portrait" data-promo-button="" style="; width: 100%;">
<div id="fb-root"></div>
<div id="contentParent">
<div id="contentChild" style="">
<div id="SCROLL_CONTENT">
<div id="scrollContentChild">
<div>
<div class="messageBox infoBox">
<div class="messageBoxSuccess">
<span class="success"> Success!</span>
You enslaved 1 Cultist using
<span style="white-space: nowrap;">
.
<br>
<div id="doAgainTxt" class="doAgainTxt" style="display: none;">
<div id="buyMore" style="display: block;">
<div style="height:10px"></div>
<script type="text/javascript">
<form action="/investment.php?action=buy&inv_id=6&formNonce=d0e5619f747dde32bdfe7c0863e0dae6e969ef57&setTab1Badge=3&h=354a5800b88b6e10aee587aafa8754fba177e373" method="post" name="submitForm">
<table class="buyMore">
<tbody>
<tr>
<td class="buyMoreTxt" style="vertical-align: middle;width:300px">
Enslave
<select id="numberOfInv" onchange="updateInvestmentPrice(this.form.numberOfInv.value)" name="numberOfInv">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
</select>
more for
<br>
<span id="forInvPrice">
<span style="white-space: nowrap;">
<img width="9" height="12" style="padding-right:2px" src="http://static.storm8.com/vl/images/blood.png?v=330">
195,250,000
</span>
</span>
</td>
<td width="5px"></td>
<td class="reBuyAction" style="vertical-align:bottom;">
<a href="javascript:document.submitForm.submit()">
<div class="reBuyActionInner">
<div class="reActionInnerInner"> Enslave </div>
</div>
</a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<link href="http://static.storm8.com/vl/css/realEstate.css?v=330" type="text/css" rel="stylesheet">
<script src="http://static.storm8.com/vl/js/realEstate.js?v=330" type="text/javascript">
<div class="section">
<div class="sectionHeader">
Slaves
<span style="font-size:12px;font-weight:normal">
(Income
<span class="cash">
<span style="white-space: nowrap;">
<img width="9" height="12" style="padding-right:2px" src="http://static.storm8.com/vl/images/blood.png?v=330">
16,000
</span>
</span>
, Upkeep
<span style="color:red">
<span style="white-space: nowrap;">
<img width="9" height="12" style="padding-right:2px" src="http://static.storm8.com/vl/images/blood.png?v=330">
0
</span>
</span>
)
</span>
</div>
<div class="sectionBar"></div>
<div class="sectionSubHeader">
<div style="line-height:18px">
Blood Flow:
<span class="cash">
<span style="white-space: nowrap;">
<img width="9" height="12" style="padding-right:2px" src="http://static.storm8.com/vl/images/blood.png?v=330">
16,000
</span>
</span>
every 50 minutes.
<br>
Next paid in: 50 minutes.
</div>
</div>
<div class="sectionBar"></div>
<div class="sectionContent">
<div style="height:5px"></div>
<div class="unlockTextMed">
<div class="tac">
<table class="unlockTextTable">
<tbody>
<tr>
<td class="unlockTextTableImg">
<img width="12" height="12" src="http://static.storm8.com/vl/images/locked.png?v=330">
</td>
<td width="5"></td>
<td class="unlockTextTableText">Unlock more slaves at level 13.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="height:5px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
<table class="reTable">
<tbody>
<tr>
<td class="rePic">
<img width="65" height="65" src="http://static.storm8.com/vl/images/investments/med/1.jpg?v=1040">
</td>
<td class="reSpLg"> </td>
<td class="reInfo" style="width: 99%;">
<div class="reName">Stray Dog</div>
<div class="reInfoItem">
Income:
<span class="cash">
<span style="white-space: nowrap;">
<img width="9" height="12" style="padding-right:2px" src="http://static.storm8.com/vl/images/blood.png?v=330">
50
</span>
</span>
</div>
</td>
<td class="reSp"></td>
<td class="reBuyAction">
<div>
<span class="cash">
<span style="white-space: nowrap;">
<img width="9" height="12" style="padding-right:2px" src="http://static.storm8.com/vl/images/blood.png?v=330">
2,000
</span>
</span>
</div>
<div style="height:5px"></div>
<a href="/investment.php?action=buy&inv_id=1&formNonce=d0e5619f747dde32bdfe7c0863e0dae6e969ef57&setTab1Badge=3&h=9617bbcb997f3acb144c810861f6ae3110b8dfc2">
<div class="reBuyActionInner">
<div class="reActionInnerInner"> Enslave </div>
</div>
</a>
</td>
<td class="reSp"></td>
<td class="reSellAction">
<div class="ownedText">
Owned:
<span class="ownedNum">77</span>
</div>
<div style="height:5px"></div>
<div class="reSellDisabledActionInner">
<div class="reActionInnerInner">Kill</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="height:4px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
<div style="height:4px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
<div style="height:4px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
<div style="height:4px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
<div style="height:4px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
<div style="height:4px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
<div style="height:4px"></div>
<div class="sectionBarVMinor"></div>
<div style="height:4px"></div>
<div class="investItem ">
</div>
</div>
</div>
</div>
<br>
<br>
<script>
</div>
</div>
</body>
</html>
</iframe>
</div>
</body>
</html>