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

Fellow monks,

I am completely lost. I have found a fantastic set of display tools in jquery, but I am not sure how to do what I need to do. 99% of my programming experience is in perl, and I am quite comfortable using perl even though I might not always do things the "best" way.

So I have a mason environment in which the bulk of my code runs, and what I need to do is use the jquery stuff to open a dialog (code to follow). In that dialog I need to do some mysql stuff; either run some sort of query to pull data or insert data into a mysql database. I had planned on doing this with perl, but I am unsure even where to begin as I have what could best be described as a rudimentary understanding of jquery.

Here were my possible solutions to my issue, but I just don't know quite where to begin:

Here is the code so far: The HTML part

<div id="tabs-2"> <div style="float:left;width:50%"> <h2>Customer Search</h2> <table> <td>Name</td><td><input type=" +text" name="custname" value=""></td> </table> </div> <div> <p><a href="#new_customer" id= +"dialog2_link" class="ui-state-default ui-corner-all"><span class="ui +-icon ui-icon-newwin"></span>New Customer</a></p> <div style="position: relative +; width: 96%; height: 200px; padding:1% 4%; overflow:hidden;" class=" +fakewindowcontain"> <!-- ui-dialog --> </div> </div> </div>
The script part
// Customer $('#new_customer').dialog( { autoOpen: false, width: 600, buttons: { "Ok": function() { $(this).dialog("close"); }, "Cancel": function() { $(this).dialog("close"); } } } ); // new_customer Link $('#dialog2_link').click(function(){ $('#new_customer').dialog('open'); return false; } ); //hover states on the static widgets $('#dialog_link, ul#icons li').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); } );
OK, that was a copy/paste, so there may be an error in that last part of the js, but that doesn't matter.

What I need to do is pull up a form in the dialog (that works already), and once someone enters info in the form, when the press the "ok" ui widget, have that run some perl code to work with my database and return and display as needed.

Sorry if this is hard to read, I am just so lost I am not even sure that I can make sense of it enough to ask a question in aby kind of intelligent matter. :(

Thanks in advance for any help/tips/pointers/examples -Rais

Replies are listed 'Best First'.
Re: Follow-up to my question (mason/perl/jquery)
by Anonymous Monk on Jul 16, 2009 at 03:13 UTC
    What is perl-jquery? Please provide a link
      My apologies, I believe I wrote perl-jQuery incorrectly, knowing what I meant, but stating it incorrectly. Here is the link

      JQuery

      There is also pQuery