Undefined in alert of JavaScript Function

Dear All
i have the below source of my jsf page, it contains java script small function (to access input text component) & get its value and show it in alert, but i am facing "*undefined*" instead of the value in the alert , please advise
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:document title="untitled2.jsf" id="d1" binding="#{backingBeanScope.backing_untitled2.d1}">
<af:messages id="m1" binding="#{backingBeanScope.backing_untitled2.m1}"/>
<af:form id="f1" binding="#{backingBeanScope.backing_untitled2.f1}">
*<af:resource type="javascript">*
*function checkval() {*
var val = document.getElementById('it2');
alert(val.value);
*</af:resource>*
<af:panelStretchLayout topHeight="50px" id="psl1" binding="#{backingBeanScope.backing_untitled2.psl1}">
<f:facet name="top">
*<af:inputText value="#{bindings.EmployeeId.inputValue}" label="#{bindings.EmployeeId.hints.label}"*
*required="#{bindings.EmployeeId.hints.mandatory}"*
*columns="#{bindings.EmployeeId.hints.displayWidth}"*
*maximumLength="#{bindings.EmployeeId.hints.precision}"*
*shortDesc="#{bindings.EmployeeId.hints.tooltip}" id="it2"*
*binding="#{backingBeanScope.backing_untitled2.it2}" clientComponent="true">*
<f:validator binding="#{bindings.EmployeeId.validator}"/>
<af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeeId.format}"/>
<f:facet name="context"/>
</af:inputText>
</f:facet>
<f:facet name="center">
<af:panelGroupLayout layout="scroll" id="pgl1" binding="#{backingBeanScope.backing_untitled2.pgl1}">
<af:inputText label="Label 1" id="it1" binding="#{backingBeanScope.backing_untitled2.it1}"
clientComponent="true" autoSubmit="true"/>
*<af:commandButton text="commandButton 1" id="cb1"*
*binding="#{backingBeanScope.backing_untitled2.cb1}" clientComponent="true"*
*partialSubmit="true">*
*<af:clientListener method="checkval" type="action"/>*
</af:commandButton>
</af:panelGroupLayout>
<!-- id="af_one_column_header_stretched" -->
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_untitled2-->
</f:view>

Dear All
i made all the above solutions but still facing the same error, but i need another help, i found in oracle doc regarding this, the below statement
Absolute expressions use the fully qualified JSF client ID (meaning, prefixed with the IDs of all NamingContainer components that contain the component) with a leading NamingContainer.SEPARATOR_CHAR character
You can determine whether or not a component is a naming container by reviewing the component tag documentation. The tag documentation states whether a component is a naming container.
so can any one help me to know the a naming container list of jsf components for 11.1.2.0 JSF 2.0 ?
thanks
Edited by: Oracle ITself on Sep 5, 2011 12:51 AM

