Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: Multi-dialogue forms on one page

Feedback on: Multi-dialogue forms on one page

Sent by Kimberly Albrecht on April 18, 2000 at 15:34:14: - feedback #1110

Worth:
Very worth reading

Length:
Just right

Technical:
Just right

Comments:
I ran into one problem while trying this out on my own. Everything worked like a dream until the output was long enough to require scrolling down. In NN, the scroll bar would not appear until the window was resized.

The article was excellent. I found it to be clearly written and informative. So often I find articles that refuse to address cross-browser support, A+ for going above and beyond!!


Sent by Basil McDonnell on May 11, 2000 at 16:36:36: - feedback #1211

Worth:
Very worth reading

Comments:
Very useful example; but I ran into a strange behaviour on the part of IE5.01 that I was wondering if you had encountered. A tiny change to this example causes it to "lose" objects.

If the select tag:

<select name="myCountry">

is changed to

<select name="myCountry" size=6>

...and the address is clicked, the subform displays correctly- but from that point forward the "show()" function is no longer accessible.

...but it works in Netscape!

...very, very strange behaviour.


Sent by Basil McDonnell on May 11, 2000 at 16:41:42: - feedback #1212

Worth:
Very worth reading

Comments:
Follow-up to message re: modification of select box:

the problem was the result of there being no selected item in the example I created.

When an item is selected the problem does not occur.

Thanks...


Sent by Kimberly Albrecht on June 22, 2000 at 18:02:26: - feedback #1422

Worth:
Very worth reading

Length:
Just right

Technical:
Just right

Comments:
I was on experts exchange and a co-editor saw a comment I posted about the experience I had with your article.

I found that (in Netscape 4.x), if the contents written to subsequent tabs were longer than the first tab, the scrollbars would not appear and the tab was "cut off" at that point.

So, here is the comment I added in response to Michel.
***
I tried two things. First a div like follows:

<BODY>
<DIV name="scrollDiv" style="position:absolute;left:0;top:0">
....

<SPAN id="myTab" style="position:absolute">
</SPAN>
....
</DIV>
</BODY>

But this didn't seem too reliable. So, I ended up using a really crude method that worked.
<SPAN id="myTab" style="position:absolute">
<BR><BR><BR><BR>...<BR>
</SPAN>

Repeat the <BR> tag as many times as it takes to equal the longest, output you expect to write to the span. On my first "tab" I had a instruction page that was very short and then produced other "tabs" with really long lists of controls (for a survey). So, the multiple <BR>'s caused the scrollbars to always be the appropriate length. Also, the first thing I tried with the DIV really messes with alignment on the page. Anyway, I'll also copy this to "comments on the article". By the way, EXCELLENT site (irt), (I hope you don't mind me quoting your articles here), I use it weekly.
***

As a side note, I ended up writing a little delphi program that allows me to type in the names of my tabs and select the controls i want and then "click", it produces the code similiar to your example. Still have to do a little tweaking but saves a lot of time.

And on a personal note, Excellent article! :)


Sent by Andy Boddington on August 01, 2000 at 07:07:19: - feedback #1563

Comments:
The code has a problem. At line 17:

else if (document.layers) what = document.layers['myTab'].document.myForm.elements;

returns the error from Netscape 4.73 and MSIE4.0 (but not MSIE5):

document.layers.myTab.document.myForm has no properties.

Any clues?

Thanks
Andy Boddington


Sent by Rob Stewart on October 09, 2000 at 16:56:38: - feedback #1840

Worth:
Very worth reading

Comments:
This article discusses a useful technique. However, I find it falls short in several regards.

First, the code fails to cache properties and instead repeats lookups. For example, within the show() function, the expression, document.hiddenForm, appears repeatedly. Accessing the document object itself can be expensive. Accessing a property on the same object repeatedly is a waste of time. Instead, a local variable, perhaps hiddenForm should be assigned that property (var hiddenForm = document.hiddenForm;), then reused everywhere else. (A similar issue arises near the bottom of the same function in accessing document.layers['myTab'].document. Whew!)

Second, the show() function puts the HTML for all the tabs into a single function. The code will be easier to maintain if show() calls showTab1(), showTab2(), etc. Those functions can return an HTML string that show() can use for the rest of its work.

Third, this technique is not truly reusable. It is reusable, in the sense that you can copy and paste the code, then change the HTML, etc., to create a new form. However, it is not truly reusable because there is no framework that can be parameterized with the custom form content.

I haven't created a better version at this time, and I don't know that I'd be able to share it if I did, but I'm certain a reusable framework is possible.


Sent by David Morris on October 10, 2000 at 19:06:14: - feedback #1851

Worth:
Very worth reading

Comments:
Problem when I try to run the example on MSIE4. First from is displayed, however on click of a button, I get runtime error Line 5: 'document.all.myTab.myForm.elements' is not an object.

Would appreciate guidance.


Sent by Jonathan Chard on October 12, 2000 at 06:38:16: - feedback #1857

Worth:
Worth reading

Length:
Just right

Technical:
Just right

Comments:
It was worth reading because I didn't know that a <span style="position: absolute"> gets interpreted as a layer by Netscape.

You should really have mentioned however that this is restricted in Netscape (at least when I tried it in 4.5/win32). If you want to format the form at all (e.g. with a table) the form fields end up overwriting each other because the form is in a floating layer. If you try fixing the layer by embedding it in an ilayer, for some reason the text edits don't appear. Bah.

In short, this example is a nice demonstration of what you can do, but it falls short of being a real world, cross browser method of implementing interactive forms. (Haven't found one yet! I'll let you know if I do!)


Sent by Jonathan Chard on October 12, 2000 at 06:56:44: - feedback #1858

Worth:
Worth reading

Length:
Just right

Technical:
Just right

Comments:
Egad! I take it back (sort of)

I didn't realise either that a <span style="position: relative"> was interpreted as a layer either.

Further investigation is required - I was too harsh initially. Maybe it will work after all...

Thanks.. (I hope!)


Sent by Narasimha on December 12, 2001 at 01:23:58: - feedback #3414

Worth:
Very worth reading

Comments:
Really i appriciate the way the contents are explained and with the example provided..


Sent by glitch on September 25, 2002 at 07:15:46: - feedback #4171

Worth:
Very worth reading

Length:
Just right

Technical:
Just right

Comments:
is there a way to pass a value of a text field in one tab as an option inside select in anothere without submitting a form?


©2018 Martin Webb