Hello Monks,

I'm working on a site where there will be numerous data selections (radio buttons, textboxes, selects, etc) which in turn will build an SQL statement from Oracle using DBI. The piece that I'm having an issue with is integrating the jQuery js/css into my Perl script. From what I can tell, it seems like I should be embedding Perl code into the function piece of the jquery script (on a static HTML page), like here:
$('#dialog').dialog({ autoOpen: false, width: 600, buttons: { "Button1": function() { // Perl code here }, "Button2": function() { // Perl code here } } });
Instead, what I'm trying to do is have a Perl script that dynamically creates the HTML using the print(qq(<script ..... )); but it doesn't seem that is how I should be doing it. Should I be using static HTML pages with embedded js/css/Perl, or using a Perl script with js/css inside?

I understand that JS is client-side, and Perl is server-side, but it seems that the dynamic functions I need to use are still javascript, but using data supplied to the page by the CGI engine. Am I way off base here?

Thanks!

UPDATE: I see there is a JQUERY module on CPAN... I'll definitely check that out, but considering the environment I want to deploy this to doesn't have it installed (nor will the company allow it without rigorous and lengthy security review and justification) I'd like to try this way first... it will likely give me a better understanding of how it works too.

In reply to jQuery and Perl by sierpinski

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.