Solved

Saving a document via web & Javascript

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

22 Experts available now in Live!

Get 1:1 Help Now