Link to home
Start Free TrialLog in
Avatar of amit_dutta
amit_dutta

asked on

Web programming

hello,

I have designed a form for the web browser. I am using R5. I have 2 situations to overcome:-

1. I want to submit the and the window should close after saving the document.

2. On submitting the form the document should be saves and a new URL should be opened instead of showind "form processed".

can anybody help.
Avatar of DButler
DButler
Flag of United States of America image

re Item 1:  Do you want to close the current instance of the browser AND open the separate URL outlined in part 2 of your question?

re Item 2:  Add a computed text field called $$Return which holds the URL that should be opened.  Look at [Customizing "Form processed" confirmation for the Web] in the Domino Designer help database for a full usage description and examples.
Avatar of amit_dutta
amit_dutta

ASKER

hi DButler,

in Item 1: I want the instance of the window to be closed, after saving the document. I want do this because, I am openning a new pop-up window and showing a form in it. On clicking the submit button of that form, it should save the document and close window instance.
I have used java script in the onclick event of the submit button as follows:-

document._NewTopicForm.submit();
window.close()

This results in the closing of the window, but the document is not saved.

If i remove window.close(), then the document is saved. But i want to close it also.

Any answers???
Dunno if it will work but I'd try,
adding a web-query-save agent.....
leave your page submit as:
document._NewTopicForm.submit();
                     
then in the agent do a:

print "<script> window.close() </script>"
or something like that....

Does this help?
Hi sam

web query save agent is always triggers before saving the document. I want my document to be saved and then close the window.
Hi Amit

In the $$Return use this function, it will close the current doc and open new window with new url

Here is the sample
"[" +

'<script language="javascript">' +

"close();" +

'window.open("//www.yahoo.com");' +

"</Script>" +

"["


PS: As a security feature, the browser will prompt the user to close the window.

Good Luck
~Hemanth
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Hemantha, ur suggestions worked with some modifications.