in reply to WWW::Mechanize text field

That site uses JavaScript to set the hidden field serverSpec to the value charlie.ccohs.ca:9900. (At least for me.) WWW::Mechanize doesn't execute JavaScript, so this field doesn't get set.

It could be some kind of load balancing system or a means of directing a user to the nearest mirror. The implementation keeps the actual search page (relatively) static. It would have been better if a default had been provided.

Replies are listed 'Best First'.
Re^2: WWW::Mechanize text field
by Anonymous Monk on Sep 18, 2007 at 15:09 UTC
    Ah.. I knew.. again that ******* JavaScript. Thank you anyway.
      You should be able to set the serverSpec field as well even though it is hidden. My suggestion would be to check the headers to see if the server value changes often. If it appear to be the same it may be used to switch servers for testing or other purposes. If it changes often it is more likely used for load balancing. If it appears to be static you could just set the field to that value in your script. If it seems to change frequently you could still do that using one of the values. However but if it is used for load balancing you are doing an end run around it. If this script will be used a lot that would be impolite to say the least. The best approach in that case would be to find a way to get the dynamic value each time the script is run.
        Thank you both for your help. I managed it with tamper data extension and direct link to my page of interest. Setting serverSpec directly didn't work.