Ask the Expert

Category in an embedded view clickable

I have managed to make a category in an embedded view clickable so that it expands as if you would click the twisty. The problem however is that I do not know how to do the same for the collapse. In my view column, I have specified an HREF link and I would need a flag to find out whether the view is expanded or collapsed to be able to pass the correct URL. I have tried using a field on the form but I cannot check the value of that field in the view. Then I have put an onclick event in the HREF that would check the value of the field but as I click the category, the view refreshes and the field is being reset.

I think there is a simple solution to your problem. In the _Iris Today_ article "Taking your Domino Applications to the Web," David DeJean explains how to replace the twisty image with your own graphics using the JavaScript below. You can extend this to include two transparent gif files if you do not want any images to show at all.

function imagereplace()

{ for( i=0; i { if( document.images[i].src.indexOf('expand.gif') != -1) { document.images[i].src=src = '/DATABASE.nsf/OPEN.gif?OpenImageResource' } //end if

if( document.images[i].src.indexOf( 'collapse.gif' ) != -1) { document.images[i].src= src = '/DATABASE.nsf/CLOSE.gif?OpenImageResource' } //end if } // end for }

For the full _Iris Today_ article "Taking your Domino Applications to the Web," visit:

This was first published in May 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: