Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Ajax Upload file

guigui42Aug 21 2010 — edited Mar 3 2011
Hi,

i have a table TABLE1 with a CLOB field FI_LOB (among other normal fields)

An On Demand Process AddFile that will insert a line into TABLE1 using the parameters given

And a page P4, which has a Modal Form using jQuery, the JS looks like that :

<script type="text/javascript">
$( function() {
$('#ModalFormFile').dialog(
{
modal : true ,
autoOpen : false ,
buttons : {
Cancel : function() {
closeForm();
} ,
Add : function() {
addFile();
}
}

});
});

function openForm()
{
$('#ModalFormFile').dialog('open');
}

function closeForm()
{
$('#ModalFormFile input[type="text"]').val('');
$('#ModalFormFile').dialog('close');
}

function addFile()
{
var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=AddFile', 0);

ajaxRequest.add( 'P4_USR_ID', $v('P4_USR_ID'));
ajaxRequest.add( 'P4_FI_NAME', $v('P4_FI_NAME'));
ajaxRequest.add( 'P4_FI_LOB', $v('P4_FI_LOB'));
ajaxRequest.add( 'P4_FI_DATE', $v('P4_FI_DATE'));
ajaxRequest.add( 'P4_FI_DESC', $v('P4_FI_DESC'));
ajaxRequest.add( 'P4_FI_TYPE', $v('P4_FI_TYPE'));


var gReturn = ajaxRequest.get();

//gReturn =0;
if(gReturn)
{ alert(gReturn) }
else
{ ajaxRequest = null;
closeForm();
doSubmit('SEARCH'); }
}
</script>


This ajax "form" works well , except for the LOB part

Question is : how do i upload the file without submiting the page ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2011
Added on Aug 21 2010
6 comments
1,550 views