1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Bangalore
    Posts
    95
    Vote Rating
    1
    Rameshlamani is on a distinguished road

      0  

    Default How to show alert message if pdf file not found in server?

    How to show alert message if pdf file not found in server?


    i have done application using Extjs, here requirement is need to download file from server also need to showcase loadmask untill file is completely download. Here i am generating dynamic pdf url by appending name to server base URL. some time in server don't have pdf file for particular url(name) may be they will add or delete the pdf files for some names, but i am assigning generated pdf url based on selected name to ifrmae as a source path. if the pdf is not found in server that time iframe is shows a page, like 404 server not found etc... instead of this one i need to showcase alert message pdf file is not available for this particular name. Can anybody tell me How to achieve this one? great appreciated. Thank you.


    Here is my code:


    Code:
    getPdfDataIniFrame: function(vesselName){
                var strVesselName=vesselName;
                vesselSpecificationName=strVesselName.replace(" ","_");
                speficationUrl="http://BaseUrl/"+vesselSpecificationName+".pdf"  
        Ext.getCmp('pnlPdf').update('<iframe id="iframeId" width="100%" height="85%" frameborder="0" scrolling="no" src="'+speficationUrl+'"></iframe>')
        }

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,769
    Vote Rating
    164
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    If you request the PDF using an Ext.Ajax.request() you can pass a callback to the request. The callback gets three params passed to it - the second being whether the response passed back to the request was true or false. So, in your response you pass back success: false in your JSON response and if false show an alert or Ext.Msg.alert() with your alerting message.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

    C
    heck out all of the 2013 SenchaCon presentations here:
    http://www.sencha.com/blog/senchacon...now-available/

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar