Quote from: davidm at Nov 22, 2008, 04:37 PM
I put this code in the header but don’t forget this has to match the template chunk, jquery needs the id’s to work (see previous post !).
I made my own form and changed ID properly and it did’nt work.
Then I just copy/pasted all of your chunks... and it still won’t work.. It just won’t hide the from.. I can’t see what I’m doing wrong
Emails work fine... jQuery gives me soem hadache
Here are my calls and chunks so please take a look... maybe I missed something foolish
My call (on "pop" template)
<div id="pp">[!eForm? &formid=`SendToFriend` &tpl=`formSendToFriend` &report=`SendToFriendReport` &thankyou=`thankYou` &to=`[+email+]` &from=`[+from+]` &protectSubmit=`0`!]</div>
formSendToFriend
<div id="pp">
<p class="error">[+validationmessage+]</p>
<form action="[~[*id*]~]" id="SendToFriend" method="post" name="SendToFriend">
<table width="400" border="0">
<tr>
<td width="200" height="60">
<input type="hidden" name="formid" value="SendToFriend" />
<p align="center"><label for="sfName1">Vaše ime:<br />
<input name="name1" type="text" class="text" id="sfName1" size="30" /></label></p></td>
<td width="200" height="60"><p align="center">
<label for="sfEmail1">Vaša email adresa:<br>
<input name="emailfrom" type="text" class="text" id="sfEmail1" size="30" eform="Vasa adresa:email:1"/></label></p></td>
</tr>
<tr>
<td width="200" height="60"><p align="center">
<label for="sfName2">Ime prijatelja:<br />
<input name="name2" type="text" class="text" id="sfName2" size="30" /></label></p></td>
<td width="200" height="60"><p align="center">
<label for="sfEmail2">Email adresa vašeg prijatelja:<br>
<input name="email" type="text" class="text" id="sfEmail2" size="30" eform="Adresa vaseg prijatelja:email:1" /></label></p></td>
</tr>
<tr>
<td height="60" colspan="2"><div align="center">
<input name="urlsite" type="hidden" value="[(site_url)]" eform="::0::" />
<input name="link" type="hidden" value="[~[*id*]~]" eform="::0::" />
<input name="title" type="hidden" value="[*pagetitle*]" eform="::0::" />
<input class="button" id="sfRecommend" name="recommend" type="submit" value="Pošalji" />
</div></td>
</tr>
</table>
</form>
</div>
jQuery
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j('#pp').hide();
$j('a#show_pp').click(function() {
$j('#pp').toggle(400);
return false; });
});
</script>