Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Common Javascript when accessing form from a web browser 1

Status
Not open for further replies.

wildmild

Programmer
Mar 24, 2004
2
CA
I was required to code for validation of fields using Common Javascript in a form on Lotus platform. My form has a multi-tab-style table. My code can work very well in Notes. But when I ran it in IE, the problem came out. In order to get an effect of multi-tab-style on a web page, my table was automatically divided into several pages, every tab is in different page.

Obviously, my Javascript was not gonna work since Javascript's scope is page, or say, I couldn't access the fields in another tab( page) using Javascript.

This problem is easy to solve in a web applications, just use session to store the values of all fields and validate them before submission.

But in Domino, since conversion from Notes to Html is done automatically, I can't touch it at all.

Any solution and advice?

P.S. I tried to let my validation code executed when a user changes between tabs, but I couldn't find the corresponding event for those actions.
 
If you use a frameset, then you can have a frame where Java stores data that pages in other frames can recover.

As you do Java stuff, I'm sure you'll find a way to do that. I might be able to find some code, but since I do not Java, I'm not able to write it down off the top of my head.

Pascal.
 
Thank you , Pascal! The problem has been solved and it's tricky.
What I did is:
1>Go to "Properties" of the form
2>Flip to "Defaults" tab.
3>Tick the checkox named "Generate HTML for all fields".

Then Domino would take care of everything when my form runs in a Web browser.

And spending 2 minutes to view the source of the web pages auto-generated, I found what Donino did behind a user clicking the button to run the form in a web browser: Domino creates hidden fields in every tab (page) to store all values for those fields in other tabs.Everytime when you click the tab, before flipping into a new tab, Domino collects all the values for the fields in the current tab, and then put them into the hidden fields in the new tab(page).

P.S. I am new to Domino/Notes and always fooled by those tricky stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top