Errors calling webservice of SAP from javascript

Hi Friends,
When i call a webservice from javascript using the XMLHttpRequest,i get a
crediantals error,I alos pass the login details
var oReq = new XMLHttpRequest();
oReq.open("GET", url, async, loginname, password);
   oReq.send();
any help please.
regards
kaushik

Providing HTTP Basic Auth username and password as part of the URL is a common practice, however it is discouraged for security reasons. If possible, try to avoid it.
Also, it may not work because your friendly browser developer might already took care of this. In the address bar, MS disallowed (by default) this usage three years ago, Firefox does warn (and prompt) the user. I haven't tried für AJAX, though - it might work, but it might break in the future.
Assuming you are calling the service from the host you came from, is the page delivering the JavaScript password-free, but the service needs a password?
:Frederic:

Similar Messages

  • Calling webservice in SAP XI from Servlet

    I have requirment of Calling webservice in SAP XI from Servlet.
    COuld you provide information of caling simple webservice from servlet

    Hello Venkat,
    Getting Started with Web Services
    Web Services Infrastructure
    Getting Started with Web Services [original link is broken]
    Thanks,
    Satya

  • How to call a bean method from javascript event

    Hi,
    I could not find material on how to call a bean method from javascript, any help would be appreciated.
    Ralph

    Hi,
    Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
    Cheers,
    Ralph

  • What is the best way to call a pageflow action from JavaScript?

    What is the best way to call a pageflow action from JavaScript?
    Thanks,
    John

    John,
    How would I do this from a grid??? Unfortunately there are no JavaScript attributes
    on any of the grid tags that I can see.
    Thanks,
    John
    "John H" <[email protected]> wrote:
    >
    Thanks John!
    "John Rohrlich" <[email protected]> wrote:
    John,
    If you want to put up a confirm dialog before calling an action from
    an
    anchor it is done as follows.
    Here is an example from code of mine that deletes a customer order,if
    the
    user confirms the delete. I pass the order id as a parameter.
    - john
    Here is the JavaScript -
    function confirmDelete() {
    if(confirm('Continue with order delete?'))
    return true;
    else
    return false;
    Here is a sample anchor tag -
    <netui:anchor action="requestToDeleteOrder" onClick="return
    confirmDelete(); return false;">
    Delete
    <netui:parameter name="orderId" value="{container.item.orderId}"/>
    </netui:anchor>
    "John H" <[email protected]> wrote in message
    news:402138f5$[email protected]..
    Thanks for the replies. I figured it was going to require buildingmy own
    url
    to call the action. I had hoped there was an easier way to do it.Rich,
    the
    reason I want to do this is because I want to call the JavaScript
    function
    confirm()
    when a user clicks on a link (in a repeater/grid) to drop a record,I only
    want
    to call the drop action if the user confirms the drop. Maybe thereis a
    better
    way to do what I am trying to do??? I really appreciate any help
    you
    guys
    can
    give me on this, I am pretty new to this sort of stuff.
    Thanks,
    John
    "Rich Kucera" <[email protected]> wrote:
    "John H" <[email protected]> wrote:
    What is the best way to call a pageflow action from JavaScript?
    Thanks,
    JohnTry figuring out the URL to the pageflow action, create a hidden
    form
    in the
    page, then use JS to submit the form. Why would you want to though,
    isn't
    the server going to want to send you to the next page?

  • How to call jpf controller method from javascript

    Can any one help me how to call pageflow controller method from JavaScript.\
    Thanks.

    Accessing a particular pageflow method from Javascript is directly not possible unless we do some real funky coding in specifying document.myForm.action = xyz...Heres what I tried and it did not work as expected: I found another workaround that I will share with you.
    1. In my jsp file when I click a button a call a JavaScript that calls the method that I want in pageflow like this: My method got invoked BUT when that method forwards the jsp, it lost the portal context. I saw my returned jsp only on the browser instead of seeing it inside the portlet on the page of a portal. I just see contents of jsp on full browser screen. I checked the url. This does make the sense. I do not see the url where I will have like test1.portal?_pageLabe=xxx&portlet details etc etc. So this bottom approach will notwork.
    document.getElementById("batchForm").action = "/portlets/com/hid/iod/Batches/holdBatch"; // here if you give like test1.portal/pagelable value like complete url...it may work...but not suggested/recommended....
    document.getElementById("batchForm").submit;
    2. I achieved my requirement using a hidden variable inside my netui:form tag in the jsp. Say for example, I have 3 buttons and all of them should call their own action methods like create, update, delete on pageflow side. But I want these to be called through javascript say for example to do some validation. (I have diff usecase though). So I created a hidden field like ACTION_NAME. I have 3 javascript functions create(), update() etc. These javascripts are called onclick() for these buttons. In thse functions first I set unique value to this hiddent field appropriately. Then submit the form. Note that all 3 buttons now go to same common action in the JPF. The code is like this.
    document.getElementById("ACTION_NAME").value = "UPDATE";
    document.getElementById("batchForm").submit.
    Inside the pageflow common method, I retriev this hidden field value and based on its value, I call one of the above 3 methods in pageflow. This works for me. There may be better solution.
    3. Another usecase that I want to share and may be help others also. Most of the time very common usecase is, when we select a item in a drop bos or netui:select, we want to invoke the pageflow action. Say we have 2 dropdown boxes with States and Cities. Anytime States select box is changed, it should go back to server and get new list of Cities for that state. (We can get both states and cities and do all string tokenizer on jsp itself. But inreality as per business needs, we do have to go to server to get dynamic values. Here is the code snippet that I use and it works for all my select boxes onChange event.
    This entire lines of code should do what we want.
    <netui:anchor action="selectArticleChanged" formSubmit="true" tagId="selectPropertyAction"/>                    
    <netui:select onChange="document.getElementById(lookupIdByTagId('selectPropertyAction',this )).onclick();" dataSource="pageFlow.selectedArticleId" >
    <c:forEach items="${requestScope.ALL_ARTICLE}" var="eachArticle">
    <%-- workshop:varType="com.hid.iod.forms.IoDProfileArticleRelForm" --%>
    <netui:selectOption value="${eachArticle.articleIdAsString}">${eachArticle.articleItemName}</netui:selectOption>
    </c:forEach>               
    </netui:select>
    See if you can build along those above lines of code. Any other simpler approches are highly welcome.
    Thanks
    Ravi Jegga

  • 403 Forbidden error calling PL/SQL Procedure from URL

    I am getting a 403 Forbidden browser error when calling a PL/SQL procedure from the URL, as in this:
    http://<server.port>/apex/SCHEMA.procedure_name/f?p_param1=394&p_param2=2, etc
    We are upgrading from HTMLDB 2.0 to APEX 4.0.2. I do not believe the upgrade has anything to do with it, c/o the upgraded app works fine in another APE 4.0.2 environment.
    The upgrade is to new machines, new DB and new app server, Oracle Web Tier, Oracle HTTP server deployment.
    The dads.conf entries are fine, all standard:
    Alias /i/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/images/"
    Alias /c/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/custom_htmldb/"
    <Location /pls/apexd>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString dbserver.us.com:1521:SERVER.US.COM ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDefaultPage apex
    PlsqlDatabasePassword apexpwd
    PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
    Allow from all
    </Location>
    The GRANT EXECUTE ON procedure TO PUBLIC is there.
    A call to the same procedure via a process in an APEX page works fine - the procedure is OK.
    The call from javascript, which sets up the call from the URL, is the one that fails with the 403 Forbidden error.
    The same app works fine in another APEX 4.0.2 environment, so I know it is not the JS; It has to be some configuration setting in this environment.
    I do NOT have access to the app server.
    I have asked that they compare the httpd.conf, and all underlying conf files, to check for differences.
    In order for me to be more specific, and hopefully speed up the troubleshooting process, can anyone suggest what other settings to look at?
    Thank you - Karen

    Hello,
    Good catch, but the difference in URL is in fact the difference in my env to theirs. My typo in not correcting my example to match the dads.conf entry of /pls/apexd. My env uses /apex/. Just saves on my typing.
    As an update, I asked the DBA to double-check, and yes, the www_flow_epg_include_mod_local function IS there.
    www_flow_epg_include_mod_local is an APEX function.
    So now we are trying adding procedures to it. I'll let you know if it works.
    My previous question remains - why would I need to do this in one env, and not another,
    given that the DB GRANTs are there.
    Is there a particular app server setting that wil block execution of PL/SL procedures from the URL?
    My guess is, there is some difference in configuration settings for the app server, somewhere in the httpd.conf chain.
    Since I do not have access to those files, I cannot do a diff myself, as I would have if I the issue was on my machine.
    I am in a situation where I can suggest what to do, but that's it. I agree, it's hard to troubleshoot in this situation.
    I am being asked "what setting do I need to change?" without the benefit of access to what is there,so I am doing the best I can, without diverting from my work for a deep-dive refresher session on httpd.conf settings.
    So, if anyone is aware of some setting that would block execution of a PL/SQL proc from the URL, please let me know,
    and of course, if adding a proc to www_flow_epg_include_mod_local works, I'll be happy. Just still curious.
    Thank you - K

  • Cannot call CS SDK function from javascript

    Hi!
    I'm trying it in Illustrator. I'm trying to call the actionscript code from ExtendScript.
    I read this two articles: http://forums.adobe.com/thread/634947?tstart=0 and http://cookbooks.adobe.com/post_Communicating_between_JavaScript_and_the_CS_SDK_us-17383.h tml
    They all propose the same technique, like var jsxInterface:HostObject = HostObject.getRoot( HostObject.extensions[ 0 ] )
    I'm using the external script (not an embedded one) I added my script to manifest file:
    <ScriptPath>./script.jsx</ScriptPath>
    And then trying to call jsxInterface.init( this ) which is defined in my jsx file. But with no luck. I just got an exception.
    It seems like  jsxInterface.init is not defined after all (of course, I defined it in .jsx file)
    Is there a way to call a CS SDK function from external ExtendScript script in Illustrator? Or a way to pass "this" object
    to javascript for a later access?
    Thank you!

    Hi Anastasiy,
    Weird!
    It looks like it does not work during a creationComplete event.
    If you change your code to intitialize in a function, and call that function outside the creationComplete event, it works fine. Like so:
    ExtendScript:
    function initializeJSX(){
      try
        alert('SUCCESS! foregroundColor object = '+app.foregroundColor);  } catch(e)
        alert('ERROR: '+e.description);
    MXML:
    <?xml version="1.0" encoding="utf-8"?>
    <csxs:CSXSWindowedApplication
        xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:csxs="com.adobe.csxs.core.*"
        layout="absolute" historyManagementEnabled="false"
        creationComplete="initApplication(event)">
        <mx:Script>
            <![CDATA[
                [  Embed (source=  "../assets/test.jsx" , mimeType=  "application/octet-stream" )]
                private static var _testJSX:Class;
                [Bindable]
                private var hostName:String = HostObject.mainExtension;
                private var jsxManager: HostObject;
                private function initApplication( e: Event ):void
                    jsxManager = HostObject.getRoot(HostObject['extensions'][0]);
                    jsxManager.eval( new _testJSX().toString() );
            ]]>
        </mx:Script>
        <mx:VBox height="100%" width="100%" verticalAlign="middle" horizontalAlign="center">
            <mx:Button label="Run PS code" click="jsxManager.initializeJSX()" enabled="{hostName.indexOf('photoshop') > -1}"/>
        </mx:VBox>
    </csxs:CSXSWindowedApplication>
    I presume you can get what you what by calling the function via a timer or some other event...
    Harbs

  • Problem in calling webservice using https from livecycle designer

    I  want to call a webservice written in .net(c#) using https  from livecycle  designer.I can call webservice using http ,but when i try with https it is  failing.If there any special configuration have to do in server for this ?I have  already put crossdomain in server.
    Waiting  for your reply
    thank's

    How did you call from LC? Please help me out either one is fine to me http or https
    Srujan

  • Howto call a Javabean function from javascript

    Hi,
    I want to fill some properties from an object which can be chosen from a selection box. When an object is chosen, I want to fill the propertie fields of the chosen object. How can I do this? Can I call from a 'onChange' a javabean function? or do I have to call a javascript function which calls a javabean function?
    Thanks in advance..
    Hugo Hendriks

    Actually, in a way you can call a bean method from a javascript function. But it's not really the bean method that is called for but the value it should have returned at the server side.
    Take a look at this example:
    <%@ page language="java"
    %>
    // list is a Vector containing a collection of "set & get-beans" retrieved through a db query
    <jsp:useBean id="list" class="java.util.Vector" scope="request" />
    <%
    Iterator itr = list.iterator();
    MyBean mb = new MyBean();
    %>
    <head>
    <script>
    var limit = <%=list.size()%>;
    function fillTextArea(theButton){
    for(a=0;a<limit;a++){
    <%
    while(itr.hasNext()){
    mb = (MyBean)itr.next();
    %>
    if(this.name=="bt1")
    document.theForm.ta.value += "<%=mb.getValue1()%>";
    else
    document.theForm.ta.value += "<%=mb.getValue2()%>";
    <%
    %>
    </script>
    </head>
    <body>
    <form name="theForm">
    <textarea name="ta" cols="50" rows="20"></textarea>
    <br>
    <br>
    <input type="button" name="bt1" value="click me" onclick="javascript:fillTextArea(this)">
    <input type="button" name="bt2" value="...or me" onclick="javascript:fillTextArea(this)">
    </form>
    </body>
    </html>
    The result of this will be a javascript function containing code for each element in the vector but that will be accessable in the client side.
    Of course this could render in large jsp pages being returned if the list vector is large, but sometimes this could be preferred against making a new servlet request each time.
    /Rickard

  • Error Calling ODI Data Service from BPEL

    Hi all,
    I'm trying to call ODI data services from BPEL, but this error comes up:
    <messages>
    -<input>
    -<Invoke_1_addSrcCustomer_InputVariable_1>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="part1">
    <SrcCustomer xmlns="test/WSSrcCustomer/schema"/>
    </part>
    </Invoke_1_addSrcCustomer_InputVariable_1>
    </input>
    -<fault>
    -<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="summary">
    <summary>[email protected]6 : Could not find binding output for operation addSrcCustomer
    </summary>
    </part>
    </bindingFault>
    </fault>
    </messages>
    A WSSrcCustomer WSDL has been successfully deployed and the addSrcCustomer operation is chosen. Also, I'm using the following input as XML flagment:
    <ns2:SrcCustomer xmlns:ns2="http://www.w3.org/2001/XMLSchema/" xmlns="test/WSSrcCustomer/schema/">
    <CUSTID>999</CUSTID>
    <TITLE>0</TITLE>
    <LAST_NAME>lastname</LAST_NAME>
    <FIRST_NAME>firstname</FIRST_NAME>
    <ADDRESS>myaddress</ADDRESS>
    <CITY_ID>23</CITY_ID>
    <PHONE>123456789</PHONE>
    <AGE>33</AGE>
    <SALES_PERS_ID>11</SALES_PERS_ID>
    </ns2:SrcCustomer>
    Regards

    Hello,
    Can you call the same WS from ODI (through a data server test)?
    I think you should post the WSDL file generated by the data service to the BPEL Forum.
    There must be something BPEL does not like in the WSDL.
    -FX

  • Calling custom CF tag from javascript

    Could someone please help me by posting some psuedo code to
    call a custome cf tag from javascript? I am feeling pretty dumb but
    can't figure it out...
    Thanks bunches!
    Va.

    > ... call a custome cf tag from javascript...
    > ...Press button, call tag to export to excel ...
    Doing it with Javascript defeats the purpose of a custom tag.
    A custom tag is your own custom Coldfusion tag, hence to be used as
    a tag in a cfm or cfc page. I would instead have Javascript
    open the cfm page directly, thus
    <html>
    <head>
    <title>Opening excel page with
    Javascript</title>
    <script type="text/javascript">
    function openIt () {
    window.open("excelExport.cfm","_blank","height=300,width=500,status=yes,menubar=yes,resiz able=yes,scrollbars=yes");
    </script>
    </head>
    <body>
    <FORM>
    <BUTTON name="btn" onclick="openIt();">open
    it</BUTTON>
    </FORM>
    </body>
    </html>
    excelExport.cfm
    ================
    <cfheader name="Content-Disposition" value="attachment;
    filename=testPage.xls">
    <cfcontent type="application/vnd.msexcel"
    file="C:\CFusionMX7\wwwroot\testPage.xls">
    Here follows code that does it the custom tag way. You will
    get the feel of redundancy immediately.

  • Error while calling webservice(in XI) from XML spy

    Hi,
    We have created the webservice in XI and generated/exported WSDL file.
    We have imported WSDL file to XML Spy and tried to send the SOAP Request, but we are facing the following error:
    <?xml version="1.0"?>
    <!-- see the documentation -->
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
         <SOAP:Body>
              <SOAP:Fault>
                   <faultcode>SOAP:Server</faultcode>
                   <faultstring>Server Error</faultstring>
                   <detail>
                        <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                             <context>XIAdapter</context>
                             <code>RecoverableException</code>
                             <text><![CDATA[
    com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:CO_TXT_OUTBINDING_NOT_FOUND:
         at com.sap.aii.af.mp.soap.ejb.XISOAPAdapterBean.process(XISOAPAdapterBean.java:855)
         at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl3.process(ModuleLocalLocalObjectImpl3.java:103)
         at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:261)
         at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0.process(ModuleProcessorLocalLocalObjectImpl0.java:103)
         at com.sap.aii.af.mp.soap.web.MessageServlet.callModuleProcessor(MessageServlet.java:159)
         at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:383)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
              ]]></text>
                        </s:SystemError>
                   </detail>
              </SOAP:Fault>
         </SOAP:Body>
    </SOAP:Envelope>
    Please provide the precious inputs.
    Thanks,
    Ramesh

    Hi,
    Did the request reach XI? If yes,
    What is the status of the Sender SOAP adapter? Any error in MONI?
    if no message is in XI, then check if the user id has the role of SAP_XI_APPL_USER.
    Regards
    Bhavesh

  • Calling SAP from javascript code

    hi
    I have come across a piece of  JS code where  an SAP tcode is called. the code is something like this
    [https://weblogs.sdn.sap.com/weblogs/images/251875500/code.JPG]
    I have read about the  JS function  activex object in the net. the parameters to this function are library.object and servername . In the above example we are not passing the servername. As for the library and object we are passing SAP.functions
    I want to know where the library SAP is stored and all the objects available in the library.
    thanks
    sankar
    Edited by: sankara rao bhatta on May 29, 2008 9:35 AM
    Edited by: sankara rao bhatta on May 29, 2008 9:36 AM
    Edited by: sankara rao bhatta on May 29, 2008 9:37 AM
    Edited by: sankara rao bhatta on May 29, 2008 10:03 AM
    Edited by: sankara rao bhatta on May 29, 2008 10:08 AM

    DDIC objects are store in table tadir and program name are stored in trdir.
    In your codes you are calling transaction va02 for change salesorder. All depends what rights your login id have.

  • Error Calling Oracle Stored Procedure From Within Report

    Hi,
    I have a report that calls an oracle stored procedure which returns a ref cursor. The report is working ok in our development environment when called from our development website through .NET.
    When the report is moved and accessed from our UAT website we get the following error :-
    Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for Oracle Description: One or more errors occurred during processing of command. Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for Oracle Description: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'RHS_GET_CAND_SECTION_REFS' ORA-06550: line 1, column 7: PL/SQL: Statement ignored Native Error: Failed to open a rowset. Error in File C:\WINDOWS\TEMP\temp_d663a952-bef6-4bf7-bf1a-5e288afdb612 {9B6DFB38-A436-4940-9D80-B4C23DFFFF19}.rpt: Failed to open a rowset.
    If we open the report manually we are prompted to enter database connection info. If we enter the UAT connection details the report runs ok. If we save the report and try to open it from UAT website through .NET it now opens ok.
    If we then move that same report back to the development environment and open from our development website it fails with the same error above.
    Both connections are using Microsoft OLE DB drivers and the Oracle databases are the same version (10.2.0.1.0).
    Is the connection information being stored in actual report and somehow being used when the report is opened through .NET?
    Any help appreciated
    Regards
    Paul

    Hi,
    Please let me know if the issue occurs with the crystal reports designer, if you are facing issues with the .NET application then a need to create a post [here|SAP Crystal Reports, version for Visual Studio;.
    Regards,
    Hitesh

  • How to call a codebehind function from javascript

    Hi, i need some help calling a function in my .ascx.cs of a visualwebpart for SP2013 from JS.
    The idea is to execute a function when a datepicker date is selected
    <script type="text/javascript" src="../_layouts/15/jQuery/jquery.min.js"></script>
    <script type="text/javascript" src="../_layouts/15/jQuery/bootstrap.min.js"></script>
    <script type="text/javascript" src="../_layouts/15/jQuery/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript">
    $(function () {
    $('#datetimepicker4').datetimepicker()
    .on('changeDate', function callWebMethod() {
    $.ajax({
    type: "POST",
    url: "Visualizador.ascx/Testing",
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function (data) {
    alert("OK");
    error: function (jqXHR, textStatus, errorThrown) {
    alert("Error");
    </script>
    The problem is that it always return the "Error" alert.
    The functions name is "Testing" (in Visualizador.ascx.cs), the project name is "BuscadorCumple" and the VisualWebPart is "Visualizador"
    I´ve tried with the PageMethods but i can´t add a ScriptManager because the MasterPage of the site has already one, and only one ScriptManager is allowed. So if i could set the EnablePageMethods to true it would be great (to use the PageMethods), or just
    try to fix the js function from above.
    THANKS IN ADVANCE
    ------------------------------------------------Update----------------------------------------------
    Here is the method i´m using to test it, inside Visualizador.ascx.cs
    [WebMethod]
    public static void Testing()
    Response.Write("<script>alert('HW')</script>");

    Methiod should be like this
    [WebMethod]
      public static
    string GetData()
        string str="hi";   
    return str;
    Calling is like this
    $.ajax({
    type: "POST",
    url: "PageName.aspx/MethodName(GetData)",
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(msg) {
    // Do something.

Maybe you are looking for

  • How to include AME Approvals on HRMS Enter and Maintain

    Hi, We're on 12.1.3 and have received a request to include approvals in the "Enter and Maintain" form of HRMS Manager responsibility. I've checked on the User Function "Combined Person & Assignment Form WF="GLB HRMS TSKFLW" and I can see the workflow

  • SUBMIT keyword along with one input parameter

    Hi actually i have two programs A and B. i am calling B using SUMBIT, from program A. but for B program there is one input parameter, what i need is, B program should execute with SUBMIT as well as input field. thanks in advance vEnu

  • How do I create brick graph in Excel?

    Marcie

  • ANN: Setting up PHP in Mac OS X Leopard - tutorial

    The Mac PHP package created by Marc Liyanage that I recommend in my books is not yet compatible with Mac OS X 10.5 (Leopard). The new version of Mac OS X comes with Apache 2.2.6 and PHP 5.2.4 preinstalled, but not enabled. Getting them up and running

  • How to open Excel FIles

    I am a novice When I open excel file  I found some problems. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; usi