This topic is locked
Sergey Kornilov admin 10/24/2007

You can use the approach that is similar to what we use in the Real Estate template on the Search page.
You wrap the code section you need to hide/show into a DIV:

<A id=handle1 onclick="toggle('1')" href="#">Hide</A>

<DIV id=content1>

...

</DIV>


Toggle function is defined in BeforeShow event of the Search page as follows:

smarty("includes") = smarty("includes") & "<script>"

smarty("includes") = smarty("includes") & "function toggle(id) " & vbcrlf

smarty("includes") = smarty("includes") & "{if (document.getElementById(""content""+id).style.display == ""none"") {"

smarty("includes") = smarty("includes") & "document.getElementById(""content""+id).style.display = ""block"";"

smarty("includes") = smarty("includes") & "document.getElementById(""handle""+id).innerHTML = ""Hide"";"

smarty("includes") = smarty("includes") & "}"

smarty("includes") = smarty("includes") & "else {"

smarty("includes") = smarty("includes") & "document.getElementById(""content""+id).style.display = ""none"";"

smarty("includes") = smarty("includes") & "document.getElementById(""handle""+id).innerHTML = ""Show"";"

smarty("includes") = smarty("includes") & "}}</script>"
K
kaled2006 author 10/24/2007

when i put the script in before process it give me error
Microsoft VBScript runtime error '800a01c9'
This key is already associated with an element of this collection
/hos/Lesdonn_es_list.asp, line 239

Sergey Kornilov admin 10/24/2007

Rafi,
post your application to Demo Account (last tab in ASPRunnerPro) and send the URL to support@xlinesoft.com along with your order number.