Similar Messages

  • Javascript function undefined error

    Hi developers,
    I am generating a html file on the fly using a perl program. The main form to be used is generated by a javascript function called loadPage(). loadPage writes the <form> <input type="checkbox"> blah..</form> into the document by using document.write When the checkbox is unchecked, a javascript function called delFromList is called. This function is generated when the html is generated(by the perl program). The problem now is that the form comes out well but when I uncheck the checkbox, the javascript error says delFromList undefined...the same problem occurs for each function call...what am I missing here...any help will be highly appreciated...
    tia.
    vish
    PS: the sample html is inlined below
    Content-type: text/html
         <html>
         <head>
         <title>Level Refinement</title>
         <script Language=JavaScript>
    function delFromList(box) {
    blah blah....
    function addToList(box) {
    blah blah....
    ....and many other functions...all function that are used are defined....
    function loadPage()
                        document.write("<form name=layout action=\"http://software.somesite.com:81/cgi-bin/parser.pl\" Method=post>");
              document.write("<INPUT TYPE=CHECKBOX NAME=\"European\" VALUE=\"European\" onClick=\"if(this.checked){addToRankList(this)}else{delFromRankList(this)}\" CHECKED>European<BR>");
              document.write("<INPUT TYPE=CHECKBOX NAME=\"Canadian\" VALUE=\"Canadian\" onClick=\"if(this.checked){addToRankList(this)}else{delFromRankList(this)}\" CHECKED>Canadian<BR>");
              document.write("<INPUT TYPE=CHECKBOX NAME=\"Japanese\" VALUE=\"Japanese\" onClick=\"if(this.checked){addToRankList(this)}else{delFromRankList(this)}\" CHECKED>Japanese<BR>");
              document.write("<h4>Rank your preferences:<ul type=circle><li> Select the attribute to move<li> Use the \"Move Up\" and \"Move Down\" buttons to move the attribute ranking HIGHER and LOWER respectively.<br></h4>");
              document.write("<div align=center><center><table width=100% border=1><tr><td width=30% valign=top align=center>Ranking (High to Low)<br><select name=col1 size=10 onChange=checkSelectCol1()>");
              document.write("<option>European");document.write("<option>Canadian");document.write("<option>Japanese");               
              document.write("</select><p>");
              document.write("<INPUT TYPE=button value=\"Move Up\" size=4 onClick=javascript:col1Up(document.layout.col1)>");
              document.write("<INPUT TYPE=button value=\"Move Down\" size=4 onClick=javascript:col1Down(document.layout.col1)>");     
              document.write("</td></tr></table></div><br>");
              document.write("<INPUT TYPE=button value=\"Next\">");     
              document.write("</form>");
         </script>
    </head>
         <body onload="loadPage()">
         </body>
         </html>

    As mentioned above javascript and java are 2 different thigns. How ever after looking at your code I would have to guess that you missed a '{' or '}' some where in you actual code. Other than some minor html syntax errors I realy didn't see anything wrong with the code above. But since you didn't post the actual code it hard to say if fixing the few minor errors would make any diff. I'm going with missed curly braces.
    Ron_W

  • Alert, confirm and prompt javascript functions died with ios 7

    Alert, confirm and prompt javascript functions died with ios7.  Will it be fixed? It breaks websites.

    Hi..
    JavaScript is no longer available to switch on or off in Settings > Safari.
    So apparently that function has died with iOS 7.
    message edited by:  cs

  • Problem when calling more than 1 Javascript function

    Hello everybody,
    I am trying to disable fields based on the value in a Select List. There is a table in which values are stored to tell if a field should be disabled for the selected value. I have created an Application Process and a JavaScript function for each field.
    The problem is that only the first function is executed, and the second not.
    I have tried the following:
    onchange="Disable_Dagen(this);Disable_Kg(pThis);"and I have put them together in a parent JavaScript function
    function Disable_Fields(pThis){
    Disable_Kg(pThis);
    Disable_Dagen(pThis);
    }In either case only the first works, so when I change the order then the other one is executed properly.
    Can anyone give me a clue on how to solve this?
    My complete JavaScript definition in the header is as follows:
    (the code in html_DisableOnValue is taken from the example site from Carl Beckstrom)
    <script language="JavaScript" type="text/javascript">
    <!--
    function html_DisableOnValue(pThis,pValue,pThat){
         var lTest;
      if(pThis.nodeName == 'SELECT'){
                   lTest = html_SelectValue(pThis) == pValue;
         }else{
                   lTest = $x(pThis).value == pValue;
         if(pThat){
               for (var i=2;i <= arguments.length; i++){
                          html_disableItem(arguments,lTest)
         return;
    function Disable_Dagen(pThis){
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=AP_RETURN_DISABLE_VAL_DGN',0);
    get.add('AI_AFW_CODE',pThis.value);
    gReturn = get.get();
    get = null;
    //alert('Return waarde is '+ gReturn );
    html_DisableOnValue(pThis,gReturn,'P43_AANTAL_DAGEN');
    function Disable_Kg(pThis){
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=AP_RETURN_DISABLE_VAL_KG',0);
    get.add('AI_AFW_CODE',pThis.value);
    gReturn = get.get();
    get = null;
    //alert('Return waarde is '+ gReturn );
    html_DisableOnValue(pThis,gReturn,'P43_AANTAL_KG');
    function Disable_Fields(pThis){
    Disable_Kg(pThis);
    Disable_Dagen(pThis);
    //-->
    </script>
    In this case the Form Element property is set toonchange="Disable_Fields(this)"
    Thanks, Wouter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Roel,
    Thanks again for your response.
    There is a lot more to Firebug then I had seen before. Now I have turned on the Console and the Script. Initially I saw the following in the Console:
    C is undefined
    $x_disableItem(undefined, true)apex_3_1.js (regel 1)
    html_DisableOnValue(select#P43_AFWIJKING_CODE, "101", "P43_AANTAL_DAGEN")f?p=104:...2606::::: (regel 38)
    Disable_Dagen(select#P43_AFWIJKING_CODE)f?p=104:...2606::::: (regel 51)
    onchange(change )f?p=104:...FPQ%3D%3D (regel 2)
    [Break on this error] var gDebug=true;var gkeyPressTime;var gL...Options;html_SelectValue=$f_SelectValue;When I removed the comments before the 2 Alerts, I only got one alert when I tested it.
    Then I replaced the function call to html_DisableOnValue to $f_DisableOnValue as you suggested, and that did the trick. Now it Works!
    I still don't know why the html_DisableOnValue function doesn't work. I just copied it from the demo site of Carl Beckstrom. Anyway my problem is solved.
    Have a nice weekend, Wouter

  • How to pass Application Item value in Javascript function.

    Hi,
    I have the following javascript in the HTML Form Element Attributes properties
    I am on Page1 and passing P1_DEPT_NO page item value. This is working perferctly fine and I am able to get the exact value of the page item
    onchange="javascript:function1($x('P1_DEPT_NO').value);"I am on Page1 and passing Application Item G_DEPT_NO value.
    The problem here is, I am not getting the Application item value inside the javascript function.
    I tried using alert(); and it's giving me value as undefined
    onchange="javascript:function1($x('G_DEPT_NO').value);"Just want to know, how to pass the Application Item value in Javascript.
    Thanks,
    Deepak

    Deepak,
    I am not an expert at Javascript, but the suggestin I made was because javascript is a case-sensitive language.. and therefore onChange is not the same as onchange.
    Not quite sure if that is causing the problem.
    Application items are not associated with a page and therefore have no user interface properties.
    Therefore, as mentioned in another post, the rendering would not work for application items.
    If it is for a single item, used only in this page, you could create a hidden page item and use it fo your purpose
    If you still want to look at application items and AJAX, This page contains examples of using AJAX to solve problems like the one you mentioned.
    http://www.oracle.com/technology/obe/hol08/apexweb20/ajax_otn.htm#t1b
    Thanks,
    Rajesh.

  • JSP Array to Javascript function :URGENT HELP

    Hi,
    i have problem in sending array from JSP to Javascript function. if you have any answer please let me know asap.
    Thanks in advance.
    -Priya

    Hi Kurt,
    I have written follow. program . but still I'm getting errors.
    I don't know what I'm doing wrong.
    <HTML>
    <HEAD>
    <SCRIPT>
    function showArray()
         var str = new Array (<%for (int j=0; j<jspstr.length; j++);
         out.print ("\"" + jspstr[j] + "\"" + (j<(jspstr.length-1)?",":""));%>);
         alert ("Total elements received: " + str.length);
         for (j in str)
         alert ("element number " + j + " equals " + str[j]);
    </SCRIPT>
    </HEAD>
    <BODY>
    <FORM>
    <%String[] jspstr = {"abc", "def", "ghi", "jkl"};%>
    <SCRIPT>
    showArray();
    </SCRIPT>
    </FORM>
    </BODY>
    </HTML>
    com.ibm.servlet.engine.webapp.WebAppErrorReport: C:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_try_xjsp_debug_jspsrc_988535311.java:135: Undefined variable or class name: jspstr
    for (int j=0; j<jspstr.length; j++);
    ^
    C:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_try_xjsp_debug_jspsrc_988535311.java:136: Undefined variable: jspstr
         out.print ("\"" + jspstr[j] + "\"" + (j<(jspstr.length-1)?",":""));
         ^
    C:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_try_xjsp_debug_jspsrc_988535311.java:136: Undefined variable: j
         out.print ("\"" + jspstr[j] + "\"" + (j<(jspstr.length-1)?",":""));
         ^
    C:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_try_xjsp_debug_jspsrc_988535311.java:136: Undefined variable: j
         out.print ("\"" + jspstr[j] + "\"" + (j<(jspstr.length-1)?",":""));
         ^
    C:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_try_xjsp_debug_jspsrc_988535311.java:136: Undefined variable or class name: jspstr
         out.print ("\"" + jspstr[j] + "\"" + (j<(jspstr.length-1)?",":""));
         ^
    5 errors
    Thanks,
    -Priya

  • 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)

  • How can I have a backing file call a JavaScript function?

    I have a Weblogic portal with a JSP portlet. The portlet has a backing file. How can I get the backing file to call a JavaScript function in my portlet?
    thanks

    Hi
    your questions are not correct because you are mixing up server side operations with client side operations.
    First server side code executes then the page is sent to the browser , then any javascript executes on the browser. So asking for javascript to be called from backing file (server side) doesn't make sense or asking for javascript to read a parameter doesnt exactly work either.
    However in your server code suppose you have a variable action in the request that you want javascript to know then in your JSP you would add something like
    <script type="text/javascript">
    var action = '${requestScope.action}';
    alert(action);//or whatever you want to do
    <c:if test="${requestScope.someOthervariable == ''xyz'}"><%-- this check is done on the server --%>
    callSomeJavascript(); <%--this javascript is only executed when the server side value of someOtherVariable is xyz --%>
    </c:if>
    </script>
    i.e. you can output the javascript that has the variables you need or the function calls you want.
    Like I said understand whats server side and whats client side.

  • How can I call a servlet method from a javascript function

    I want to call l a servlet method from a javascript function.
    Does any one have an example of code.
    Thinks in advance

    Actually, as long as the servlet returns valid javascript, you can indeed "call it" from the client. It will initiate a request and return the result to the browser.
    This example uses Perl, but it could be easily modified to go to a servlet instead.
    Note that it is only supported in DOM browsers (IE6+/NN6+/etc)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <title> Test server-side JS </title>
    </head>
    <body>
    <script type="text/javascript">
    function checkIt(variable, value)
    var newScript = "cgi-bin/validateJS.cgi?"+variable+"="+value;
    var body = document.getElementsByTagName('body').item(0)
    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) body.removeChild(scriptTag);
    script = document.createElement('script');
    script.src = newScript;
         script.type = 'text/javascript';
         script.id = 'loadScript';
         body.appendChild(script)
    </script>
    <p>Test.</p>
    <form id="f1" action="">
    <input type="text" name="t1" id="t1" onChange="checkIt(this.name, this.value)">
    </body>
    </html>
    validateJS.cgi
    #!/opt/x11r6/bin/perl
    use CGI qw(:all);
    my @valArray = split(/=/,$ENV{QUERY_STRING});
    print "Content-type: text/javascript\n\n";
    # myPass is the password
    $myPass = "foobar";
    if ("$valArray[1]" eq "$myPass")
    print "alert(\"Success!!\")";
    else
    print "alert(\"Failure!!\")";

  • Error in calling a javascript function

    Hi
    Below is a code from my HTML file...
    <html>
    <head>
    <script language="javascript" >
    function try()
    alert("hi");
    </script>
    </head>
    <body>
    <input type="button" value="Hello world!"
    onclick='try();'>
    </body>
    </html>while running page in browser i m getting error :
    line: 12
    char: 4
    error: expected "{"
    I understand that this is not a java problem but please help.
    thanx
    Edited by: money321 on Feb 5, 2008 6:07 AM

    I know that this is not the right forum, but I'd like peoples' advice on which prep to use for a colonoscopy. The Fleet's Phosphosoda prep is more palatable, and easier and more convenient to take compared to the Colyte (gallon jug) prep, but on the other hand the Colyte prep is safer since it doesn't carry the risk of calcium phosphate precipitates forming in the kidneys potentially causing acute kidney failure, a rare but certainly serious complication. Many thanks in advance.

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • Can we call a javascript function from backing bean class?

    I have a requirement. In a multiselect table, when users selects some rows and clicks a button. Depending upon some condition, an alert box should appear with 2 buttons 'Yes' and 'No'. On clicking yes, certain field values in the selected rows of table should change. On clicking no, the alert box should close. As far as i know alert box can be done only in JS.
    Please help me, if a javascript function can be called in backing bean method or suggest some way where alert boxes can appear through ADF.

    I need to go back to the backing bean as i need to iterate through each selected row of the table in a method( method written for command button) and then if atleast one of the selected rows has job field='Manager', then an alert box needs to be displayed. If none of the rows have job field as 'manager', alert box should not be displayed.
    If I write the function for onclick, i cannot iterate through the selected rows of the table in JS function.
    Please suggest a way to do this.

  • How to put a jsp variable into a javascript function?

    Please read the following coding. I want to pass the variable ans from jsp to the function check_answer() of javascript. ans is a string got from database. But I cannot put the variable ans into the Javascript function. Can anyone help?
    <script language="Javascript">
    function check_answer() {
    if (testing.result.value==ans ){
    window.alert("You have got 10 marks.");
    </script>
    <body>
    <form name="testing"...>
    <%
    ResultSet rs = stmt.executeQuery("select * from level where...");
    while(rs.next())
    out.println("<tr>");
    out.println("<td>" + rs.getString("question") + "</td>");
    ans = rs.getString("answer");
    out.println("</tr>");
    out.println("<input type='text' name='result'>);
    out.println("<input type='button' value='Enter' onclick='check_answer()'>");
    %>

    The following should be able to pass ans.
    <script language="Javascript">
    function check_answer(ans) {
    if (testing.result.value==ans ){
    window.alert("You have got 10 marks.");
    </script>
    <body>
    <form name="testing"...>
    <%
    ResultSet rs = stmt.executeQuery("select * from level where...");
    while(rs.next())
    out.println("<tr>");
    out.println("<td>" + rs.getString("question") + "</td>");
    ans = rs.getString("answer");
    out.println("</tr>");
    out.println("<input type='text' name='result'>);
    out.println("<input type='button' value='Enter' onclick='check_answer('<%= ans%>')'>");
    %>jag

  • VC++ WebBrowser call Javascript function in a frame of the main page

    I can successfully call JS function in the main page from VC++, but when I call the JS function in frame, GetIDsOfNames() return DISP_E_UNKNOWNNAME. The question can be describe as below:
    main page is INDEX.HTM, loaded in webbrowser control, src:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Sample</title>    
        <script type="text/javascript">
    function FuncMain()
    alert("Main Page Function Called!");
        </script>
    </head>
    <body>
    <div>
      <div id="div_test1">
        <iframe id="page_test1" width="100%" height="100%" src="test1.htm" frameborder="0" scrolling="no"></iframe>
      </div>
      <div id="div_test2">
        <iframe id="page_test2" width="100%" height="100%" src="test2.htm" frameborder="0" scrolling="no"></iframe>
      </div>
    </div>
    </body>
    </html>
    test1.htm src:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
    <div>Test1 frame page</div>
    </body>
    </html>
    test2.htm src:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <script type="text/javascript">
         function showAlert(x)
    alert(x);
     function callVC()
    window.external.VCFuncTest();
        </script>
    </head>
    <body>
    <div>Test2 frame page</div>
    <div id="test_btn" style="background-color:red;width:100px;height:100px;cursor:pointer;" onclick="callVC();">Test</div>
    </body>
    </html>
    in VC++:
    VC++ code can call JS functions by CWebPage class, I found it here:  http://www.codeproject.com/Articles/2352/JavaScript-call-from-C
    in my VC project, webPage.CallJScript(_T("FuncMain")) succeeded!
    webPage.CallJScript(_T("page_test2.showAlert") failed,  the GetIDsOfNames() return DISP_E_UNKNOWNNAME. BTW, webPage.CallJScript(_T("showAlert")
    also failed! Same error.
    any help?
    Best Regards!

    Thanks for your reply Viorel_.
    i know i can define a function in the main page: 
    function showAlert_Main(x)
            document.frames('page_test2').showAlert(x);
    then, webPage.CallJScript(_T("showAlert_Main"))
    succeeds.
    but this function is just an empty shell doing nothing, and i know there must have a way to call showAlert(x) directly.

  • How can I include a parsys inside a javascript function.

    I am using radio button provided by CQ5.4.
    I am writing a javascript function which checks whether a radio button is being clicked or not..
    If the radio button is being clicked an alert window is opening ..this means that function is being called when radio button is being clicked.
    but when I try to include parsys instead of alert window, when the radio button is being clicked..the parsys is not appearing..
    Can u please help me that how should i write the "<cq:include>" for parsys inside the javascript function so that it starts appearing on click of the radio button.
    THANKS
    ASHWANI

    Ashwani,
    I would recommend detecting the WCMMode and always showing the parsys if the page is displaying in edit or design mode:
    http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/wcm/api/WCMMode.html
    Unless there is a really good reason to hide the section from authors, it's generally confusing to authors to hide a section.  Additionally, hiding a parsys in JavaScript can cause strange artifacts as the drag and drop section of the parsys won't be hidden with the content of the parsys.
    -Dan

Maybe you are looking for

  • Trying to setup systemd user instance

    Hi guys! For the past few days I have been trying to setup systemd to run a user instance (user is 'hans'). Sadly, I have been unable to find a lot of detail in doing this, so much of my work has been trial and error. Just recently I learned about th

  • How to call an applet from a first applet

    Hi, I need to call an applet from a first applet, but I want that the called applet doesn't execute in the same AppletContext than the first one, is it possible? If it is, what is the solution? Thanks

  • Problems with transaction F110

    proposal of automaticos payments I need to make modifications to layout of the banks the proposal of automatic payments to generate flat files  and to send them by electronic bank, i find on the basis of MT100 with  the exits of user for MT100, but i

  • Rampradeep

    hi this is pradeep can anyone pls send me the whole transaction codes of sap bw i have some doubts in transaction codes. through ur answer i can know the transaction codes

  • SQL Server Agent; no permission to process the object

    Hi All, I've been having trouble getting my SQL Server Agent Jobs working. It's throwing the following error: Executed as user: NT Service\SQLSERVERAGENT. Microsoft.AnalysisServices.Xmla.XmlaException: Either the 'NT Service\SQLSERVERAGENT' user does