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


In reply to Follow-up to my question (mason/perl/jquery) by raisputin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.