Javascript Guru?

Hi,

I’m trying to build a javascript function that will allow a user to select a letter (e.g J) and then be taken to the first instance of that letter (e.g J) in the view (position in the view but not open the document).

I’m using the view applet, but could also use a normal html view.

Anyone any ideas?

Subject: Is your view sorted?

If the column that has the value that you want to start at is sorted than you can use the startkey parameter. We have a tip on this:

http://www.tlcc.com/tlcc/tips/viewurl.nsf

Howard

Subject: Javascript Guru - ViewApplet?

Is there any documentation on the methods you can use in javascript to talk to the viewApplet?

Var applet = document.view;

applet.StartKey == “J”

??

Subject: RE: Javascript Guru - ViewApplet?

http://www-10.lotus.com/ldd/46dom.nsf/8fcda5a283f280b2852565590071d8af/f46c40f1cf5f6df9852567850053d011?OpenDocument

you can use javascript to call thes api functions.

Subject: RE: Javascript Guru - ViewApplet?

Great… thanks for the link.

Managed to do a work around using frames and the SearchKey … but i’ll take another look at this.

thanks to all those who helped.

Subject: RE: Javascript Guru?

I don’t know of any javascript that does that (I don’t claim to be a guru either). I also checked the View Applet API and found nothing equivalent either. The Firefox browser (and I think Mozilla) will do that by default, though it’s only for text and not for applets.

Perhaps you could do this:

Create a categorized view in which the categorized column is a formula that extracts the first letter of the appropriate field (example: @LEFT(LastName;1)

Create a new form with a keyword field (I’d make it a combo box) that contains the letters of the alphabet. Be sure you enbale the ‘Refresh fields on keyword change’ option for this field. You might want to include a keyword ‘All|’ so that people can see all the entries rather than a specific letter (in this case use '’ as the Default formula). Alternatively you could generate the keyword list using an @DBColumn so that the only letters that appear are letters for which entries actually exist .

Embed the categorized view on this form, in the Show Single Category formula, use the keyword field you created above.

Now when a user selects a letter, the view will show only the entries that begin with that letter.