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.
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.
Comment