Forums

This topic is locked

show, hide & show same layer from onCLick event

Posted 13 May 2004 17:54:43
1
has voted
13 May 2004 17:54:43 Jon McGee posted:
I have a results list that has a button next to the entry. When you click the button it shows the detail for the entry in a dynamic layer populated by a recordset.

If you click on a subsequent entry, again the detail is shown in a layer, but click back on an entry and it wont show.

This is because the detail layers are stacking up on top of each other.

I need a way of hiding the layer and re showing it with new data when the user clicks on the button.

Go to www.bioscience.co.uk/new/home.asp and do a search for 'cloning'.

When the results page loads, click through a few results in order then try clicking back through them to see the problem.



Edited by - jonny mags on 13 May 2004 18:02:35

Replies

Replied 13 May 2004 20:09:04
13 May 2004 20:09:04 Dave Thomas replied:
i had this exact same problem on the last client site ive just done. trouble is whereas i had room to manouver with the client, you havent.
I adopted to use a tree like show/hide layer with each link having a fold out block underneath them.

how have you set it up, the way i did mine was to have the hide show layers behaviour called from a link, the the layer or div as the link to close it, but the client couldnt figure out "click here to hide" would close his layers.

have you tried that approach yet? where an option is in the result to close it.

anyways... after i'd gone to all the trouble of replacing my layers code, i found an article that showed a way to script your z-index of layers so the onClick fired whatever link to the highest z-index. hence its always on top, so no stacking to the naked eye. have a look for something relating to that, sorry i cant give you a link, as it was on my pc which sadly died at the age of 4 last month.

but i reckon that's bound to cause problems as the user clicks away not knowing he's stackin layer upon layer. I didn't go really far into it, as I had already solved my scenario.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 14 May 2004 11:28:22
14 May 2004 11:28:22 Jon McGee replied:
yeah, Ive tried having an option in the result to close the detail layer but it just doesnt make sense from the users point of view. I tell you this site is a killer. Its been designed to be as customer friendly as possible therefore making programming a headache! Catch 22

UPDATE: Eureaka! Thanks to an extension called 'Layer on Top' all I had to do was an on click to show my layer then an onclick to put the layer on top. hey presto. The extension can be found here
www.massimocorner.com/index.html?body$http://www.massimocorner.com/dw/behaviors.htm

Edited by - jonny mags on 14 May 2004 11:47:28

Reply to this topic