How I can get Image Path from the Gallery Browser of Image Gallery

Last post 12-26-2013, 10:56 PM by Jeff. 3 replies.
Sort Posts: Previous Next
  •  12-18-2013, 2:19 AM 78629

    How I can get Image Path from the Gallery Browser of Image Gallery

     Hi,

     

                 I am using ASP.Net Image Gallery (Classic Layout), In that gallery See the below link once.. In that Admin

     

    Console link is there on top left. After you clicked that link displaying list of existing images in the gallery and we can

     

    able to upload new images also, Now my requirement is that when I double clicked on any one image in those

     

    list, then the window will be closed and I want to get the image path of which image I clicked. 

     

    How can I achieve this.

     

    Please Give Quick reply.. 

       

     

    http://cutesoft.net/ASP.NET+Image+Gallery/Classic-Layout.aspx 


    Regards,
    Narendra
  •  12-18-2013, 9:31 AM 78634 in reply to 78629

    Re: How I can get Image Path from the Gallery Browser of Image Gallery

    Hi narendrababu,

     

    Please open file "\CuteSoft_Client\Gallery\Editor\Explorer\Code.js"

     

    Find section below

     

    1. div.ondblclick=ToDelegate(scope,function()  
    2.         {  
    3.             browser.ShowViewer(photo);  
    4.         });  
     

    Change it to the code below, then double click on the image will hide the admin dialog. Also, you can get the image path by photo.Url.

     

    1. div.ondblclick = function ()  
    2.         {  
    3.             //get photo url by photo.Url  
    4.             //alert(photo.Url);  
    5.             closebtn.click();  
    6.         }  
     

    Regards,

     

    Ken 

  •  12-26-2013, 2:52 AM 78663 in reply to 78634

    Re: How I can get Image Path from the Gallery Browser of Image Gallery

    Hi,

     

                      I am getting image path from the gallery. But I don't want total path I want some part only in that.

     

    For example I am getting path as   'demo1/UploadedImages/Container1/imagename.jpg'.  But I want to remove 'demo1/' part from that 

     

    and I want to separate 'imagename.jpg' from the gotten URL. So finally I want  'UploadedImages/Container1/' from the URL.

    How can I achieve this..

     

    Please try to give quick reply... 


    Regards,
    Narendra
  •  12-26-2013, 10:56 PM 78665 in reply to 78663

    Re: How I can get Image Path from the Gallery Browser of Image Gallery

    Dear narendrababu,

     

    This is js code

    you need to define a global variable for the virtual application path in asp.net page

    For example:

    var _siteroot = '<%= YOUR CODE TO GET SITE ROOT PATH%>';  // not contains '/'

     

    then, deal with photo path

     

    var url  = Photo.Url;

    var arr  = url.split("/");

    //Remove Photo Name

    arr.splice(arr.length-1,1);

    //Remove site root

    if(_siteroot && arr[0].toLowerCase() == _siteroot.toLowerCase())

          arr.splice(0,1);

    var result = arr.join("/"); 

     

    Regards,

    Jeff 

View as RSS news feed in XML