Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hey there, I hope here is the right place to ask my question:
I'm writing a perl script that searches the IPA-translation (phonetic alphabet) of a given word in some predefined sources on the web (mostly online-dictionaries). Now I found another source and wanted my perl script to interact with it. This time though it seems to be an ajax-form or something similar.
http://familientagebuch.de/rainer/2007/38.html#4 is the site.
I want to enter something in the top form ("Eingabetext") and read the result out of the form at the bottom ("IPA"). So far I did these things with LWP and Mechanize, but it doesnt seem to work in this one. I searched the web and similar questions were directed to using "Mozilla:Mechanize". I tried, but cant get Mozilla:mechanize to run unfortunately. My question is: are there any other ways to read these forms?
I would really appreciate if you could give me some hints in the right direction.
Thankyou
/Fr3yr

Replies are listed 'Best First'.
Re: Interacting with Ajax-Forms
by daxim (Curate) on Jun 18, 2012 at 15:18 UTC
    Firebug is your new best friend. Didn't you read the Mechanize FAQ or the Perlmonks archive? This sort of question comes up twice every month.
    POST http://tools.webmasterei.com/mbrolatester/text2pho.php Content-Length: 19 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 foo=Gr%C3%BCnden&_= 200 OK Content-Length: 98 Content-Type: text/html; charset=utf-8 gRYnd@n <script language="javascript">$('ipa').innerHTML='g&#641;&#655 +;nd&#601;n ';</script>
      Damn, really overseen that. Thankyou, this will help me a lot ;)