SalehSouqi Posted August 11, 2011 Share Posted August 11, 2011 Hi =) i have a problem with submitting a form the page im working on has 2 forms , 1 visible and the other one is hidden , and there's a form in the html source code in a comment now the form in the comment doesnt effect _IEFormGetCollection , thats nice, now the problem is with the other 2 forms there's a #contract .send_resources{display:none;} in the page , so only the form that has style="display:inline" is visible ( atlesat this is the way i understand it ) now i want to submit the visible form ONLY and the forms position in the source code is not always the same , that means using the index wont help i tried to get the form by using this $oFormCount = _IEFormGetCollection($oIE) $FormCount = @extended For $i = 1 To $FormCount $oForm = _IEFormGetCollection($oIE, $i-1) MsgBox(0,"",$oForm.style) Next and use the one with "display:inline" style, but the msgbox returns empty so the problem is that autoit cant get the style ? or i wrote a bad code ? this is the forms source code expandcollapse popup<!-- --><!--<form class="send_resources" method="POST" name="snd" action="build.php" style="display:inline"> <input type="hidden" name="id" value="24" /> <input type="hidden" name="a" value="56755" /> <input type="hidden" name="sz" value="5336" /> <input type="hidden" name="kid" value="223206" /> <input type="hidden" name="c" value="6715a8" /> <table id="send_validate" class="send_res" cellpadding="1" cellspacing="1"> <tr> <td class="ico"> <img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /> </td> <td class="nam">Lumber:</td> <td class="val"><input class="text" type="text" name="r1" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /> </td> <td class="nam">Clay:</td> <td class="val"><input class="text" type="text" name="r2" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /> </td> <td class="nam">Iron:</td> <td class="val"><input class="text" type="text" name="r3" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /> </td> <td class="nam">Crop:</td> <td class="val"><input class="text" type="text" name="r4" value="10000" readonly></td> <td class="max">(2250)</td> </tr></table> <table id="target_validate" class="res_target" cellpadding="1" cellspacing="1"> <tr> <td class="vil" colspan="2">[03] Rancos (127|122)</td> </tr> <tr> <th>Player:</th> <td><a href="spieler.php?uid=1133">Alpha</a></td> </tr> <tr> <th>Duration:</th> <td>0:00:50</td> </tr> <tr> <th>Merchants:</th> <td>5</td> </tr> </table> <div class="clear"></div> <p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p> </form>--><form class="send_resources" method="POST" name="snd" action="build.php" style="display:inline"> <input type="hidden" name="id" value="24" /> <input type="hidden" name="a" value="56755" /> <input type="hidden" name="sz" value="5336" /> <input type="hidden" name="kid" value="223206" /> <input type="hidden" name="c" value="af4d26" /> <table id="send_validate" class="send_res" cellpadding="1" cellspacing="1"> <tr> <td class="ico"> <img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /> </td> <td class="nam">Lumber:</td> <td class="val"><input class="text" type="text" name="r1" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /> </td> <td class="nam">Clay:</td> <td class="val"><input class="text" type="text" name="r2" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /> </td> <td class="nam">Iron:</td> <td class="val"><input class="text" type="text" name="r3" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /> </td> <td class="nam">Crop:</td> <td class="val"><input class="text" type="text" name="r4" value="10000" readonly></td> <td class="max">(2250)</td> </tr></table> <table id="target_validate" class="res_target" cellpadding="1" cellspacing="1"> <tr> <td class="vil" colspan="2">[03] Rancos (127|122)</td> </tr> <tr> <th>Player:</th> <td><a href="spieler.php?uid=1133">Alpha</a></td> </tr> <tr> <th>Duration:</th> <td>0:00:50</td> </tr> <tr> <th>Merchants:</th> <td>5</td> </tr> </table> <div class="clear"></div> <p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p> </form><form class="send_resources" method="POST" name="snd" action="build.php" > <input type="hidden" name="id" value="24" /> <input type="hidden" name="a" value="56755" /> <input type="hidden" name="sz" value="5336" /> <input type="hidden" name="kid" value="223206" /> <input type="hidden" name="c" value="11dec0" /> <table id="send_validate" class="send_res" cellpadding="1" cellspacing="1"> <tr> <td class="ico"> <img class="r1" src="img/x.gif" alt="Lumber" title="Lumber" /> </td> <td class="nam">Lumber:</td> <td class="val"><input class="text" type="text" name="r1" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r2" src="img/x.gif" alt="Clay" title="Clay" /> </td> <td class="nam">Clay:</td> <td class="val"><input class="text" type="text" name="r2" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r3" src="img/x.gif" alt="Iron" title="Iron" /> </td> <td class="nam">Iron:</td> <td class="val"><input class="text" type="text" name="r3" value="" readonly></td> <td class="max">(2250)</td> </tr> <tr> <td class="ico"> <img class="r4" src="img/x.gif" alt="Crop" title="Crop" /> </td> <td class="nam">Crop:</td> <td class="val"><input class="text" type="text" name="r4" value="10000" readonly></td> <td class="max">(2250)</td> </tr></table> <table id="target_validate" class="res_target" cellpadding="1" cellspacing="1"> <tr> <td class="vil" colspan="2">[03] Rancos (127|122)</td> </tr> <tr> <th>Player:</th> <td><a href="spieler.php?uid=1133">Alpha</a></td> </tr> <tr> <th>Duration:</th> <td>0:00:50</td> </tr> <tr> <th>Merchants:</th> <td>5</td> </tr> </table> <div class="clear"></div> <p><input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" /></p> </form> Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 11, 2011 Share Posted August 11, 2011 You want $oForm.style.displayThe HTML element's .style is an object with properties, and .display is one of its properties. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
SalehSouqi Posted August 12, 2011 Author Share Posted August 12, 2011 i didnt know that thanks alot Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now