Hi All, I have all pages in root folder and script in scripts folder. how can I call this script? test2.html page: ============ <span metal:use-macro="container/main/macros/body"> <span metal:fill-slot="bodyplace"> <span metal:use-macro="container/main/macros/searchform"></span> </span> </span> searchform macro: ============ <table width=100% metal:define-macro="searchform"> <tr> <td tal:content="python: scripts.validateForm1()" > </td> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^??? </tr> <tr><td> <form action=test2.html method=post> <input type=text name=searchstring> <input type=submit> </form> </td></tr> </table> how can I call validateForm script from scripts folder? tal:content="python: scripts.validateForm1() and tal:content="python: here.scripts.validateForm1()- doesnt work . I think I've tried all possible combinations, but no luck. if pages and script in the same folder -tal:content="python: here.validateForm1()- works. thanks. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
On Thu, 22 Jan 2004 13:49:22 -0800 (PST) Alexander <aleksandrmailbox@yahoo.com> wrote:
Hi All, I have all pages in root folder and script in scripts folder. how can I call this script?
test2.html page: ============ <span metal:use-macro="container/main/macros/body"> <span metal:fill-slot="bodyplace"> <span metal:use-macro="container/main/macros/searchform"></span> </span> </span>
searchform macro: ============ <table width=100% metal:define-macro="searchform"> <tr> <td tal:content="python: scripts.validateForm1()" > </td> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^??? </tr> <tr><td> <form action=test2.html method=post> <input type=text name=searchstring> <input type=submit> </form> </td></tr> </table>
how can I call validateForm script from scripts folder? tal:content="python: scripts.validateForm1() and tal:content="python: here.scripts.validateForm1()- doesnt work . I think I've tried all possible combinations, but no luck. if pages and script in the same folder -tal:content="python: here.validateForm1()- works.
try: tal:content="here/scripts/validateForm1" That will acquire the scripts folder from the current object. hth, -Casey
On Thu, Jan 22, 2004 at 01:49:22PM -0800, Alexander wrote:
how can I call validateForm script from scripts folder? tal:content="python: scripts.validateForm1() and tal:content="python: here.scripts.validateForm1()- doesnt work . I think I've tried all possible combinations, but no luck. if pages and script in the same folder -tal:content="python: here.validateForm1()- works.
here.scripts.validateForm1() should work fine. either you have spelled some name wrong, or possibly you have more than one thing named "scripts". We can't tell without more information. Some tips on using this mailing list: 1) Never say just "it doesn't work". You need to post the error and *complete* traceback message (from the error_log). 2) Use descriptive subjects. Probably 99% of threads on this mailing list could be titled "Need help" or "Re: Need help", but that wouldn't be very easy to browse ;-) 3) Don't repeat your question. I already replied to the first time you posted. Keep it in one thread. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's SUPER BONE BEEF! (random hero from isometric.spaceninja.com)
participants (3)
-
Alexander -
Casey Duncan -
Paul Winkler