Advertisement

10.08.2008 at 06:21AM PDT, ID: 23797107 | Points: 500
[x]
Attachment Details

Submiting form

Asked by dupetata in Perl Programming Language

Tags:

how to submit form using  WWW::Mechanize

i ahve this but it is not working becose of username field it is auto filled by php when openning the url

<li value="ID">USERNAME</li>


my $www =  new WWW::Mechanize(agent =>'Mozilla/5.0 (Windows; U; Windows NT 5.1; bg-BG; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1');

$www->get("http://www.site.com/mail/compose/ID");
        $www->field(subject => $subject);
        $www->field(body => $message);
        $www->submit;


Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
<form action="http://www.site.com/mail/send/ID" method="post" onsubmit="return validate();">
          <div class="white_box">
            <div class="tab_cont" >
    			<ul class="msg_wform_list">
					<li class="clear">
						<div class="mwl_column">>:</div>
 
						<ol>
							<li id="facebook-list" class="input-text">
								<input type="text" class="tb_pix" value="" id="subscribers" name="subscribers" autocomplete="off" />
								<div id="facebook-auto">
									<div class="default">J2548 8<5B> =0  ?@8OB5; 8;8 3@C?0.</div>
																		<ul class="feed">
										<li value="ID">USERNAME</li>
									</ul>
 
																		<ul class="feed">
									</ul>
								</div>
							</li>
						</ol>
					</li>
					<li class="clear">
						<div class="mwl_column">"5<0:</div>
 
						<input class="tb_pix ex_height" type="text" id="subject" name="subject" />
					</li>
					<li class="clear">
						<div class="mwl_column">!J>1I5=85
:</div>
						<textarea class="tb_pix" rows="1" cols="1" id="body" name="body"></textarea>
					</li>
					<li class="clear">
						<div class="clear msg_wform_btn">
 
								
							
							<div class="tmpl_button">
								<input type="submit" value="7?@0B8" />
 
							</div>
							
						</div>
					</li>
				</ul>
            </div>
                     </div>
 
       </form>
 
 
 
 
 
 
 
<script type="text/javascript">
var lang = new Array();
	lang['20845_mail_errors_subscribers_required'] 	= '5 A8 ?>A>G8; ?>;CG0B5;!';
	lang['20846_mail_errors_subject_required']	= '>;O, ?>A>G8 B5<0 =0 AJ>1I5=85B>!';
	lang['20847_mail_errors_message_required'] 	= '@07=> AJ>1I5=85 =5 <>65 40 1J45 87?@0B5=>!';
 
function validate()
{
	suggest.update();
 
	if (!$('subscribers').value.trim()) {
		systemMessenger.set(lang['20845_mail_errors_subscribers_required'], 0);
		systemMessenger.display();
		return false;
	} else if (!$('subject').value.trim()) {
		systemMessenger.set(lang['20846_mail_errors_subject_required'], 0);
		systemMessenger.display();
		return false;
	} else if (!$('body').value.trim()) {
		systemMessenger.set(lang['20847_mail_errors_message_required'], 0);
		systemMessenger.display();
		return false;
	}
 
	return true;
}
 
document.observe('dom:loaded', function() {
	// init
    suggest = new FacebookList('subscribers', 'facebook-auto', {'wordMatch': true});
 
    //fetch and feed    
    });
</script>
[+][-]10.08.2008 at 07:47AM PDT, ID: 22669586

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 07:55AM PDT, ID: 22669673

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 09:59AM PDT, ID: 22670849

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 10:50AM PDT, ID: 22671295

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 11:44AM PDT, ID: 22671850

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 11:56AM PDT, ID: 22671965

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 02:58PM PDT, ID: 22673927

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 04:07PM PDT, ID: 22674336

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 08:26PM PDT, ID: 22675472

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 11:31PM PDT, ID: 22676072

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 11:37PM PDT, ID: 22676098

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.10.2008 at 06:38AM PDT, ID: 22686747

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.10.2008 at 10:41AM PDT, ID: 22688936

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.11.2008 at 01:20AM PDT, ID: 22693148

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.11.2008 at 11:52AM PDT, ID: 22694957

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.11.2008 at 02:58PM PDT, ID: 22695452

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.11.2008 at 10:21PM PDT, ID: 22696425

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.13.2008 at 01:22AM PDT, ID: 22700806

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628