Can you use Sections on Web

Hi,

Can you use sections ina form on the web cos i cant see mine, if not can you suggest anything similar

Thanks

Subject: can you use Sections on Web

Granted, I haven’t done this in a LONG, LONG time, but yes, you can use sections on the web. However, if memory serves, expanding or collapsing the section reloads the page (like categories in a normal notes view).

The preferred method for doing this on the web is by wrapping the “section” information in a

pair and then creating a text link to show/hide the div.

for instance, this html:

This is the text in my div. This is the text in my div. This is the text in my div. This is the text in my div. It can also have fields in it. Don’t forget to mark the tags as pass-thru html.

will create the above mentioned div and prevent it from displaying in the browser.

Next, create a button or hotspot to toggle the div display by calling this javascript function and passing it the name of the section you wish to show or hide:

togglediv(‘section1’);

Place the function in the JS header:

function togglediv(divname){

var c1 = frm.document.getElementById(‘’ + divname + ‘’);

if(c1.style.display == “none”){

c1[1].style.display = “inline”;

}else{

c1[1].style.display = “none”;

}

}

Using an html element instead of a Notes section gives you more freedom and control over behavior of the section. You can, for instance, use the overflow property of the div to give the div a fixed width and/or height and add scroll bars to it. A useful site is www.w3schools.com, which has a plethora of information on CSS, DOM, Javascript, and so on.