473,434 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Perl WWW::Mechanize and Dynamic Forms

I'm trying to interact with a web page that uses JavaScript to add fields to a form if certain things are selected in the first field.

I've tried doing something like this...

$mech->get($someurl);
$mech->field('field1','selection2');
$mech->field('created_field','data');
$mech->click('submit')

This doesn't work because created_field doesn't exist until the javascript runs so Mechanize doesn't know about the field because when

So my question, is there a way to add a field to a form after getting the page? I know what the field I need is and I really don't need the javascript to run (I understand that Mechanize can't run javascript anyway.) I just need to be able to manually add in the field. Any help with how to do this would be greatly appreciated.
Jul 14 '07 #1
1 2510
KevinADC
4,059 Expert 2GB
I would think you can add in the form field manually, but I can only suggest you read the WWW::Mechanize documentation or wait and see if someone knows how to do this.
Jul 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: zoewu | last post by:
Would anyone help me with this little script that I tried to get some contents from Yahoo Personals by using Perl Mechanize. It doesn't return any results, although I've feed all kinds of browser...
1
by: coder57 | last post by:
Basically I have a local html file, called file1.html it has a series of links (with a particular domain name) in addition to the html code, I am trying to follow each of these links (based on the...
2
by: barrybevel | last post by:
Hi, I have a very small simple program below which does the following: 1) post a username & password to a website - THIS WORKS 2) follow a link - THIS WORKS 3) update values of 2 fields and...
2
by: jenny04 | last post by:
I have a program which uses www::mechanize. But im having trouble installing it. Can anyone explain it to me or send me a website that has it on it. Any help will be appricated.
1
numberwhun
by: numberwhun | last post by:
I am having an issue with understanding something in the WWW::Mechanize module. I have a website which I want to download a whole plethora of pdf files from. It is a site that I have paid to access...
1
by: gunabalans | last post by:
#!/usr/bin/perl -w use strict; use LWP; my $ua = new LWP::UserAgent; $ua->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8)"); my $request = new HTTP::Request("GET",...
6
by: sureshbup | last post by:
Hi, i am new to perl... i tried this module mechanize. this is the script #!/usr/bin/perl # Include the WWW::Mechanize module use WWW::Mechanize;
1
by: mithunmo | last post by:
If I run the below program . I get the following error message Can't call method "value" on an undefined value at C:/Perl/site/lib/Win32/IE/Mec hanize.pm line 900. Please let me know your...
1
by: yaFaheem | last post by:
This is my first exposure to perl Mech when I am trying to autofill a php script. As per perl Mechaize docs, there are numerous functions to fill out a text field and submit. However, what if the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.