#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    2
    Rep Power
    0

    Problem populating web page fields


    Hi guys, I'm trying to populate the lat and long fields in http://www.wireless.att.com/coverageviewer/#?type=data I was trying to use Mechanize but it seems not to play well with java script. I was wondering if anyone has done anything like that.
    Code:
    use WWW::Mechanize;
    use WWW::Scripter::Plugin::JavaScript;
    use WWW::Scripter;
    
    my $lat = '40.860284';
    my $long = '-73.183363';
    
    $mech = new WWW::Scripter;
    
    $mech->use_plugin('JavaScript');
    
    $mech->get('http://www.wireless.att.com/coverageviewer/#?type=data');
    $mech-> field ('latitude' => $lat);
    $mech -> field('longitude' => $long);
    $mech -> click ('View Map');
    
    print $mech->content();
  2. #2
  3. 'fie' on me, allege-dly
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,894
    Rep Power
    6444
    Statement of actual problem, I see code, I see complaints, what I don't see is what's not working, and more particularly why it's not delivering as per your expectation ...
    --Ax
    without exception, there is no rule ...
    Handmade Irish Jewellery
    Targeted Advertising Cookie Optout (TACO) extension for Firefox
    The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones


    09 F9 11 02
    9D 74 E3 5B
    D8 41 56 C5
    63 56 88 C0
    Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
    -- Jamie Zawinski
    Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
    BIT COINS ANYONE
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by Axweildr
    Statement of actual problem, I see code, I see complaints, what I don't see is what's not working, and more particularly why it's not delivering as per your expectation ...
    Thank you for your response Axweildr, although not very helpful. I am actually quite surprised that someone with 12,808 posts would post a reply as the one above. let me explain something to you, I AM NOT COMPLAINING I simply asked if any one had populated a form driven by java script with the mechanized module. hence the problem at hand. Apparently you only post to keep your numbers high.

    Best regards...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    843
    Rep Power
    496
    I totally agree with Axweildr: you are not actually stating what your problem is, that makes it difficult for others to help you.

    What is it that does not work in what you have tried?

    I do not know the modules you are using, so I can't help much here, but if you answer the question just above, you'll have a far better chance to get a helpful answer.

IMN logo majestic logo threadwatch logo seochat tools logo