Jump to content

pls help me _IEFormGetObjByName


Recommended Posts

exp in help file

#include <IE.au3>
$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)

site i want use

<div id="containerMain">
<h1>Your Payment Details</h1>
<form action="/index_new.php?stage=3" method="post" id="checkoutStage" onsubmit="popupOK=false">
<input type="hidden" name="stage2" value="1"><table><tr><th colspan="2" style="text-align:left;"><a href="#" onclick="toggle('dd');"><b>Click here to view the Direct Debit Guarantee &raquo;</b></a><div id="dd" style="display:none;font-size:10px;color:#000;border:1px solid #000;padding:3px;"><p style="margin-top: 5px;">&nbsp; &nbsp; &nbsp; <strong>Direct Debit Guarantee</strong></p>
                    <div style="float:right"><img src="/images/directdebit.gif" alt="DIRECT DEBIT"></div>

i dont see form name = xx

pls help me

source site original

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Secure-Mobiles: 100% Secure Mobile Phone Deals</title>
<link rel="stylesheet" href="style.php?SECURESESSID=ae4aus60slu3rsi6ogf7je89f2" type="text/css" title="Default">
<script type="text/javascript" src="script.php?SECURESESSID=ae4aus60slu3rsi6ogf7je89f2"></script>
<script language="javascript" type="text/javascript" src="/jquery-1.2.1.min.js"></script>
<script type="text/javascript" src="/popups.js"></script>

<style type="text/css">

