To know the Status code of a HTML page using Javascript

To know the Status code of a HTML page using Javascript

Hello,
I am not sure to understand, which status are you talking about? The HTTP Status?
If your javscript is executed it is more or less sure that the HTTP Status is 200 since the request is back to the browser.
or are you talking about this is in the context of a XMLHTTPRequest call ?
Regards
Tugdual Grall

Similar Messages

  • How to get the source code of an HTML page in Text file Through J2EE

    How to get the source code of an HTML page in Text file Through J2EE?

    Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
    - Saish

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • How do I see the source code of a html page?

    In previous versions it was possible to read the source code on a html page from "view" menu. It is not longer there. How do I read code now?

    You're welcome

  • ABAP WD, Read the source code of a html page

    Hi all,
    I have the URL link of .jsp page and I want to get the source code generated by this page to extract some data for my web dynpro.
    How do i solve this?
    Thanks

    Hi Antonio,
    not sure if i understand the question properly.
    You want to read html content of http site rendered via jsp.
    You can use cl_http_client
    to write a simple http client tool.
    This tool opens the page.  The html content is available to this class.
    You can extract the content here.
    See the attribute 'response' after making a call.
    regards
    Phil.

  • Can I make an Imageboard in a HTML page (using JavaScript)?

    Hello all.
    Just like to say that this is my first post on the Adobe forums!
    Anyways, I've started a website project in Dreamweaver CS6 (full version) and will probably be using Photoshop (CS6) for some parts of the site too. It's gonna be pretty basic but I want to make an imageboard (with JavaScript? I'm not sure...) where users who have logged in can post an image on the feed with a comment/caption to go with it.
    How can I do this? Can anyone point me to a good tutorial on how to make this? Do I do it with JavaScript on the HTML page? (P.S. I am mildly experienced with HTML).
    Thanks in advance!

    Unfortunately, there isn't anything in DW that can do this type of thing for you, although if you were to learn php and mySQL you definitely could use DW to create a site with those types of features.
    There's actually quite a bit that goes into that kind of thing, more than just basic code, you need to think about security especially if you plan to allow someone to upload files, potentially infected with viruses, to your server.
    If you're talking about creating a basic forum (being able to start topics, post pics and comments), there are a lot of free and paid solutions available online. Certain hosting companies even give you basic forums you can add to your site by following the instructions on their pages.
    Unless you have a lot of time on your hands to learn all the ins and outs of PHP and the security necessary to keep your site and server safe, I'd suggest going that route.

  • How to Write source code of a html page to a File

    Using this code i could find the source code of a html page from a web server
    import java.io.*;
    import java.net.*;
    public class SourceViewer{
    public static void main (String[] args) throws IOException{
    System.out.print("Enter url of local for viewing html source code: ");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String url = br.readLine();
    try{
    URL u = new URL(url);
    HttpURLConnection uc = (HttpURLConnection) u.openConnection();
    int code = uc.getResponseCode();
    String response = uc.getResponseMessage();
    System.out.println("HTTP/1.x " + code + " " + response);
    for(int j = 1; ; j++){
    String header = uc.getHeaderField(j);
    String key = uc.getHeaderFieldKey(j);
    if(header == null || key == null)
    break;
    System.out.println(uc.getHeaderFieldKey(j) + ": " + header);
    InputStream in = new BufferedInputStream(uc.getInputStream());
    Reader r = new InputStreamReader(in);
    int c;
    while((c = r.read()) != -1){
    System.out.print((char)c);
    catch(MalformedURLException ex){
    System.err.println(url + " is not a valid URL.");
    catch(IOException ie){
    System.out.println("Input/Output Error: " + ie.getMessage());
    Iam not much a expert in java .. i could find some commands to write to a file but i dont know where to use those codes , some body please give me some idea ..
    thanking you ..

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • Dear Guru's Please let me know the T.code's for the fallowing

    Dear Guru's,
    Please let me know the transation codes to see
    List of Open sales orders based on the delivery block (other than VA05)
    List of invoices not yet realesed to account.
    List of Invoices which are not cleared(for which f-32 not happend)
    List of deliveries for which PGI happed not invoiced.
    Regards,
    Madhu
    Highly rewarded

    Dear Madhu,
    List of Open sales orders based on the delivery block (other than VA05) - VA14L
    List of invoices not yet realesed to account. - VFX3
    List of Invoices which are not cleared(for which f-32 not happend) - FBL5N (Billing Type - BL against which Collection Doc. DZ is not found)
    List of deliveries for which PGI happed not invoiced. - VF04 (not sure, as this is billing due list; and it may contain delivery doc. w/o PGI. Just check)
    Please check with VL06F. Here, under Tab: Status: Outb. Delivs, there is field: Billing status
    Maintain entry in to this field as "A - Not yet Processed"
    Best Regards,
    Amit

  • Sys.webforms.page request manager server error exception:An unknown error occured while processing the request on server. The status code returned from the server was:0

    sys.webforms.page request manager server error exception:An unknown error occured while processing the request on server. The status code returned from the server was:0 We got this response(In firebug console) when we try to click on link (after leave webpage for 3 minuts ideal) which is AJAX based. Please reply ASAP because its urgent.

    Hi SP,
    Please check if the following web config appSettins value settings from SSRS server could fix the issue (Note, back up your original web config file before any modification).
    http://stackoverflow.com/questions/10911610/ssrs-webpage-error-status-code-500
    http://srinivasbn.blogspot.in/2013/09/syswebformspagerequestmanagerservererro.html
    http://connect.microsoft.com/SQLServer/feedback/details/782155/ssrs-2012-failed-with-win32-error-0x03e3
    If you have more questions about the SSRS error logs related to this issue, you can post in the SSRS forum for a better assistance with more experts.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Sys.WebForms.PageRequestManagerServerErrorException : An unknown error occured while processing the request on the server.The status code returned from server is 12019 in report viewer

    I am not able to run Report in Report viewer due to the below error:
    Sys.WebForms.PageRequestManagerServerErrorException : An unknown error occured while processing the request on the server.The status code returned from server is 12019 in report viewer
    This report works fine in SSRS tool. but after i deployed into sharepoint 2013 site, it throws error.
    Please advise what needs to be done
    Any help is really appreciated.
    Thanks,
    SP

    Hi SP,
    Please check if the following web config appSettins value settings from SSRS server could fix the issue (Note, back up your original web config file before any modification).
    http://stackoverflow.com/questions/10911610/ssrs-webpage-error-status-code-500
    http://srinivasbn.blogspot.in/2013/09/syswebformspagerequestmanagerservererro.html
    http://connect.microsoft.com/SQLServer/feedback/details/782155/ssrs-2012-failed-with-win32-error-0x03e3
    If you have more questions about the SSRS error logs related to this issue, you can post in the SSRS forum for a better assistance with more experts.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Knowing the status of validate-item trigger?

    the 'when validate-item' trigger, when fired, does the validation part.
    but is there a way of knowing the status of the validation.
    ie. whether its
    valid
    invalid
    new
    changed.?

    Hi,Thanks for ur replies
    .I have checked the satus through tcode:stms not se01. Will there be any difference.
    Here isthe status.
    1)  Selection for Import                                     11.01.2010 12:53:41    (0) Successfully Completed
    2)  Copy File Between Transport Groups       13.01.2010 17:14:50    (0) Successfully Completed
    3)  Import                                                         14.01.2010 10:39:32    (4) Ended with Warning
    4)  Check Versions                                         14.01.2010 10:39:35    (0) Successfully Completed
    For the '3' import the detailed view is given below,
    Main import
    Transport request   : BSDK900590
    System              : BSP
    tp path             : tp
    Version and release: 372.03.35 700
    Main import
    End date and time : 20100114103932
    Ended with return code:  ===> 4 <===

  • Error: Request failed. unexpected response from server. the status code of response is '0' in safari browser

    Hi,
    I am using Javascript serializer to send server side code to javascript.
    This works in IE 9, Mozilla, chrome. But fails with error in Safari as "request failed. unexpected response from server. the status code of response is '0' . status text of the response is ". null
    My code is as below:
    <asp:UpdatePanel ID="panLayout" runat="server">
    <ContentTemplate>
    <div id="divloadingImage" >
    <br />
    <asp:Image ID="imgLoading" runat="server" ImageUrl="/images/rotate.gif" ImageAlign="Middle" />
    <br />
    </div>
    <div id="banner-fade" >
    <ul id="carousel" class="bjqs">
    </ul>
    </div>
    <asp:Timer ID="timerRSS" Interval="1" runat="server" ontick="timerRSS_Tick"></asp:Timer>
    </ContentTemplate>
    </asp:UpdatePanel>
    In CS:
    protected void timerRSS_Tick(object sender, EventArgs e)
    DisplayImages();
    divloadingImage.Visible = false;
    bannerfade.Visible = true;
    timerRSS.Enabled = false;
    private void DisplayImages()
    List<SharePointListItem> allImages = GetallImages();
    JavaScriptSerializer serializer = new JavaScriptSerializer();
    string json = serializer.Serialize(allImages);
    string script = string.Format("<script type=\"text/javascript\">var allSliderImages={0}</script>", json);
    if (!this.Page.ClientScript.IsClientScriptBlockRegistered("clientScripts"))
    ScriptManager.RegisterClientScriptBlock(panLayout, panLayout.GetType(), "clientScripts", script, false);
    string scriptRegister = string.Format("<script type=\"text/javascript\">FetchData();</script>");
    ScriptManager.RegisterClientScriptBlock(panLayout, panLayout.GetType(), "clientScriptData", scriptRegister, false);
    In Javascript:
    function FetchData() {
    if (typeof allSliderImages !== "undefined") {
    for (var i = 0; i < allSliderImages.length; i++) {
    Imagesuccess(allSliderImages[i].fileleafref, allSliderImages[i].filedirref, allSliderImages[i].caption1);
    var rota = $("#bannerfade");
    rota.css("display", "block");
    function Imagesuccess(fileLeaf, fileDir, UserCaption1) {
    var ul = $('#bannerfade > ul');
    var li;
    var filename = fileLeaf;
    var dir = fileDir;
    var caption1 = UserCaption1;
    var sfils = filename;
    filename = dir + '/' + filename;
    var imageCaptionData;
    if (caption1 != null && caption1 != "") {
    imageCaptionData = '<div class="HeadlineDiv">' + caption1 + '</div>';
    li = $('<li>' + imageCaptionData + '<div class="SubHeadline" style="color:white;">' + '<br/></div>' + '<img src="' + filename + '"/>' + '</li>');
    ul.append(li);
    $('#bannerfade').bjqs({
    height: 354,
    width: 970,
    responsive: true
    Below is the data I get:
    <script type="text/javascript">
    var allSliderImages=[{"id":"1","Title":"Scenic","caption1":"scenic","fileleafref":"02.jpg","filedirref":"/s/Test/Library"},
    {"id":"2","Title":"nature","caption1":"scenic2","fileleafref":"C034.jpg","filedirref":"/s/Test/Library"},
    {"id":"3","Title":"Tiff","caption1":"Tiff","fileleafref":"test_tiff.tif","filedirref":"/s/Test/Library"}]</script>
    The data is shown in all browsers except Safari. How to fix this?
    Update: I have checked this link: http://sharepoint.sureshc.com/2013/07/unexpected-response-data-from-server-in.html
    but that did not help.
    Thanks

    Hi,
    From
    this documentation, though SharePoint 2013 supports several commonly used web browsers including Apple Safari (latest released version), it is not guarantee
    that SharePoint 2013 can run perfectly on all these browsers, “certain web browsers could cause some SharePoint 2013 functionality to be downgraded, limited, or available only through alternative steps”.
    According to the code provided, it seems more relate to ASP.NET, therefore, a suggestion is that you can open a thread in ASP.NET forum, communities there will be more familiar
    with this issue:
    http://forums.asp.net/
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • How can we know the return code of BDC Program ?

    Hi All,
    Please tell me : How can we know the return code of BDC Program when being exceuted in Session or in Transaction mode.
    In my program, we are uploading data from Excel sheet to SAP via BDC
    The records that are not updated we want to create a log file.
    Now to know whether a record is updated ot not, wat syst field shloud be used?
    Its urgent....
    <b>Reward Point will be there ....</b>
    Thanks,
    Harish

    Hi harish,
    try the logic in this code ...
    i had attached input file in the end.
    TYPES: begin of errmess,
            msgnr type t100-msgnr,
            text type t100-text,
           end of errmess.
    TABLES : t100.
    DATA: BEGIN OF DD_VA01,
           AUART TYPE VBAK-AUART,
           KUNNR TYPE RV45A-KUNNR,
           BSTKD TYPE VBKD-BSTKD,
           MABNR TYPE RV45A-MABNR,
           KWMENG(2) type C,
           KBETR(2) type C,
          END OF DD_VA01.
    DATA:IT_VA01     Like TABLE OF DD_VA01,
         WA_VA01     Like LINE  OF IT_VA01,
         WA_VA01_F   Like LINE  OF IT_VA01,
         IT_BDCDATA  TYPE TABLE OF BDCDATA,
         WA_BDCDATA  Like Line  OF IT_BDCDATA,
         W_FNAME     TYPE STRING,
         messtab like bdcmsgcoll occurs 0 with header line,
         it_errmess type table of errmess,
         wa_errmess like line of it_errmess,
         err_message type string.
    data: zf1 type i,
          zc1 type c value '2',
          fn(20) type c.
    Main Code ************************************************************
    PERFORM get_input using 'C:\Documents and Settings\ic881592\Desktop\Daran_bdc_VA01-e.txt'.
    SORT IT_VA01 BY AUART KUNNR BSTKD.
    LOOP AT IT_VA01 INTO WA_VA01.
      if WA_VA01_F-AUART <> WA_VA01-AUART OR
         WA_VA01_F-KUNNR <> WA_VA01-KUNNR OR
         WA_VA01_F-BSTKD <> WA_VA01-BSTKD.
           PERFORM set_header_flag.
           PERFORM create_bdc_header_data.
      endif.
      PERFORM create_bdc_item_data.
    ENDLOOP.
    PERFORM call_transaction.
    PERFORM errorlog.
    Procedures ***********************************************************
    form get_input using w_fname.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME            = W_FNAME
          HAS_FIELD_SEPARATOR = '#'
        TABLES
          DATA_TAB            = IT_VA01.
    endform.
    form call_transaction.
        PERFORM bdc_field       using 'BDC_OKCODE' '/11'.
        CALL TRANSACTION 'VA01' USING IT_BDCDATA MODE 'A' messages into messtab.
        refresh it_bdcdata.
    endform.
    FORM set_header_flag.
           WA_VA01_F-AUART = WA_VA01-AUART.
           WA_VA01_F-KUNNR = WA_VA01-KUNNR.
           WA_VA01_F-BSTKD = WA_VA01-BSTKD.
           if zf1 = 1.
               PERFORM call_transaction.
           endif.
           zf1 = 1.
    endform.   "set_header_flag.
    form create_bdc_header_data.
         perform bdc_dynpro      using 'SAPMV45A' '0101'.
         perform bdc_field       using 'VBAK-AUART' WA_VA01-AUART.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         perform bdc_field       using 'KUAGV-KUNNR' WA_VA01-KUNNR.
         perform bdc_field       using 'VBKD-BSTKD' WA_VA01-BSTKD.
         perform bdc_field       using 'BDC_OKCODE' '/00'.
         perform bdc_dynpro      using 'SAPMSSY0' '0120'.
         perform bdc_field       using 'BDC_CURSOR' '04/06'.
         perform bdc_field       using 'BDC_OKCODE' '=CHOO'.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    endform. "create_bdcdata
    FORM create_bdc_item_data.
         CONCATENATE 'RV45A-KWMENG(' zc1 ')' INTO FN.
         perform bdc_field       using 'BDC_CURSOR' FN.
         perform bdc_field       using FN WA_VA01-KWMENG.
         CONCATENATE 'KOMV-KBETR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-KBETR.
         CONCATENATE 'RV45A-MABNR(' zc1 ')' INTO FN.
         perform bdc_field       using FN WA_VA01-MABNR.
         perform bdc_dynpro      using 'SAPMV45A' '4001'.
         PERFORM bdc_field       USING 'BDC_OKCODE' '=POAN'.
    ENDFORM.
    form errorlog.
      LOOP AT MESSTAB .
        if MESSTAB-MSGNR = '311' or MESSTAB-MSGTYP = 'E'.
            SELECT SINGLE msgnr text FROM T100
                            into wa_errmess
                            WHERE SPRSL = MESSTAB-MSGSPRA
                              AND ARBGB = MESSTAB-MSGID
                              AND MSGNR = MESSTAB-MSGNR.
            IF SY-SUBRC = 0.
              err_message = wa_errmess-TEXT.
              IF err_message CS '&1'.
                REPLACE '&1' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&2' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&3' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&4' WITH MESSTAB-MSGV4 INTO err_message.
              ELSE.
                REPLACE '&' WITH MESSTAB-MSGV1 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV2 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV3 INTO err_message.
                REPLACE '&' WITH MESSTAB-MSGV4 INTO err_message.
              ENDIF.
              CONDENSE err_message.
              WRITE: / MESSTAB-MSGTYP, err_message .
            ELSE.
              WRITE: / MESSTAB.
            ENDIF.
        endif.
      ENDLOOP.
    endform. "errorlog
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      WA_BDCDATA-PROGRAM  = PROGRAM.
      WA_BDCDATA-DYNPRO   = DYNPRO.
      WA_BDCDATA-DYNBEGIN = 'X'.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO IT_BDCDATA.
      CLEAR  WA_BDCDATA.
    ENDFORM.
    input file :
    OR     2148     0001235     R-1162     8     17
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     6     25
    OR     2148     0001235     R-1162     4     12
    OR     2148     0001236     R-1162     3     12
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     1     25
    OR     2148     0001236     R-1162     7     12
    OR     2148     0001236     R-1161     8     30
    OR     2148     0001236     100-400     10     25
    OR     2148     0001235     R-1161     5     30
    OR     2148     0001235     100-400     2     25
    OR     2148     0001235     R-11621     3     12
    OR     2148     0001235     R-1161     2     30
    OR     2148     0001235     100-400     1     25
    OR     2148     0001235     R-1162     7     12
    OR     2148     0001235     R-1161     8     30
    OR     2148     0001235     100-400     10     25
    OR     2148     0001236     R-1162     8     17
    OR     2148     0001236     R-1161     2     30
    OR     2148     0001236     100-400     6     25
    OR     2148     0001236     R-1162     4     12
    OR     2148     0001236     R-1161     5     30
    OR     2148     0001236     100-400     2     25

  • SSRS Report Manager error "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"

    Hi All,
    I am getting error "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"
    in one of my Test Environment when trying to run the SSRS 2012 report from report manager.
    Any clue why it is happening.
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Hi All,
    Upon investigation found that there was no space (0 Byte is available) in E drive where underlying SQL DB is residing. 
    Once I cleared the space, report started working and above error was not displaying. 
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • An Error Occurred During Report Processing - Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12019

    When I run the report on production I got the following error message:
    Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the
    request on the server. The status code returned from the server was: 12019
    It hasn’t happen on Dev and Test before.                           
    I googled, The error is described as:
    12019 ERROR_INTERNET_INCORRECT_HANDLE_STATE
    The requested operation cannot be carried out because the
    handle supplied is not in the correct state.
    But I cannot find the solution for that. 
    Has it happend to you before? How to solve that?      

    Same behaviour here, Sharepoint 2013 with SSRS in integrated mode
    Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status
    code returned from the server was: 12019

Maybe you are looking for

  • Developing a User Interface with ADF Faces - Tutorial - Questions

    Hello everybody, I am a forms developer and I am totally new to ADF. I started from the tutorials : Developing Business Services with ADF BC and Developing a User Interface with ADF Faces... Everything was easy and very clear, as far as the material

  • How to setup and configure NI OPC Server to OMRON PLC (CJ2H model) using FINS Ethernet communication protocol?

    Hi, Could someone help me in the setup and configuration of NI OPC server to OMRON PLC (CJ2H model) using FINS Ethernet communication protocol? I already read some materials available in the web but it uses a different PLC and communication protocol.

  • OKTZ problem

    Dear all: I meet an issue about the OKTZ. As we know there has 40 items limited for the cost component structure about T_CODE:OKTZ. But,now we need 2 more cost component structures. How can we do?......

  • Where to Put the ACL

    Hi, We have a DMVPN with 2 hubs and many spokes. The traffic is tunneled to the hub\headends. I'm trying to create an access-list on one spoke router so the devices on that spoke can only reach a couple of devices via Remote Desktop at the Main Campu

  • Radware Failover issue

    Hi all, Currently i am having two radware Web Server Director Pro AS, Cookie Persistency (512 farms). While configuring VRRP through APsolute insite we got an error  while copying configuration from master to backup. Kindly suggest the solution to pr