Page 1 of 1

need help with changes to index.tpl

Posted: Tue Dec 04, 2007 6:48 pm
by Ralf Skirr
Hi,

I'm a smarty-dummy ;-) and need help with integrating a web form into my index.tpl.

I really need it done and I'm willing to pay for it.
(Better than wasting more hours to try on my own. I'm done with that.)

What I want to do:
I want to integrate an html from that submits user name and email and a hidden field. The form uses some javascript to get a parameter from the browser address line that is then added to the hidden field.

Most of the code is working fine on a normal html page but not with the smarty template. I guess it has to do with the Javascript that creates a variable from the URL parameter.
Fatal error: Smarty error: [in /www/htdocs/w0080657/templates/bazooka/index.tpl line 40]: syntax error: unrecognized tag 'var'
Here's a html-copy of the template where you can check the source code.
The Javascript and the form are on lines 30-71 and 89-138.
http://internetbusinessmastermind.com/test/index-2.htm

A second thing that is not working right now is clearing the fields after submitting. [onsubmit=myform.reset();]

If you can fix this please send me message (or post) and state a price.

Thanks,
Ralf

Re: need help with changes to index.tpl

Posted: Tue Dec 04, 2007 9:07 pm
by garvinhicking
Hi!

Try to enclose all javascript you need to use with {literal}...{/literal}. Or you must replace every { with {ldelim} and every } with {rdelim} inside your javascript.

{ and } are reserved keywords for Smarty.

I belive this is also contained in the s9y FAQ :)

Regards,
Garvin

Re: need help with changes to index.tpl

Posted: Tue Dec 04, 2007 9:16 pm
by Ralf Skirr
Thanks for the tip, I'll try that.

I feel so clumsy when working in any code...
:oops:
garvinhicking wrote: I belive this is also contained in the s9y FAQ :)

I worked my way through smarty documentation instead and didn't understand a thing. :D

Ralf

working

Posted: Wed Dec 05, 2007 5:57 pm
by Ralf Skirr
Except for clearing the form fields after submitting, the code works fine now.

Thanks Garvin!

If that X-files box wasn't that expensive it would be on its way to you. :D
I love X-files (but do we really want to see x-files movie2 ?)

<hint>You may consider adding more lower priced stuff to your wish list. </hint>

Ralf

Posted: Wed Dec 05, 2007 8:16 pm
by Don Chambers
You can always express your appreciation as noted in Garvin's signature line:
# or use my PayPal account "paypal {at} supergarv (dot) de"