Calling PL SQL in a Javascript function
I've written a function :
function removeCouvent (id)
//var empSelectObj = document.getElementById(empSelect);
var ajaxRequest = new
htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=Del_couvent',0);
ajaxRequest.add('CodeCouv',id);
ajaxResult = ajaxRequest.get();
if(ajaxResult)
alert("test1");
else
alert("test2");
ajaxRequest = null;
with the pl / sql app process (Del_couvent) :
BEGIN
DELETE FROM COUVENT WHERE CV_CODE= :CodeCouv;
END;
It does nothing, no deletes, any idea ?
Similar Messages
-
Calling a sql server sproc and function from oracle gateway
Hello ,
i am new to oracle gateway,
we are trying to call a sql server 2008 stored procedure and function which return result set like a table result set.
Can you please share some syntax of how to do it.
and capture the data set and loop through or output it.
Thanks
madhuOn My Oracle Support you find some notes how to do that. The first one is
Different Methods For Calling MS SQL Server Procedures Using DG4MSQL (Doc ID 197192.1)
and a note using result sets (it was written fir the Sybase gateway but works the same way for DG4MSQL) is:
How to Call a Remote Sybase Procedure Using DG4SYBS (Doc ID 351400.1)
- Klaus -
Call abap method in a javaScript Function
Hi all,
I want call a abap method via a javaScript function in a view of a bsp application.
Does someone know how it works?
regards AlexHi,
You can either change the location of the page to a target URL usinng "document.location.href = 'targeturl'. So targeturl is the fully qualified url necessary to call the method.
Or you can take a look at XMLHttpRequest object (http://www.w3.org/TR/XMLHttpRequest/) which can create requests to a given URL. You can parse and use the data returned by the target url.
Hope it helps,
Regards.
Ozcan. -
Example of calling PL/SQL func in JavaScript
I need to validate a form element based on existing database value and give an alert. Does anyone know how to capture the value returned by a PL/SQL func in JavaScript variable? Thanks.
hi,
in the PL/SQL block 'before form displayed'
insert the code:-
htp.p('{script}var myVar = "' | | myPLSQLfunc | | '";{script}');
(I have replaced the less-than and greater-than symbols with {} so that they will show in the browser)
The variable myVar will now be available to JavaScript in the page and will have the value returned by myPLSQLfunc.
Regards Michael. -
Problem calling PL/SQL procedure from Workflow function activity.
Hi,
I am trying to call a PL/SQL procedure from within my workflow activity.
While I am able to execute the procedure through SQLDeveloper, the workflow function does not seem to call it.
It seems that custom PL/SQL procedures have to conform to certain standards to be called within workflow applications. I have written my procedure to conform to those standards (referred to the example workflows).
Could someone please help me with it?
Thanks and regards.Hi,
When I've received enough alpha reviews of the first few chapters of my book, I'll make chapter five available, which deals with writing functions for Workflows.
Matt
Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
http://www.workflowfaq.com
http://forum.workflowfaq.com -
Passing pl/sql variables to javascript function
hi! in a dynamic page, i've got the javascript:
<html>
function onCall(A,B)
<oracle>
Select aDate, Name from test;
b_rec b_cur%rowtype;
htp.p(</body onload="onCall('||b_rec.aDate||','||b_rec.Name||'";');
</oracle>
how can i pass in as onCall('12-Jun-2002','TestUser'), with the single quotes?
the above pass in as onCall(12-Jun-2002, TestUser) which the javascript will throw an error message.
thx.hi! got it by chance:
htp.p('<body onload="onBirth('''||BDay||''','''||BPerson||''');">');
rgds. -
How to call pl sql stored procedure or function in OAF 10 plus versions
Hello All,
I am using J-dev 10.1.3.3.0.3 version.I want to call stored procedure from package in one of my controller. I tried using "txn.createCallableStatement" but it is saying that createcallablemethod is not available.Does any one knows about this.
ThanksTry the OA Framework Forum.
John -
Calling Javascript function from PL/SQL Page Process
Hi All,
So far I have seen many threads that answered the question: Calling a PL/SQL from a Javascript function. I would like to know if it's posiible to do the reverse process as follows:
DECLARE
v_name APPLICANTS.NAME%Type;
v_surname APPLICANTS.SURNAME%Type;
v_idNumber APPLICANTS.ID_NUMBER%Type;
BEGIN
select name, surname
into v_name, v_surname
from APPLICANTS
where id_number = :P2_ID_NUMBER;
//Javascript function call Syntax is what i'd like find out
onchange="javascript:show_Name(v_name,v_surname);";
EXCEPTION
WHEN OTHERS
THEN
onchange="javascript:show_Exception(v_name,v_surname);";
END;& Javascript function to shiow applicant's details is:
function show_Name(item1,item2){
alert('Applicant's Name is: ' + item1 + ' & Surname is: ' + item2);
}THANK YOU!
Regards
KamoHi Dinesh, Thanks for the response!
I've also tried doing the following without success:
DECLARE
v_name APPLICANTS.NAME%Type;
v_surname APPLICANTS.SURNAME%Type;
v_idNumber APPLICANTS.ID_NUMBER%Type;
BEGIN
select name, surname
into v_name, v_surname
from APPLICANTS
where id_number = :P2_ID_NUMBER;
htp.p('<script type="text/javascript">');
htp.p('
alert('Applicant's Name is: ' + v_name + ' & Surname is: ' + v_surname);
htp.p('</script>');
EXCEPTION
WHEN OTHERS
THEN
htp.p('<script type="text/javascript">');
htp.p('
alert('Exception.');
htp.p('</script>');;
END;Do you know why this is not working?
Regards
Kamo -
Call to Applet Method from JavaScript Failed.
I Am calling a method from a javascript function from within a web page.
The page is loaded into a frame. The parent window of the frame has stored a reference to the applet which defines the methods. Note I am treating the reterence to the applet as a global variable. So that I can reference it methods as I navigate from one page to another.
I have JavaScript objects defined, and I am passing them as parameters to the applet's methods. In java, the JavaScript objects are refererenced as JSObject. When I call a java method passing a JavaScript
Object I get the following exception. Note Iam using j2sdk1.4.2_01 on a Windows 2000 Professional System. This problem start occurring after the recent Microsoft Worm/Virus a fix was loaded on my system which resulted in the following bug. Could someone please help me.
java.lang.NullPointerException
at sun.plugin.javascript.ocx.JSObject.setIExplorerAppletContext(Unknown Source)
at sun.plugin.com.DispatchImpl.convertParams(Unknown Source)
at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
at sun.plugin.com.DispatchImpl$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
java.lang.Exception: java.lang.NullPointerException
at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
at sun.plugin.com.DispatchImpl$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.com.DispatchImpl.invoke(Unknown Source)A little code snippet would help. I use JSObjects from Java 1.4 no problem and do have all the latest updates. I also have JavaScript calling Java code as well - also with no problem.
-
How to call javascript function from PL/SQL procedure
Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?
Hi,
I have a requirement to call Javascript function inside a After Submit Process.
clear requirement below:
1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
2. user clicks on "save files" button
3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
Hope this clarify U.
Krishna. -
Javascript function call from PL/SQL block
Hello,
I am writing this pl/sql block that has checkbox and onselect, it calls javascript function.
I defined javascript function in page header, even though I get error that says function is not defined.
Please help.
Thank you,
H.I got it resolved...!!!
-
Calling Javascript function from PL/SQL Process
I am new to APEX and Javascript so please forgive my question.
I have a process on page which successfully runs a few procedures etc. but now, as part of this process, I want to call a javascript function I have typed into the HTML Header.
My question is how can I call the javascript function from my process? Is it possible?
Many thanks
Winnie
ps. as an example my javascript looks like:
<script language="JavaScript">
function test(){
var decision = confirm("Click a button below and watch what pops up next.");
alert(decision);
</script>See: How to call a javascript function from pl/sql?
-
Call PL/SQL stored function in javascript
HI All
i have a stored function similar to this:
CREATE OR REPLACE FUNCTION GET_FULL_NAME(V_USER_NAME IN VARCHAR2)
RETURN VARCHAR2
AS
V_FULL_NAME USERS.FULL_NAME%TYPE;
BEGIN
SELECT FULL_NAME
INTO V_FULL_NAME
FROM USERS
WHERE USER_NAME = V_USER_NAME;
RETURN V_FULL_NAME;
EXCEPTION WHEN OTHERS THEN
RETURN (NULL);
END;can i call this function in a javascript function?
<script type="text/javascript">
function alert_fullname()
var str full_name = get_full_name("EMP001");
alert(full_name);
</script>i know this can be done in other way, but what i want to know is can i use a stored PL/SQL function/procedure to be called inside a javascript?
thanks in advance for any enlightenment,
BROKENHi Broken,
No, you can't do that directly within javascript.
You can, however, use Ajax to make the call back to a page process that retrieves the fullname value and returns it to your page.
Regards
Andy -
PL/SQL Javascript Function Call
Can anyone offer some help on this? I am attempting to get a javascript tool tip to work on an application I am developing. I have developed a line calendar using PL/SQL outputting HTML. When I embed a javascript function into my PL/SQL htp.p function, the javascript appears to go a little crazy. Here is an example of my code:
"htp.p('<td onMouseover="ddrivetip("Yahoos Site", "yellow", 250)"
onMouseout="hideddrivetip()">Yahoo</td>')
I have tried a few iterations, using different javascript, and I always get the same result. The double quotes used in the onMouseover and onMouseout function calls are a result of PL/SQL not liking single quotes. The entire code for the tooltip can be found on dynamic drives page:
http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm
The CSS and javascript code is placed as appropriate in the HTML page header. Am I missing something on the htp.p command?
Message was edited by:
jason97m
Message was edited by:
jason97mThis post covers it well.
http://inside-apex.blogspot.com/2007/08/using-tooltips-in-oracle-apex.html
Good luck.
Brian -
Call javascript functions from PL/SQL
Hi !
I just want to know if it is possible to call a javascript function from a PL/SQL procedure. If yes, anybody can explain me the syntax ?
Thanks
ChantaleYou can call Java Script - kind of.
PL/SQL has a "web browser" called UTL_HTTP. It allows you to make HTTP calls to a web server. This includes a function that can be used from SQL too (with a size limitation).
Example:
SQL> select UTL_HTTP.Request( 'http://some-web-server' ) as HTML_PAGE from dual;
HTML_PAGE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<META HTTP-EQUIV="Refresh" CONTENT="1;URL=http:/some-web-server:7777/index">
<html xmlns="http://www.w3.org/1999/xhtml">
<img src="images/Wave.gif">
Redirecting.. please standby..
<hr>
</html>
SQL>The call to the web browser can be to execute and load, for example, a JSP page.
However, if the page containts client-side Java script, i.e. code for the web browser to execute, than UTL_HTTP will merely return the contents & code of that page.
Client-side Java Script requires an engine in the browser. The JS language is used to manipulate the rendering engine of the browser.
The PL/SQL "web browser" does not have a display device to show a web page. Thus it is without a web browser rendering engine and therefore also cannot execute Java Script either.
Maybe you are looking for
-
[SOLVED] Postfix smtpd exits when using dovecot SASL auth
I've been trying to configure my mail server with dovecot SASL authentication. I've been following the guide here to set this up. However, when I telnet to the server on port 25, I get this in the postfix logs: Aug 4 21:51:00 localhost postfix/smtp
-
I have upgraded to Quicktime Pro, and cannot export from Final Cut to QuickTime to burn a DVD on My G5, what am I missing
-
9i only for X.2 Server ?
The documentation says that Oracle is only for OSX Server ... but can I install it on MacOS X Client ?
-
SAS9.1 Persistence and EJB lookups (not registered in JNDI?)
I am trying to deploy a very basic EJB3 module to test my learning. The module deploys via the Admin Console without apparnet error. Unfortunately, when using the generated test page for the web-service, I am having total failure which seems to be ar
-
Mass change of po message error
Dear Experts. I am trying to change the WBS in purchase orders.(BUS2012). However when i execute the system gives me that no data has changed. the system shows that no data has changed as below. Kindly assist. Thanks. Carol.