troubleshooting Question

Want collapsed, not expanded as default

Avatar of Graeme
GraemeFlag for Australia asked on
ASP
9 Comments1 Solution111 ViewsLast Modified:
Hi all, I am having some issues with expand/collapse and wondering if anyone can help

The issue I am having is it is auto expanded, where I want it collapsed

You can see here: http://dev.gptouring.com.au/home.asp?c=35&p=1&d=80

VBScript
function Expand(node)
	{
	if (node.children.length > 0)
		{
		if (node.children.item(0).tagName == "IMG")
			{
			node.children.item(0).src = "http://www.gptouring.com.au/images/GPT/s-collapse.png";
			}
		}
	node.nextSibling.style.display = '';
	}

function Collapse(node)
	{
	if (node.children.length > 0)
		{
		if (node.children.item(0).tagName == "IMG")
			{
			node.children.item(0).src = "http://www.gptouring.com.au/images/GPT/s-expand.png";
			}
		}
	node.nextSibling.style.display = 'none';
	}

function Toggle(node)
	{
	if (node.nextSibling.style.display == 'none')
		// Unfold the branch if it isn't visible
		{
		Expand(node);
		}
	else
		// Collapse the branch if it IS visible
		{
		Collapse(node);
		}
	}
Code:
<td height=15 colspan=4><a onClick='Toggle(this)' id='CorporateStaff' style='CURSOR: hand'><img src=http://www.gptouring.com.au/images/GPT/s-collapse.png height=15 valign=middle>&nbsp;<font size=2>Expand to upgrade your <%=PackageItemHeroType("itype_name")%></font></a>
<div>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td height=40><%=ItemOptionDisplayName%></td>
<td height=40 width=72 align=center valign=center>
<table width=72 height=36 cellpadding=0 cellspacing=0 border=0>
<tr>
<td height=36 background=<%=BrandDir%>/item-<%=PackageItemOption("prod_items.item_ID")%>.jpg style='background-size:cover;background-position: center,center'><a href=images/GPT/image.jpg><img src=<%=BrandDir%>/s-i-outline-zoom.png width=72 height=36></a></td>
</tr>
</table>
</td>
<td height=40 width=50 align=center><input type=radio name=<%=PackageItemOption("pitem_ID")%> value=<%=PackageItemOption("pitem_gross")/PackageItemOption("pitem_pax")%>></td>
<td height=40 width=150></td>
</tr>
</table>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros