Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Saving a document via web & Javascript

Posted on 2001-06-11
4
173 Views
Last Modified: 2013-12-18
Hi,

I have a form, one of those annoying popups, which has a question and three options, I want to have no submit button, and want the window to close when I select one of the options.  The part I'm having trouble with is saving the document using the onclick event of the radio button.  Does anyone know an easy way of doing the equivalent of a @Command([filesave]);@command([fileclosewindow])?

thanks,
Joe.
0
Comment
Question by:JoeMunguia
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
CRAK earned 50 total points
ID: 6177034
In javascript (onClick), try:

document.forms[0].submit();
window.close()
0
 
LVL 5

Expert Comment

by:snocross
ID: 6177366
I'm sure there's other ways but here's how I do it.  Put this code in the HTML attributes of the field:

"SIZE=14 onClick=\"SaveIt()\""

Next put this code on your form and format it as passthrough HTML:

function SaveIt()
{document._NewPrototype.submit();}
0
 
LVL 5

Expert Comment

by:snocross
ID: 6177373
Woops, left out some code if you are going to embed the JS:

<script language="JavaScript">
function SaveIt()
{document._NewPrototype.submit();}
</script>
0
 

Author Comment

by:JoeMunguia
ID: 6177407
thanks for your answers!  CRAK got there first, problem now solved, another tick on the job sheet, must be time for a coffee..

cheers,
Joe.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question