#helpPanel          {background-color:#FFFFFF;}
tr.focussed td  {background-color:#FFFFFF;}
tr.focussed th  {background-color:#FFFFFF;}
</style>
<script>
var popupOK=true;

var basket = "8b415f5d5677428ef80f6cccbc7ec53f";
var url = "/index_new.php?stage=3";
var wlcode = "www";
var link = "/onexitpopup.php?wlcode="+wlcode+"&basket="+basket+"&url="+url;

var wlcode = 'www';
var remove = 'LA';
var currentd = '1';
var cookie = '';
var bluetooth = 'N';
var accessories = '';
if ((bluetooth!='Y') || (!accessories=='') || (wlcode!='www') || (currentd!='1') || (remove=='HS') || (cookie)) popupOK=false;

function exitpop()
{
    if(popupOK==true)
    {
        if (!url.match("stage=5"))
        {
            win1 = window.open (link,"Offer","status=1,width=500,height=800");
            win1.blur();
        }
    }
}
</script>
</head>
<body style="background-color:#FFFFFF;"; >

<div style="text-align:left; padding:10px; width:800px;">
<table style="width:100%">
<tr valign="top">
<td><a href="http://www.e2save.com/"><img src="/getImage.php?brand=e2save&amp;img=/images/mainlogo/WWW.gif"></a></td>
<td style="font-size:14px; font-weight:bold; width:100%; text-align:right;">We are 100% secure</td>
<td><img border="0" src="https://www.secure-mobiles.com/files/isis.gif" alt="ISIS" width="124" height="64"></td>
<td><img src="/getImage.php?domain=e2save&img=/images/shopsafe_small.gif" alt="shopsafe" width="60" height="60" border="0"></td>
</table>

</div>

<div style="width:800px; margin-left:0; padding:0 10px;">
<!--<div style="width:660px; text-align:center; margin-left:auto; margin-right:auto;" class="box bestModel">-->
<div style="width:100%; text-align:left; margin-left:0;">

<table cellpadding="0" id="container" cellspacing="5">
<td id="containerLeft" style="width:auto;" class="box bestModel">

<table class="steps"><tr><td class="left" style="background-image:url('images/tick.gif'); background-position:50%; 50%;">Personal<br>Details</td><td style="background-image:url('images/tick.gif'); background-position:50%; 50%;">Address<br>Details</td><td class="selected">Payment<br>Details</td><td>Credit Check<br>Details</td><td>Review<br>Order</td><td class="right">Confirmation</td></tr></table><div id="containerMain">
<h1>Your Payment Details</h1>
<form action="/index_new.php?stage=3" method="post" id="checkoutStage" onsubmit="popupOK=false">
<input type="hidden" name="stage2" value="1"><table><tr><th colspan="2" style="text-align:left;"><a href="#" onclick="toggle('dd');"><b>Click here to view the Direct Debit Guarantee &raquo;</b></a><div id="dd" style="display:none;font-size:10px;color:#000;border:1px solid #000;padding:3px;"><p style="margin-top: 5px;">&nbsp; &nbsp; &nbsp; <strong>Direct Debit Guarantee</strong></p>
                    <div style="float:right"><img src="/images/directdebit.gif" alt="DIRECT DEBIT"></div>
                    
                    <ul>
                    <li>This Guarantee is offered by all Banks and Building Societies that take part in the Direct Debit Scheme. The efficiency and security of the Scheme is monitored and protected by your own Bank or Building Society. </li>
                    <li>If the amounts to be paid or the payment dates change your chosen mobile phone network, Carphone Warehouse or Citymain Administrators Limited re: TMTI will notify you in 10 working days in advance of your account being debited or as otherwise agreed.</li>
                    <li>If an error is made by your chosen mobile phone network, Carphone Warehouse or Citymain Administrators Limited re: TMTI you are guaranteed a full and immediate refund from your branch of the amount paid.</li>
                    <li>You can cancel a Direct Debit at any time by writing to your Bank or Building Society. Please also send a copy of your letter to your chosen mobile phone network, Carphone Warehouse or Citymain Administrators Limited re: TMTI.</li>
                    </ul>
        
            </div>
            </th></tr><tr class="h"><th>Bank Account</th><th colspan="2" style="text-align:right;"><img src="/images/directdebit.gif" alt="Direct Debit"></th></tr><tr><td colspan="3">This section is for setting up the Direct Debit for your phone bills.<br>Please enter the details of the bank account which you would like to use to pay your phone bills.</td></tr><tr><td colspan="3">All statutory rights, safeguards and guarantees apply.<br>By Submitting this form you agree to payment by direct debit.<p><b class="formError">IMPORTANT:</b> Bank details must be in <b>your</b> name or a joint account including<br>yourself, <b>EXACTLY</b> as they appear on your <b>bank statement</b></td></tr><tr"><th><label for="bank_name">Bank name</label></th><td><input type="text" name="bank_name" id="bank_name"  value="" maxlength="20" >  </td>
<td class="formError"><label for="bank_name">Required</label><br></td>
</tr>
<tr"><th><label for="bank_holder">Account holder name</label></th><td><select name="bank_holder_options" onchange="var e=this.form.elements['bank_holder']; var v=this.options[this.selectedIndex].value; e.style.display=(v=='Other'?'':'none'); e.value=(v=='Other'?'Nong Van Sy':v);"><option value="Nong Van Sy" selected="selected">Nong Van Sy</option><option value="Mr Nong Van Sy">Mr Nong Van Sy</option><option value="N Van Sy">N Van Sy</option><option value="Mr N Van Sy">Mr N Van Sy</option><option value="Other">Other</option></select>&nbsp;<input type="text" name="bank_holder" id="bank_holder" value="Nong Van Sy" maxlength="" style="display:none;">  </td>
<td class="formError"><label for="bank_holder">&nbsp;</label><br></td>
</tr>
<tr"><th><label for="bank_account_number">Account number</label></th><td><input type="text" name="bank_account_number" id="bank_account_number" value="" maxlength="9">  </td>
<td class="formError"><label for="bank_account_number">Account number must be 8 or 9 digits</label><br></td>
</tr>
<tr"><th><label for="bank_sort_code">Sort code</label></th><td>  <input type="text" name="bank_sort_code_fragment1" id="bank_sort_code_fragment1"  size="4" value="" maxlength="2" >  <input type="text" name="bank_sort_code_fragment2" id="bank_sort_code_fragment2"  size="4" value="" maxlength="2" >  <input type="text" name="bank_sort_code_fragment3" id="bank_sort_code_fragment3"  size="4" value="" maxlength="2" >  </td>
<td class="formError"><label for="bank_sort_code">Invalid sort code; should be in the format 00-00-00</label><br><label for="bank_sort_code_fragment1">Sort code piece should be 2 digits</label><br><label for="bank_sort_code_fragment2">Sort code piece should be 2 digits</label><br><label for="bank_sort_code_fragment3">Sort code piece should be 2 digits</label><br></td>
</tr>
<tr"><th><label for="bank_time">Years with bank</label></th><td><select name="bank_time" ><option value="01" selected="selected">< 1</option><option value="02">1-2</option><option value="04">2-5</option><option value="08">5-10</option><option value="10">10+</option></select>  </td>
<td class="formError"><label for="bank_time">&nbsp;</label><br></td>
</tr>
<tr><td colspan="3" class="formError">&nbsp;</td></tr><tr class="h"><th style="vertical-align:bottom;">Credit/Debit Card</th><th colspan="2" style="text-align:right;"><img src="images/credit_logos.gif" alt="Credit Logos"></th></tr><tr><td colspan="3">These details are required for a &pound;0.01 security authorisation. The &pound;0.01 will not be debited from your card.<br><br><span class="formError"><b>IMPORTANT:</b></span> The card must be in <b>your</b> name or a joint account including yourself.</td></tr><tr"><th><label for="card_type">Card type</label></th><td><select name="card_type" onchange="var v=this.options[this.selectedIndex].value.match(/Switch|Visa Debit|Solo/i); document.getElementById('issue_number').style.display=v?'':'none'; if(!v) this.form.elements['card_issue_number'].value='';"><option value="Visa Credit" selected="selected">Visa Credit</option><option value="Visa Debit">Visa Debit</option><option value="Mastercard">Mastercard</option><option value="Switch">Maestro</option><option value="Solo">Solo</option></select>  </td>
<td class="formError"><label for="card_type">&nbsp;</label><br></td>
</tr>
<tr><th><label for="card_holder">Name on Card</label></th><td><select name="card_holder_options" onchange="var e=this.form.elements['card_holder']; var v=this.options[this.selectedIndex].value; e.style.display=(v=='Other'?'':'none'); e.value=(v=='Other'?'Nong Van Sy':v);"><option value="Nong Van Sy" selected="selected">Nong Van Sy</option><option value="Mr Nong Van Sy">Mr Nong Van Sy</option><option value="N Van Sy">N Van Sy</option><option value="Mr N Van Sy">Mr N Van Sy</option><option value="Other">Other</option></select>&nbsp;<input type="text" name="card_holder" id="card_holder" value="Nong Van Sy" maxlength="" style="display:none;"></td><td class="formError">&nbsp;</td>
</tr>
<tr"><th><label for="card_number">Card number</label></th><td><input type="text" name="card_number" id="card_number"  value="" maxlength="22" autocomplete='off'> 13 to 19 digits on the front of your card </td>
<td class="formError"><label for="card_number">Card number must be 13-19 digits</label><br></td>
</tr>
</tbody><tbody style="display:none;" id="issue_number"><tr"><th><label for="card_issue_number">Issue number</label></th><td><input type="text" name="card_issue_number" id="card_issue_number"  size="4" value="" maxlength="2" >  </td>
<td class="formError"><label for="card_issue_number">&nbsp;</label><br></td>
</tr>
</tbody><tbody><tr"><th><label for="card_valid_from">Valid from date</label></th><td>  <select name="card_valid_from1" ><option value="00" selected="selected"></option><option value="01">01</option><option value="02">02</option><option value="03">03</option><option value="04">04</option><option value="05">05</option><option value="06">06</option><option value="07">07</option><option value="08">08</option><option value="09">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option></select> / <select name="card_valid_from2" ><option value="00" selected="selected"></option><option value="02">02</option><option value="03">03</option><option value="04">04</option><option value="05">05</option><option value="06">06</option><option value="07">07</option><option value="08">08</option></select>  (if applicable) </td>
<td class="formError"><label for="card_valid_from">&nbsp;</label><br><label for="card_valid_from1">&nbsp;</label><br><label for="card_valid_from2">&nbsp;</label><br></td>
</tr>
<tr"><th><label for="card_expiry_date">Expiry date</label></th><td>  <select name="card_expiry_date1" ><option value="01" selected="selected">01</option><option value="02">02</option><option value="03">03</option><option value="04">04</option><option value="05">05</option><option value="06">06</option><option value="07">07</option><option value="08">08</option><option value="09">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option></select> / <select name="card_expiry_date2" ><option value="08" selected="selected">08</option><option value="09">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option></select>  </td>
<td class="formError"><label for="card_expiry_date">Card has expired</label><br><label for="card_expiry_date1">&nbsp;</label><br><label for="card_expiry_date2">&nbsp;</label><br></td>
</tr>
<tr"><th><label for="card_cv2">Security number</label></th><td><input type="text" name="card_cv2" id="card_cv2"  size="5" value="" maxlength="3" autocomplete='off'> Last 3 digits on the back of your card   </td>
<td class="formError"><label for="card_cv2">CVC must be 3 numbers</label><br><label for="commidea_cvc">Required</label><br></td>
</tr>
<tr><td colspan="3" class="formError">Required<br>Required</td></tr></table><table class="next2"><tr><td class="back"><input type="hidden" name="back" value="0"><input type="button" value="Back" onclick="this.form.elements['back'].value=1; this.form.submit();"></td><td class="next"><input type="submit" value="Continue"></td></tr>
</table></form><img width=1 height=1 src="/images/formPxl.gif?wlcode=www&affiliate=&stage=2&email=chandoi23@gmail.com"><img width="1" height="1" src="https://switch.atdmt.com/action/mvi_e2save_Order_Form_3"><script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-109636-1";
urchinTracker("/order_form_stage_2.html");
</script>
</div>
</td>
<td id="containerRight">
<p class="header">Your Deal</p><table id="dealDisplay"><tr><td valign="top"><table style="width:100%;border-collapse:collapse;margin:2px;"><tr><td style="">Nokia 6220 Classic </td><td rowspan="5"><img src="/images/cache/cd805538579e6b858c5ee51841728ebd.png" alt="6220CLA" title="6220CLA" width="50" height="60"  /><br><div style="text-align:center;">&pound;0</div></td></tr><tr><td style="">Dolphin £35 (18mths)</td></tr><tr><td style="">
8 Months &pound;1.99 by redemption<a href="java script:defpopup('http://press.e2save.com/popups/gifts/gifts_popup_new.php?giftcode=DPLR','','400','220','yes')"> (More...)</a></td></tr>
<tr><td style=";">
1 Month FREE Insurance </td></tr>
<tr><td style="padding-bottom:5px;;">
VIP Gadget Helpline FREE </td></tr>
</table>
</td></tr></table>
<p class="header" style="text-align:right">Total: &pound;0</p><div id="helpPanel" style="vertical-align:top;"><p class="header">Important Information</p><table style="width:100%;"><tr><td style="padding:5px;"><div id="default">Please enter your payment details</div>

<div id="h_bank_holder">
<b>Account holder name</b><br>The account holder name<br><br>As it appears on your bank statement<br><br>
For example <b>Mr Tom E Sting</b><br><br><b>N.B.</b> If this is a joint account then please make sure to include the name(s) of the other account holder(s).<br><br><b>Required:</b> Yes</div>
<div id="h_bank_joint_account">
<b>This a joint account</b><br>Please tick this box if this is a joint account<br><br>
<br><br><b>Required:</b> No</div>
<div id="h_bank_account_number">
<b>Account number</b><br>The bank account number for the Direct Debit to be set up on.<br><br>
This will be 8 or 9 digits; you can find it in your chequebook or bank statement.<br><br>
For example <b>012345678</b><br><br><b>Required:</b> Yes</div>
<div id="h_bank_sort_code">
<b>Sort code</b><br>Your bank sort code - you can find this on your chequebook or bank statement<br><br>
For example <b>01-23-45</b><br><br><b>Required:</b> Yes</div>
<div id="h_bank_name">
<b>Bank name</b><br>The name of your bank<br><br>
For example <b>Natwest</b><br><br><b>Required:</b> Yes</div>
<div id="h_bank_time">
<b>Years with bank</b><br>The number of years you have been with your bank<br><br>
For example, if you had been there for 4 years and 2 months, you would enter <b>04</b><br><br><b>Required:</b> Yes</div>
<div id="h_bank_account_number_and_sort_code">
<b>-</b><br><br><br><b>Required:</b> Yes</div>
<div id="h_bank_sort_code_fragment1">
<b>Sort code (first two digits)</b><br>The first pair of digits in your sort code - you can find this on your chequebook or bank statement<br><br>
For example, if your sort code was 01-23-45 you would enter <b>01</b><br><br><b>Required:</b> Yes</div>
<div id="h_bank_sort_code_fragment2">
<b>Sort code (second two digits)</b><br>The second pair of digits in your sort code - you can find this on your chequebook or bank statement<br><br>
For example, if your sort code was 01-23-45 you would enter <b>23</b><br><br><b>Required:</b> Yes</div>
<div id="h_bank_sort_code_fragment3">
<b>Sort code (third two digits)</b><br>The third pair of digits in your sort code - you can find this on your chequebook or bank statement<br><br>
For example, if your sort code was 01-23-45 you would enter <b>45</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_type">
<b>Card type</b><br>The type of card you are using<br><br>
For example if you had a Visa credit card, select <b>Visa Credit</b><br><br><br><b>Required:</b> Yes</div>
<div id="h_card_holder">
<b>Name as on card</b><br>The cardholder name as it appears on the card<br><br>
For example <b>T Sting</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_number">
<b>Card number</b><br>The card number - this will be 13 to 19 digits on the front of your card<br><br>
For example <b>0123456789012345</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_expiry_date">
<b>Expiry date</b><br>The expiry date of the card in the format mm/yy<br><br>
For example if your card expires in January 2009, you would enter <b>01/09</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_expiry_date1">
<b>Expiry date</b><br>The month your card expires in<br><br>
For example if your card expires in January 2009, you would select <b>01</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_expiry_date2">
<b>Expiry date</b><br>The year your card expires in<br><br>
For example if your card expired in January 2009, you would select <b>09</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_valid_from">
<b>Valid from date</b><br>The date your card became valid, in the format mm/yy<br><br>
For example if your card became valid in January 2007, you would enter <b>01/07</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_valid_from1">
<b>Valid from date</b><br>The month your card became valid<br><br>
For example if your card became valid in January 2007, you would select <b>01</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_valid_from2">
<b>Valid from date</b><br>The year your card became valid<br><br>
For example if your card expired in January 2007, you would select <b>07</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_cv2">
<b>Security number</b><br>The CVC number of your card<br><br>
This is the last three digits on the signature strip of your card<br><br>
<img src="/images/card_cvc.gif" alt="CVC"><br><br>For example, <b>123</b><br><br><b>Required:</b> Yes</div>
<div id="h_card_issue_number">
<b>Issue number</b><br>The issue number of your card, if it has one<br><br>
For example <b>01</b><br><br><b>Required:</b> No</div>
<div id="h_commidea_auth">
<b>CC Auth</b><br><br><br><b>Required:</b> Yes</div>
<div id="h_commidea_pcavs">
<b>CC Postcode match</b><br><br><br><b>Required:</b> Yes</div>
<div id="h_commidea_ad1avs">
<b>CC Address first line match</b><br><br><br><b>Required:</b> No</div>
<div id="h_commidea_cvc">
<b>CC CVC match</b><br><br><br><b>Required:</b> Yes</div>
</td></tr></table></div>
</td>
</tr>
</table>
</div>
</div>
<div style="width:800px; padding:10px;">
<table align="center" style="width:85%;"><tr><td align=center>Buy with complete confidence from e2save which is a trading division of The Carphone Warehouse plc.</td></tr><tr><td style="text-align:center;">If you'd prefer, you can place your order by telephone with one of our Sales Team on <b>0800 049 6049</b></td><td><img src="/images/landline_phone.gif"></td></tr></table>
</div>
</body>
</html>
Link to comment
Share on other sites

i dont see form name = xx

pls help me

There often is no name. If you know which form it is (i.e. the first or second form on the page) then you can use _IEFormGetCollection() with an index number. Note that it is zero-based, so to get the first form on the page would be:
$oForm = _IEFormGetCollection($oIE, 0)

If you don't know which one it is, and don't have a name, then you have to get the collection of all forms (same function, without the index number) and loop through them looking for something else unique to identify it.

muttley

Edit: Add example

Edited by PsaltyDS
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

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