Passing value from javascript function to servlet

Hello everybody,
i need to pass parameter from javascript function to servlet.
what i wrote is :
function callPopulateServlet(t)
var h =document.NewRequest.services;
var y = t.selectedIndex;
alert(h.options[y].value);
var id=h.options[y].value;
<%session.setAttribute("id",id);%> // am getting error at this point
document.NewRequest.submit();
with this id am quering values from database through servlet.
any body knows plz help me.
thanks,
anil.

this is the error am getting
Stacktrace:
     org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
     org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
     org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Similar Messages

  • How to pass value from Javascript function to a Java class method

    Hi All,
    I want to pass a value, which I catch in a Javascript function to a method in a Java class. I have tried many combinations but it gives me error.
    This is the way I am doing
    function assignBill() {
    proj = projPh.substring(0,indSlash);
    <% myproject.getProj(" project_cd = '" + proj + "'");%>
    proj is the variable which I want to pass to getProj methods.
    If any one has done this, please let me know. Thanks for your help.
    Ritesh Mehta

    The only way to receive something from clients page is to submit it somehow: through a form or link, but the info has to make it back to the server obviously. I dont know how your app works, but you can use the the javascript -location.href- function(i think) to submit the var to the server and process it there.

  • How to pass value from Javascript function to JSP ?

    hi,
    hello i have 2 jsp page and one external javascript page.
    from page 1.jsp
    i am calling a fuction named fun(1).and i am passing that value to external
    javascript page
    from external javascript.js
    i am getting this value in the fun(w) and sending this Page2.jsp like this
    var url = "page2.jsp?id ="+w;
    http.open("get","page2.jsp?id ="+w );
    and in page2.jsp
    i am getting that value like
    String k = request.getParameter("w");
    but this is showing error. how cloud i get that value on this page2.jsp ?
    plz any one help me to study this
    regards
    Vishnu Sankar S

    hello sir
    thank u very much..i got the output
    Message was edited by:
    vishnu_shankar

  • Passing value from JavaScript window to form

    Hi,
    Coul'd You help me?
    I have a test form. I open new JavaScript window from this form. I generate list of authors in this window by the procedure show_list. I want to pass value from JavaScript window back to test form, but
    the command "window.opener.document.forms[idx_form].elements[idx_fld].value = val;"
    don't pass value to test form. Where is mistake?
    Thanks Vaclav
    -------------- test form --------------
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=windows-1250">
    <TITLE>Edit</TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Comment out script for old browsers
    function get_list(frm, fld)
    var idx_form, idx_fld;
    idx_form = get_idx_form(frm);
    idx_fld = get_idx_field(idx_form, fld);
    var w = open ("http://vasekora/pls/portal309/ahs.RD_CISEL.SHOW_LIST" + "?startPg=1" + "&master_fld=" + "ID_AUTHOR" + "&slave_fld=" + "NAME" + "&ownr=" + "REDAKCE" + "&tbl_name=" + "AUTHORS" + "&cmd_qry=" +"" + "&idx_form=" + idx_form + "&idx_fld=" + idx_fld,"wn_Authors","width=500,height=600,resizable=yes,menubar=yes, location=yes");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    function get_idx_form(p_form_name)
    var v_index, v_full_name, v_return;
    for(v_index=0; v_index < document.forms.length; v_index++)
    v_return = -1;
         v_full_name = document.forms[v_index].name.split(".");
    if (v_full_name == p_form_name)
         v_return = v_index;
              break;
    return v_return;
    function get_idx_field(idx_form, field_name)
    var v_index, v_full_name, v_return;
    for(v_index=0; v_index < document.forms[idx_form].length; v_index++)
    v_return = -1;
         v_full_name = document.forms[idx_form].elements[v_index].name.split(".");
    if (v_full_name == field_name)
         v_return = v_index;
              break;
    return v_return;
    //-->
    </SCRIPT>
    </HEAD>
    <BODY>
    <FORM NAME="f_aut_new" ACTION="javascript:testclose()" METHOD=POST TARGET="_blank">
    <INPUT TYPE="text" NAME="id_aut">
    <IMG SRC="images/list.gif" alt="Seznam" border="0" align=bottom><BR><BR>
    <INPUT TYPE="submit" VALUE="Save">
    <INPUT TYPE="reset" VALUE="Cancel">
    </FORM>
    </BODY>
    </HTML>
    -------------------- end test form --------------
    procedure show_list
    startPg integer,
    master_fld varchar2,
    show_fld varchar2,
    ownr varchar2,
    tbl_name varchar2,
    cmd_qry varchar2,
    idx_form integer,
    idx_fld integer
    is
    TYPE cur_typ IS REF CURSOR;
    c cur_typ;
    c_cnt cur_typ;
    i integer;
         pg rd_types.pages_t;
    odkaz varchar2(4000);
    bk_url varchar2(4000);
         s1 varchar2(4000);
         var_mfld integer;
         var_sfld varchar2(8000);
         bl boolean;
         var_cmd varchar2(2000);
    begin
    htp.HTMLOPEN;
    htp.HEADOPEN;
    htp.p('<SCRIPT LANGUAGE="JavaScript">');
    htp.p('<!-- Comment out script for old browsers');
    htp.p('function Close_List(val, idx_form, idx_fld)');
    htp.p('{');
    htp.p('window.opener.document.forms[idx_form].elements[idx_fld].value = val;');
    htp.p('self.close();');
    htp.p('}');
    htp.p('//-->');
    htp.p('</SCRIPT>');
    htp.HEADCLOSE;
    htp.BODYOPEN;
    if cmd_qry is null then
    s1 := 'SELECT a.'||master_fld||', a.'||show_fld||' FROM '||ownr||'.'||tbl_Name||
    ' a ORDER BY a.'||show_fld;
    else
    var_cmd := UPPER(cmd_qry);
    s1 := 'SELECT a.'||master_fld||', a.'||show_fld||' FROM '||ownr||'.'||tbl_Name||
    ' a WHERE UPPER(a.'||show_fld||') LIKE ''%'||var_cmd||'%'' ORDER BY a.'||show_fld;
    end if;
    i := 1;
    OPEN c FOR s1;
    LOOP
    FETCH c INTO var_mfld, var_sfld;
    IF c%FOUND THEN
    IF i >= pg.StartRec AND i <= pg.EndRec THEN
    odkaz :=''||var_sfld||'';
    htp.p(i||': '||odkaz||' ('||var_mfld||')<BR>');
    ELSE
         IF i > pg.EndRec THEN
         EXIT;
         END IF;          
    END IF;
    ELSE
    EXIT;
    END IF;
    i := i + 1;
    END LOOP;
    htp.p('<BR><B><INPUT TYPE=BUTTON ONCLICK="javascript:self.close();" VALUE="Close"></B><BR><BR>');
    CLOSE c;
    htp.BODYCLOSE;
    htp.HTMLCLOSE;
    end;

    If this makes any difference: Instead of using "var w = open..." try "var w = window.open..."

  • Passing values from javascript in pop up window to parent jsp

    Hi
    I am trying to pass values from a pop up window to the main window that popped this child window , with the idea to have the parent window refresh itself with value from pop up window.But the values are not going through.I do a request on the hidden variable but when the parent
    jsp refreshes , the variable is still null...
    The following is the code i have .
    Parent jsp:a.jsp
    <form name='summary'>
    <input type=hidden name=customerid value="">
    <input type="button" class="textButton" name="action" value="customerlist" onClick="javascript:openWin('b.jsp','800','350')">
    <script>
    function openWin(loc, w, h) {
    var newWin = window.openloc,"HTML",'dependent=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h);
    newWin.window.focus();
    </SCRIPT>
    <%
    String optionVal = request.getParameter("customerid");%>
    var user = "<%= optionVal%>";
    </form>
    child jsp- b.jsp (pop up window)
    <script>
    function closer(){
    var val = document.formname.id.selected.value;
    window.opener.document.summary.customerid.value = val;
    window.opener.location.reload();
    </script>
    <form name = formname>
    <input type="text" name="id" value = ''>
    <input type="button" class="textButton" value="select"
    onClick="closer();window.close();">
    </form>
    Any ideas on what i am missing
    Thanks
    Arn

    use window.opener.document.forms[0].filedname.value = 'value u need to set'

  • How to pass values from one function to another

    Hi,
    I am a middle school teacher and a newbie in Flash Actionscript. I am trying to create a countdown timer for use in my class during tests. The start and pause functions work as required, but not the pause button. When I click on the pause button, the timer is reset to 0:00:00. Please help. Here is the code I had written so far:
    var Subject1timeLeftHr;
    var Subject1timeLeftMin;
    var Subject1timeLeftSec;
    Subject1start_btn._visible = true;
    Subject1pause_btn._visible = false;
    Subject1rotor_mc.gotoAndStop(1);
    Subject1rotor_mc._visible = false;
    Subject1durationHr_txt.text = "0";
    Subject1durationMin_txt.text = "00";
    Subject1durationSec_txt.text = "00";
    Selection.setFocus(Subject1durationHr_txt);
    function SubjectdurationHr(SubjectxdurationHr_txt, SubjectxdurationMin_txt)
    if (SubjectxdurationHr_txt.length == 1)
    Selection.setFocus(SubjectxdurationMin_txt);
    function SubjectdurationMin(SubjectxdurationMin_txt, SubjectxdurationSec_txt)
    if (SubjectxdurationMin_txt.length == 2)
    Selection.setFocus(SubjectxdurationSec_txt);
    function SubjectdurationSec(SubjectxdurationSec_txt, SubjectxdurationHr_txt)
    if (SubjectxdurationSec_txt.length == 2)
    Selection.setFocus(SubjectxdurationHr_txt);
    Subject1durationHr_txt.onChanged = function()
    SubjectdurationHr(Subject1durationHr_txt,Subject1durationMin_txt);
    Subject1durationMin_txt.onChanged = function()
    SubjectdurationMin(Subject1durationMin_txt,Subject1durationSec_txt);
    Subject1durationSec_txt.onChanged = function()
    SubjectdurationSec(Subject1durationSec_txt,Subject1durationHr_txt);
    function startcountdown(SubjectxdurationLeft, SubjectxdurationHr, SubjectxdurationHr_txt, SubjectxdurationMin, SubjectxdurationMin_txt, SubjectxdurationSec, SubjectxdurationSec_txt, Subjectxduration, SubjectxstartTime, SubjectxendTime, Subjectxtimer_mc, Subjectxpause_btn, Subjectxstart_btn, Subjectxrotor_mc, SubjectxtimeLeft, SubjectxtimeLeftHr, SubjectxtimeLeftMin, SubjectxtimeLeftSec, SubjectxtimeLeftHr_txt, SubjectxtimeLeftMin_txt, SubjectxtimeLeftSec_txt)
    delete SubjectxdurationLeft;
    delete SubjectxdurationHr;
    delete SubjectxdurationMin;
    delete SubjectxdurationSec;
    delete Subjectxduration;
    delete SubjectxdurationHr_txt.text;
    delete SubjectxdurationMin_txt.text;
    delete SubjectxdurationSec_txt.text;
    SubjectxstartTime = getTimer();
    Subjectxtimer_mc.onEnterFrame = function()
    if (SubjectxdurationHr_txt.text == Nan || SubjectxdurationMin_txt.text == Nan || SubjectxdurationSec_txt.text == Nan)
    else
    SubjectxdurationHr = 60 * 60 * 1000 * Number(SubjectxdurationHr_txt.text);
    SubjectxdurationMin = 60 * 1000 * Number(SubjectxdurationMin_txt.text);
    SubjectxdurationSec = 1000 * Number(SubjectxdurationSec_txt.text);
    Subjectxduration = SubjectxdurationHr + SubjectxdurationMin + SubjectxdurationSec;
    SubjectxendTime = SubjectxstartTime + Subjectxduration;
    SubjectxdurationLeft = SubjectxendTime - getTimer();
    if (SubjectxdurationLeft > 0)
    SubjectxdurationHr_txt._visible = false;
    SubjectxdurationMin_txt._visible = false;
    SubjectxdurationSec_txt._visible = false;
    Subjectxpause_btn._visible = true;
    Subjectxstart_btn._visible = false;
    Subjectxrotor_mc._visible = true;
    Subjectxrotor_mc.play();
    SubjectxtimeLeft = SubjectxdurationLeft / (1000 * 60 * 60);
    SubjectxtimeLeftHr = Math.floor(SubjectxtimeLeft);
    SubjectxtimeLeftMin = Math.floor((SubjectxtimeLeft - SubjectxtimeLeftHr) * 60);
    SubjectxtimeLeftSec = Math.floor(((SubjectxtimeLeft - SubjectxtimeLeftHr) * 60 - SubjectxtimeLeftMin) * 60);
    SubjectxtimeLeftHr_txt.text = String(SubjectxtimeLeftHr);
    if (SubjectxtimeLeftHr_txt.length < 1)
    SubjectxtimeLeftHr_txt.text = "0" + SubjectxtimeLeftHr_txt.text;
    SubjectxtimeLeftMin_txt.text = String(SubjectxtimeLeftMin);
    if (SubjectxtimeLeftMin_txt.length < 2)
    SubjectxtimeLeftMin_txt.text = "0" + SubjectxtimeLeftMin_txt.text;
    SubjectxtimeLeftSec_txt.text = String(SubjectxtimeLeftSec);
    if (SubjectxtimeLeftSec_txt.length < 2)
    SubjectxtimeLeftSec_txt.text = "0" + SubjectxtimeLeftSec_txt.text;
    else
    delete Subjectxtimer_mc.onEnterFrame;
    SubjectxtimeLeftHr_txt.text = "";
    SubjectxtimeLeftMin_txt.text = "";
    SubjectxtimeLeftSec_txt.text = "";
    SubjectxdurationHr_txt._visible = true;
    SubjectxdurationMin_txt._visible = true;
    SubjectxdurationSec_txt._visible = true;
    Subjectxrotor_mc.gotoAndStop(1);
    Subjectxrotor_mc._visible = false;
    SubjectxdurationHr_txt.text = "0";
    SubjectxdurationMin_txt.text = "00";
    SubjectxdurationSec_txt.text = "00";
    Subjectxpause_btn._visible = false;
    Subjectxstart_btn._visible = true;
    Selection.setFocus(SubjectxdurationHr_txt);
    function pausecountdown(SubjectxdurationHr_txt, SubjectxtimeLeftHr, SubjectxdurationMin_txt, SubjectxtimeLeftMin, SubjectxdurationSec_txt, SubjectxtimeLeftSec, Subjectxstart_btn, Subjectxpause_btn, Subjectxrotor_mc)
    delete Subjectxtimer_mc.onEnterFrame;
    SubjectxdurationHr_txt.text = String(SubjectxtimeLeftHr);
    SubjectxdurationMin_txt.text = String(SubjectxtimeLeftMin);
    SubjectxdurationSec_txt.text = String(SubjectxtimeLeftSec);
    Subjectxstart_btn._visible = true;
    Subjectxpause_btn._visible = false;
    Subjectxrotor_mc.stop();
    Subject1pause_btn.onRelease = function()
    pausecountdown(Subject1durationHr_txt,Subject1timeLeftHr,Subject1durationMin_txt,Subject1t imeLeftMin,Subject1durationSec_txt,Subject1timeLeftSec,Subject1start_btn,Subject1pause_btn ,Subject1rotor_mc);
    Subject1start_btn.onRelease = function()
    startcountdown(Subject1durationLeft,Subject1durationHr,Subject1durationHr_txt,Subject1dura tionMin,Subject1durationMin_txt,Subject1durationSec,Subject1durationSec_txt,Subject1durati on,Subject1startTime,Subject1endTime,Subject1timer_mc,Subject1pause_btn,Subject1start_btn, Subject1rotor_mc,Subject1timeLeft,Subject1timeLeftHr,Subject1timeLeftMin,Subject1timeLeftS ec,Subject1timeLeftHr_txt,Subject1timeLeftMin_txt,Subject1timeLeftSec_txt);
    Subject1cancel_btn.onRelease = function()
    Subject1timeLeftHr_txt.text = "";
    Subject1timeLeftMin_txt.text = "";
    Subject1timeLeftSec_txt.text = "";
    Subject1durationHr_txt._visible = true;
    Subject1durationMin_txt._visible = true;
    Subject1durationSec_txt._visible = true;
    Subject1durationHr_txt.text = "0";
    Subject1durationMin_txt.text = "00";
    Subject1durationSec_txt.text = "00";
    Subject1timeLeftHr_txt._visible = true;
    Subject1timeLeftMin_txt._visible = true;
    Subject1timeLeftSec_txt._visible = true;
    Subject1pause_btn._visible = false;
    Subject1start_btn._visible = true;
    Subject1rotor_mc._visible = false;
    Subject1rotor_mc.gotoAndStop(1);
    delete Subject1timer_mc.onEnterFrame;
    delete Subject1durationLeft;
    delete Subject1duration;
    delete Subject1durationHr_txt.text;
    delete Subject1durationMin_txt.text;
    delete Subject1durationSec_txt.text;

    I think you need to spend some time reducing your code to practical levels.  You seem to be passing everything in the book to every function and I would guess that probably none of it is necessary.  If you declared those variables at the beginning, then you don't need to pass them into any function because they are gobally available to any of the code/functions that follows them.  Similarly, if you have textfields on the stage, you do not need to pass those into any functions for the same reason.
    I see you making overuse of "delete" (and possibly errant use as well).  Probably the only thing you might want/need to use is...
    delete Subjectxtimer_mc.onEnterFrame;
    Which stops the enterframe activity from firing off, which I will guess is being used to update the textfields that indicate the time.
    And that conditional that uses == Nan isn't likely to do anything except wonder what an Nan is.  Textfields hold strings, which are quoted.  SO unless you have a variable named Nan somewhere that has a String value assigned to it, that conditional won't be doing anything for you.  You probably won't need it at all if you get this working properly.

  • Passing value from Report Column to Javascript

    Dear Apex wizards,
    I am a bit stuck right now with implementing a modal pop-up/iframe/javascript and this forum is my last hope to fix this issue.
    Anyway, will try to explain what I am trying to accomplish.
    What I need is: I want to have an SQL report, as a very first column I want to have an "ID" numbers from my table and I want this column to have a "Column Link" set in "Column Attributes" proper ties. The trick is, that when I click on the column link (when I run my report on Apex page) I need a JQuery modal window to pop-up where in IFrame will be another page and this page will use an "ID" from my column link URL to display data. So, basically I want to pass an "ID" value from my parent page to my child page which is displayed in iFrame of modal window.
    And here is what I have:
    1. I do have an SQL report:
    select SUBNET_ID,
           long2ip(NETWORK_ADDRESS),
           long2ip(SUBNET_MASK),
           long2ip(END_HOST),
           long2ip(START_HOST),
           MAX_HOSTS,
           long2ip(BROADCAST_IP),
           NETWORK_CLASS,
           NETWORK_SIZE,
           HOST_SIZE
    from   YC_CM_IP_SUBNETS 2. Then, in "Column Attributes" for "SUBNET_ID" a have set a "Column Link" to URL as : javascript:ViewNetworkDetails(#SUBNET_ID#); 3. Now, when I run my page and point my mice on any item in my "SUBNET_ID" column I can see that it is getting a "SUBNET_ID" number from my table and it shows it in the buttom of the browser as :javascript:ViewNetworkDetails(1);, or (2) or whatever "SUBNET_ID" is. So, that is good.
    4. And here I am getting confused, basically I have to pass a value of javascript:ViewNetworkDetails(#SUBNET_ID#);, which seems to work as it gives me correct numbers from my table, to my "ViewNetworkDetails" JavaScript function, so it can paste this value into "f?p=........." iFrame URL. Below is my Jquery Modal form script and Javascript to redirect me to my popup page (the script is in HTML Header):
    <script type="text/javascript">
    function ViewNetworkDetails(){
    var apexSession = $v('pInstance');
    var apexAppId = $v('pFlowId');
    var subnetIDNumber = document.getElementById(#SUBNET_ID#);
    $(function(){
    vRuleBox = '<div id="ViewNetworkDetailsBox" title="View Subnet Details">
    <iframe src="f?p='+apexAppId+':103:'+apexSession+'::NO:103:P103_SUBNET_ID:'+subnetIDNumber+'
    "width="875" height="500" title="View Subnet Details" frameborder="no"></iframe></div>'
    $(document.body).append(vRuleBox);
    $("#ViewNetworkDetailsBox").dialog({
                            buttons:{"Cancel":function(){$(this).dialog("close");}},
                            stack: true,
    modal: true,                            
                            width: 950,                    
    resizable: true,
    autoResize: true,
    draggable: true,
    close : function(){$("#ViewNetworkDetailsBox").remove();
                            location.reload(true); }
    </script> P.S. My assumption is, that there is a problem with this part of my scriptvar subnetIDNumber = document.getElementById(#SUBNET_ID#); where I cannot get my "SUBNET_ID" value from javascript:ViewNetworkDetails(#SUBNET_ID#); into "subnetIDNumber" variable and that is why I cannot pass it to my iFrame URL.
    P.S. P.S. the child page 103 has a "Automated Row Fetch", so it is not a problem. In addition, I did a simple test, where I had a page item "P102_Value" with some value and in my script I had instead var subnetIDNumber = document.getElementById(#SUBNET_ID#); this var subnetIDNumber = $v('P102_Value'); and it worked perfectly fine....but cannot make it working against SQL Select statement :-(
    HEEEEEEEEEEEEEELLLLLPPPP.
    Thanks

    Change your column link to send the subnet_id column's value to the function call (you mentioned it, but I m not sure if you actually did)
    javascript:ViewNetworkDetails(#SUBNET_ID#);<u>You are passing the parameter value to the function, but not defined any parameters in the function definition</u>(this is possible in JS, any extra parameters is ignored)
    So, modify the function to accept the subnet ID parameter(I am actually surprised how you missed this) and assign that parameter to variable.
    <script type="text/javascript">
    function ViewNetworkDetails(pSubnetId){
    var apexSession = $v('pInstance');
    var apexAppId = $v('pFlowId');
    var subnetIDNumber = pSubnetId;
    //rest of the code would be the same

  • OnSubmit function Error in passing values from WDA Adobe Form to Ztable

    Friends,
    I am trying to pass values from Adobe Interactive Form to ztable.
    I am using WDA to display the form. I have created the form context with attributes that are bound to the form fields using the Adobe Livecycle Designer.
    Once the user presses the Submit button, the data is passed to the ztable. In the onSubmit function assigned to the Submit button, I am using the "Read Context" feature of WD Code Wizard to read the values of the attributes
    I am able to read and populate the ztable with values of the first 3 attributes. But am unable to read the value of  4th attribute using the "Read Context" feature of WD Code Wizard. All 4 attributes are of string type.
    I am not sure if this is a buffer size problem or is there a limitation that only 3 attributes can be read per Adobe form / onSubmit function.
    Please let me know what is missing.
    Thanks and Regards.

    Resolved

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

  • How to get a value from JavaScript

    How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.
    what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++
    ScriptData::ScriptDataType fDataType = resultData.GetType();
    if (fDataType == kTrue)
           CAlert::InformationAlert("sucess");
           //call some function
                        else
                                  CAlert::InformationAlert("Error");
         // do nothing
    JavaScript Code:
        if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
               alert(value);
                return true;
      else
               alert ("SORRY");
               return false;

    How to get java script result into JSResult i m not getting it.
    I have wriiten follwing code in c++ :
              WideString scriptPath("\\InDesign\\Source1.jsx");
              IDFile scriptFile(scriptPath);
              InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
              if(scriptRunner)
                        ScriptRecordData arguments;
                        ScriptIDValuePair arg;
                        ScriptID aID;
                        ScriptData script(scriptFile);
                        ScriptData resultData;
                        PMString errorString;
                        KeyValuePair<ScriptID,ScriptData> ScriptIDValuePair(aID,script);
                        arguments.push_back(ScriptIDValuePair);
                        PMString paramkeyname1;
                        Utils<IScriptArgs>()->Save();
                        Utils<IScriptArgs>()->Set("paramkeyname1",scriptPath);
                        Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,erro rString,kFalse);
                        Utils<IScriptArgs>()->Restore();
                        ScriptData::ScriptDataType fDataType = resultData.GetType(); // here i should get true or false which i m passing it from javascript code......not as s_boolean
                        if (fDataType == kTrue)
                                       //CAlert::InformationAlert("sucess");
                                     iOrigActionComponent->DoAction(ac, actionID, mousePoint, widget);
                        else
                                    this->PreProcess(PMString(kCstAFltAboutBoxStringKey));
    Java script code:
    function main()
           var scrpt_var;
           var scriptPath,scrptMsg;
           var frntDoc=app.documents[0];
           if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
                alert(value);
                 return true; // i want this value i should get in c++ code...How to get these values in c++
           else
              alert ("Error");
              return false; // i want this value i should get in c++ code...How to get these values in c++

  • Can JWS accept somekind of param's values from JavaScript

    Like in Applet we could pass a param's value from JavaScript. Is it possible to do something similar to JWS?.
    Thanks.

    Java Web Start is implemented as a browser helper application, the browser downloads
    the jnlp file, and launches javaws with that downloaded temp file as an arg. Because of this
    you cannot pass args to javaws except thru the jnlp file.
    The most common way to dynamically generate args and parameters to a javaws app is
    to dynamically generate the jnlp file use a jsp page or a servlet.

  • Getting values from a function module called in a WDA method

    Friends,
    I am trying to execute a function module from WDA.
    I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an internal table.
    I am using the "Method Call in Used Controller" of WD Code wizard to call the function module.
    When the event handler method containing the call to the function module is executed, nothing happens.
    I am not sure how to pass values to the function module and to get the return values from the function module.
    I am new to using function modules from WDA. Please help me out.
    Thanks and Regards.

    Rashmi,
    Is the function module intended to collect input data from the UI and process it? - Yes
    If yes, then the input (importing parameter) to the Function Module is a table of values (which should be ideally from the context mapped to the Table UI Element). - The importing parameter is a single value NOT a table and is mapped to the view context.
    Now this table UI Element is bound to the view controller context , which in turn is mapped to the component controller context. And you are indeed being able to read the value of this internal table in the component controller method where the function module is being called by means of get_static_attributes_table (Is this right? - Yes, I am able to read the table of values that is passed from the component controller view to form view context by using get_static_attributes_table.
    Or are you being able to read it in the event handler method of the view controller and not being able to read it in the component controller method) -
    The function module takes a single value as import parameter and returns a table of values as return value.
    It works fine when no importing parameter is being used and returns the table of values that is getting passed from component controller context to form view context when i am able to read it using get_static_attributes_table.
    Now the question is: how to pass the import parameter value to the function module. I assumed since the importing parameter is a context node (like the return values are), i should set the value ( captured when the user enters the value in the form) to the importing parameter context attribute using set_attribute method. Since it is mapped to the component controller context, i assumed it will get passed and the method will take it as input parameter.
    Let me know if my assumptions are correct regarding passing the import parameters and what is missing here.
    Thanks and Regards.

  • How to return more than one value from a  function

    hello everybody,
    Can anyone tell me how to return more than a single value from a function, the problem is i have 4 points,
    2 points form one line ,another 2 points form 2nd line ,each point is 3 dimensional(x,y,z coorinates) so i will pass these values to func(x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4), i will find the point of intersecton of two lines and i will get it as x,y,z , now how to return these 3 coordinates,usually the function returns only one value, please help me to solve it out.
    Thanks.

    I think the easiest way or trick here is (easiest isn't always the best as we know, but atleast this one will work) to create simple data array. and pass that. Create an array with:
    <code>
    class justArray {
    int x=0
    int y=0;
    int z= 0;
    ...somewhere
    justArray[] points= new justArray[4];
    points[0].x= ..
    points[0].y= ..
    points[0].z= ..
    points[1].x= ..
    return points[]
    </code>

  • Passing data from JAVASCRIPT to SAP database

    Hi Experts,
    Is it possible to connect or access RFC function module through JAVASCRIPT? I want to send data from JAVASCRIPT to SAP database table.
    Is it possible to pass data from JAVASCRIPT to SAP database table?
    Thanks in advance.
    Regards,
    Arindam Samanta.

    OData services can be one option to achieve this.
    Another possibility can be use of Generic REST enablement with SAP NetWeaver Gateway.
    If you are not considering Gateway at all, then  A JSON adapter like the one mentioned in JSON Adapter for ABAP Function Modules can be handy.

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

Maybe you are looking for

  • Need to change credit card

    I have Updated My Visa Card and Need to Chnage it to Master card.. Any Help Please

  • Why can't I remove Wacom application?

    I have uninstallled it already and have deleted everything that is associated with it by searching in spotlight wacom and deletong everything i see but if you look closely on what i have copy and pasted, it's still there? How can I remove this? Hardw

  • Duplicates of elements for Address Book entries

    I have looked through the various threads that discuss "duplicate" entries in Address Book (Contacts). My situation is a slight variation. While I have a handful of AB people who have multiple entries (some have as many as 15!), my problem here is th

  • Student Project - Need Help With ViewPlatform Rotation

    Hello folks, I'm a student in Strathclyde University, Glasgow, and I'm currently doing a small project for one of my programming classes. I'm doing a 3D knots and crosses game but I'm having tremendous difficulty getting the rotation to work just the

  • Random Files Appearing in trash

    A few Days ago I discovered the following files in my trash, ¶bmÄR.lq¶ qì"t,M». .B úÚ]H␀␀.␀␀␀ When I empty the trash the files don't go away. I tried Securely emptying the trash but i got the same result. Also According to the finder they are zer