Hi,
Problem 1. When i run my Catalyst Application i got the following Bug. Couldn't render template "file error - site.tt: not found" if I run it from the built in server it works fine but when it's run through Apache(like it usually is) it's not working now?
Problem 2 . How to use Jquery With Catalyst Application? I put the JS file in separate folder root/static/js folder. But when i run the my application then it's showing message in error console "$ is not define". (I got the meaning of it, but unable to solve it out.) Code is following JS file
function makeactive(tab) { document.getElementById("tab1").className = ""; document.getElementById("tab2").className = ""; document.getElementById("tab3").className = ""; document.getElementById("tab"+tab).className = "active" +; } //For Display and hide Div with Jquery $(document).ready(function(){ $('#click').hide(); $('#owner_close').hide(); $('a#click').click(function(){ $('#CreateSite').show('slow'); $('#click').hide(); $('#close').show(); }); $('a#close').click(function(){ $('#CreateSite').hide('slow'); $('#click').show(); $('#close').hide(); }); $('#OwnerDetail').hide(); $('a#owner_click').click(function(){ $('#OwnerDetail').show('slow'); $('#owner_click').hide(); + $('#owner_close').show(); }); $('a#owner_close').click(function(){ $('#OwnerDetail').hide('fast'); $('#owner_close').hide('slow'); $('#owner_click').show('fast'); }); });
And My site.tt file is following
<html> <head> <title>[% template.title or "My Catalyst App!" %]</title> <link rel="stylesheet" href="[% c.uri_for('/static/css/tool.css') %]" +type="text/css" media="screen, print" /> <script type="text/javascript" src="[% c.uri_for('/static/js/Tool.js') + %]"> </script> <script type="text/javascript" src="[% c.uri_for('/static/js/jquery.js +') %]" ></script> </head> <body> <div id="header"> <img src="[% c.uri_for('/static/images/logo.gif') %]" title="GISTFIND +Logo"/><p align="right">ADMINISTRATION PORTAL</p> </div> <div id="navigation"> <ul> <li onclick="makeactive(1)"><a href="#" name="na +vHome" class="selected" id="tab1" title="Home">Home</a></li> <li onclick="makeactive(2)"><a href="#" class="" + name="navAccountMgmt" id="tab2" title="Account Management">Account m +anagement</a></li> <li onclick="makeactive(3)"><a href="#" class="" + name="navSiteAdmin" id="tab3" title="Site">Site Admin</a></li> <br class="clear" /> </div> <div class="page-wrapper"> <div class="page"> <h3 style="background:#999999;font-weig +ht:bold;">Create Site</h3> <form id="signupForm"> + <div id="CreateSite"> <table id="tblcreatesit +e" cellspacing="0" cellpadding="0" border="1" style="empty-cells: hid +e;"> <tr> <td>SITE CODE</ +td> <td><input type +="textbox" name="txtscode" id="scode" value="></td><td><a href="#" cl +ass="delete" style="color:#FF0000;">Delete</a></td> </tr> <tr> <td>Name</td> <td><input type +="textbox" name="txtsname" id="sname" value=""></td> </tr> <tr><td colspan="2"> <div align="rig +ht"><input type="submit" name="sbtnCreateSite" value="Submit"/> <input type="re +set" name="rbtnReset" value="Reset"/></div></td> </tr> </table> </div> </form> <div align="right"><a h +ref="#" id="owner_click">Owner Detail</a><a href="#" id="owner_close" +>Close</a></div> <form name="frmOwnerinf +o" id="Ownerinfo"> <div id="OwnerDetail"> <table cellspacing="0" +cellpadding="0" border="1"> <tr style="background:# +666666;font-weight:bold;"> <td colspan="2" + style="background-color:#666666;">Owner Detail</td> </tr> <tr> <td>Owner</td> <td><input type +="textbox" name="txtSiteOwner" id="site_owner" value="" ></td> </tr> <tr> <td>Contact Num +ber</td> <td><input type +="textbox" name="txtSiteOwnercontnumber" id="site_ownercontnumber" va +lue=""></td> </tr></table> </div> </form> + </p> </div> </body> </html>

In reply to Getting Error: Couldn't render template file error - site.tt: not found". When Run The Catalyst Application. by Sachin

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.