Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Now i know this question has been posted before but there was no clear answer how to integrate html::template with cgi::ajax

Where?

i dont seem to get what to pass to the cgi::ajax buildhtml function it will be great help if someone can post an example thanks

For an example see readmore section of CGI::Ajax + Template::Toolkit Question (Template or HTML::Template, its works the same).

See also CGI::Ajax documentation

build_html() Purpose: Associates a cgi obj ($cgi) with pjx object, inserts javascript into <HEAD></HEAD> element and constructs the page, or part of the page. AJAX applications are designed to update only the section of the page that needs it - the whole page doesn't have to be redrawn. L<CGI::Ajax> applications use the build_html() method to take care of this: if the CGI parameter C<fname> exists, then the return from the L<CGI::Ajax>-exported function is sent to the page. Otherwise, the entire page is sent, since without an C<fname> param, this has to be the first time the page is being built. Arguments: The CGI object, and either a coderef, or a string containing html. Optionally, you can send in a third parameter containing information that will get passed directly to the CGI object header() call. Returns: html or updated html (including the header) Called By: originating cgi script

In reply to Re: CGI::Ajax and html::template by Anonymous Monk
in thread CGI::Ajax and html::template by perlkhan77

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (7)
    As of 2014-09-23 22:40 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (241 votes), past polls