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?
 
Sjef BosmanConnect With a Mentor Groupware 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
 
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
qwaleteeConnect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.