Solved

Saving a document via web & Javascript

Posted on 2001-06-11
4
171 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A short film showing how OnPage and Connectwise integration works.

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now