Currently, I haven't written any perl code yet. I'm still in the planning phase. I thought it might be possible to use jQuery.get to grab the page. If not, I can use either a perl module or curl/wget. The html is really not all that exciting. It has a bunch of input checkboxes that are checked manually (via human input). No javascript involved here. After retrieving the html, I was hoping to do something like this:
<form>
<div>
<input type="checkbox" name="fruit" value="orange" id="orange">
<label for="orange">orange</label>
</div>
<div>
<input type="checkbox" name="fruit" value="apple" id="apple">
<label for="apple">apple</label>
</div>
<div>
<input type="checkbox" name="fruit" value="banana" id="banana">
<label for="banana">banana</label>
</div>
<div id="log"></div>
</form>
<script>
$( "input" ).on( "click", function() {
$( "#log" ).html( $( "input:checked" ).val() + " is checked!" );
});
</script>
and somehow pull the identifiers of the checkboxes that are checked into a perl data structure. Again, thank you for your help here. | [reply] [d/l] |
There are some problems here. HTML::JQuery does not embed jQuery, allowing you to run jQuery code like the example you have provided. jQuery requires a JavaScript capable browser to run. Secondly this HTML has no values checked. This example is valid for jQuery running in a web browser, the log div will update to indicate which fruit is checked. I think you need to take a step back and figure out how the technologies in question actually work. To get values from a webpage they have to be submitted, the old fashioned way or the AJAX way, then server side processing of the values can take place.
| [reply] |