I have the fallowing html code, and in this code segment i want to
fill the field but the problem is instead of name the field as <field
name"blabla"/> they use the <input id="blabla"/> tag.
It will be a great help if someone could guide me on this...

<div id="treeform" class="treeformWide">
        <form>
                    <div id="elementsContainer" class="clearfix">
                                                <div class="formElement">
                                                        <label 
for="firstName">Your First Name</label>
                                                        <input id="tree_fn" 
size="15" type="text">
                                                </div>
                                                <div class="formElement">
                                                        <label 
for="lastName">Your Last Name</label>
                                                        <input id="tree_ln" 
size="15" type="text">
                                                </div>
                                                <div class="formElement"><label 
for="gender">Your Gender</
label>
                                                        <select id="tree_gen" 
name="gender"><option selected="selected"
value="M">Male</option><option value="F">Female</option></select>
                                                </div>
                                        </div>
                                        <div style="text-align: center; clear: 
both; padding-top:
10px;">
                                                        <input name="start" 
class="p_btn" id="start" value="Get
Started" onclick="submitInfo();s_objectID='hp_build_tree';return
false;" type="submit">
                                        </div>
                                        </form>
                                </div>

Here is the part of the code segment that I have...

my $mechObject = WWW::Mechanize->new();
$mechObject -> get($url);

$mechObject->form_number(2);
$mechObject->field("tree_fn", $queryString);
$mechObject->click();

when I used the field() function and pass the input id as I am doing
above code segment, I get an error
No such field 'tree_fn' at c:/perl/lib/WWW/Mechanize.pm line 1243

so that tells me I cant treat the input tag as same as the field
tag...

Thanks in advance...
Anu


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to