Help - Search - Members - Calendar
Full Version: Seeking simple AJAX example for saving data only
Oracle DBA Forums > Oracle > Oracle Forum
loganscott
hello.


I have some simple html/jsp/javascript pages with a list of items that will be saved to a shopping cart. I would like it to function such that when the user clicks on a button next to the item, that item is saved to the database. I already have this working in non-Ajax code -- when the button is pushed, a small popup window opens with a message that the item has been saved. But I want to skip the popup and just save the item with no notification, so there would be no change to the current page. This ajax code does not need to retrieve data, only save it, which should only require a couple lines of code, I hope.


To put it another way, I am trying to do this so-called:


"Partial submit: An HTML page can submit form data as needed without requiring a full page refresh."


I am seeking some code examples, especially with the minimal number of commands needed to save a record to my Oracle database (with no change to the current page) using javascript and Java servlets.


Your help is greatly appreciated.


Live long and prosper.
burleson
>> which should only require a couple lines of code, I hope.

It's not that simple! Steve Karam has some good ALAX examples using APEX:

http://www.dba-oracle.com/t_html_db_apex_a...ion_express.htm


********************************************************************
>> save a record to my Oracle database (with no change to the current page) using javascript and Java servlets.

Not Javascript, you want server-side, a servlet. Here is one:

http://forum.java.sun.com/thread.jspa?thre...ssageID=2033877
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.