Best way using the web to allow user to complete a form and return to original refreshed page

Hi - I'm looking for advice please.
I'm building a web based app in Domino. The user starts with a form displaying a whole dashboard full of data based on embedded views. They need to create a new data item, complete the form and then return to the original page in a refreshed state so that they see the newly added data in one of the embedded views.

I can create the form via a button and make it appear in a new browser window. I can then change the $$Return field to say 'Thanks for the new data'. This is clunky though.
Is it possible to have it automatically close that new window and trigger a refresh of the first browser window  ?

Alternatively would it be better to load the new form in the current window and then return in some way to the original form. Problem is that I can't easily provide a URL that maps to the current form because it has dynamic fields on it that drive the embedded views. I don't want the user to have to keep selecting categories each time they add a new piece of data.

Hope this makes sense - if anyone can help I'd appreciate it.

Andy
andyhinesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sjef BosmanGroupware ConsultantCommented:
Can be done. If the user's previous page can be one of many, then add a specific id to the URL you use to open the form. Example:

http:yourURL/yourForm?OpenForm&backto=viewx

In the form, the Query_String can be interpreted, you can extract the backto-parameter and use its value to compute the $$Return field.
Similar things can be done from the WebQuerySave agent: whatever it Prints is used to send to the browser, but if a URL is sent as "[someURL]", that URL is used to post to the browser.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
qwaleteeCommented:
Have the main form record curretn categories, and attenpt to re-populate with the same values. The recorded values could simply be placed in cookies. In this setup, you would have the new form open in the same window, replacing the old main page, and then have the save action re-open the main form.
0
andyhinesAuthor Commented:
Ok ... I'll look at both of these suggestions. If I wanted to keep it with the new form opening in a new window and then having it destroyed - possibly after a succes message and a 1 second pause - is that possible too ??

Thanks - Andy
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

qwaleteeCommented:
Well, you could, on close, use window.opener.refresh()

Of course, if the user changed that window, you could get some trouble. So you might want to #1) freeze the opener until the child window completes, #2) check that the opener exists before closing the child.
0
andyhinesAuthor Commented:
Hi - I appreciate the advice but in the end I did it a different way.
I used the same window for both main view and individual forms.
The main view is a form with a computed field (Dept) showing relevant embedded views.
When I close the inidividual (Item) form I compose a new instance of the main form and inherit the dept name - using the &ParentUNID=xxxxxxxx appended to the end of the $$Return field's URL.
That works and gives me a refreshed view of the main form.

I'm splitting the points equally as the advice was good .. just not my chosen option.

Thanks - Andy
0
andyhinesAuthor Commented:
Thank you for your help :)
0
Sjef BosmanGroupware ConsultantCommented:
Instead of backto= you used ParentUNID= ... How close can one get? ;-)

By  the way, I suppose you'd better use @Unique to get a unique value attached to the URL, if you use the xxxxx to make the URL unique. I assume that's why you need it, to prevent browser cache problems. There are even better ways to do that, but I'll let that be food for another question.
0
andyhinesAuthor Commented:
Hi Sjef,

What I meant was that rather than trying to return to a specific instance of a form I just do a ComposeForm again but specify the ParentUNID=whatever so that the MainForm (with the embedded views that never gets saved anyway) can inherit the DeptName from the one that I'm saving. That way it opens up showing the Dept I'm currently working with .. plus of course it's refreshed so it shows the document I've just saved in one of the embedded views.

Andy
0
Sjef BosmanGroupware ConsultantCommented:
a) that's also what I meant, I never intended to really go back to a previous page or so.
b) try your solution with TWO consecutive changes on the SAME document; is the MainForm really refreshed when you "return" to it the second time?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.