Image download link without zip using javascript

Hi,
Actually i know this question is not related for this thread but i need technical help
i want to know how to bring the single image download link can bring for example
Download
when i click the download link the image open in a new window but i need to download the image like a zip file download
how can i done it..
Thank you.

>
Actually i know this question is not related for this threadNot related to this thread or forum, JavaScript questions belong to JavaScript forums.
Mel

Similar Messages

  • How to display Images stored in a database using javascript

    Hi.
    I have some images stored in a table and I need to display them using javascript. The images are stored in BLOB columns: I would like to know if I can put them on a directory and then get it from there using BFILENAME function.
    Any suggestion?
    Regards,
    Jeannine

    Hi All,
    Yes DuraiRaja - i am using the document.getElementById(' ').
    In my app, I have a Main controller calling a View - Default.HTM,
    This Default.HTM, in turn loads up three trays T1, T2, T3 and these tray elements in turn call up the controllers ctrl1, ctrl2, ctrl3 associated to them.
    CTRL1 calls a view - View1 - V1.htm, which has the below code.
    And on the below page all that i am trying to do is validate if "FieldVal" is blank or not.
    I get an error on IE as "Object required"
    I get a HTTP 501/505 error when i try to upload the code.
    Thanks all !

  • How to fit the images within textframe in indesign using javascript?

    Hi,
    We are using the update script for updating the values in table.
    If i am using images within textframe, the table is not fitting after updating it. Without using images the table is fitting.
    First i have dragged the table in Indesign document. Then i have altered the image size and updated the table using Update script.
    Finally i want to fit the table with the resized images.
    Note: I can get the updated values in table . but i cannot get the resized images.( Now i can get the original image after updating the table)
    Please help me if anyone has idea regarding this issue.
    Thanks,
    Vimala L

    Hi,
    Please find below the Update Script,
    var myDocument = app.activeDocument;
    var updateOption = app.scriptArgs.get("updateOption");
    main();
    function main()
    if(updateOption=="UPDATE")
      UpdateLink();
    function UpdateLink()
    myDoc = app.activeDocument;
    myLinks = myDoc.links;
    for (j = myLinks.length - 1; j >= 0; j--)
    myName = myLinks[j].filePath;
      var ext =  myName.substring(myName.length-3,myName.length) ;
    if (myLinks[j].status == LinkStatus.linkOutOfDate)
    myLinks[j].update();
    After running this script i cannot get the image in table.
    While running the Fitting script followed by Update script i am getting the Original size of the image. But i want the re-sized image in table.
    Fitting Script:
    var textFitoption= app.scriptArgs.get("textFitOption");
    var imageFitoption= app.scriptArgs.get("imageFitOption");
    var tableFitoption= app.scriptArgs.get("tableFitOption");
    main();
    function main()
      IterateDocument();
    function IterateDocument()
      for(myCounter = 0; myCounter < app.activeDocument.activeLayer.textFrames.length; myCounter++)
      myStory = app.activeDocument.activeLayer.textFrames.item(myCounter);
      FitPageItem (myStory);
    function FitPageItem (mySel)
      if(mySel.associatedXMLElement!=null)
    if (mySel.constructor.name == "TextFrame")
      if(mySel.associatedXMLElement.xmlAttributes.itemByName("IMAGE_FILE")==null)
    mySel.parentStory.clearOverrides();
      mySel.parentStory.appliedCharacterStyle = app.activeDocument.characterStyles.add()
      mySel.parentStory.appliedCharacterStyle.remove();
    //Fit all inline Items
      graphicItems = mySel.allGraphics;             // I cannot get the graphicItems.
      for(g=0;g<graphicItems.length;g++)
      if(imageFitoption=="Fit Frame To Content")
      graphicItems[g].fit(FitOptions.frameToContent);
      else if(imageFitoption=="Fit Content Proportionally")
      graphicItems[g].fit(FitOptions.proportionally);
      }//for
      }//Has image_file attr
      }//is text frame
       if(mySel.associatedXMLElement.markupTag.name=="products")
      if(IsImageEmbeddedInTable(mySel)==true)
      xmlElem = mySel.associatedXMLElement;
      mySel.placeXML(xmlElem);
      }//if products
    function IsImageEmbeddedInTable(mySel)
      for( var j = 0; j< mySel.tables.length ; j++ )
      table = mySel.tables[j];
      for( var i = 0 ; i< table.cells.length ;i++ )
      cell= table.cells[i];
      cellElement = cell.associatedXMLElement;
      if(cellElement !=null)
      if(cellElement.xmlElements!=null)
      if(cellElement.xmlElements.count()>0)
      if(cellElement.xmlElements[0].xmlAttributes.itemByName("href")!=null)
      return true;
    Thanks,
    Vimala L

  • Toggling an Image attached to an Item using Javascript

    Hi,
    Hoping someone can assist, I have the following html in the Post Element section of a page item, i.e:
    NOTE: I have had to remove angle brackets - can't seem to get the formatting right.
    td colspan="1" rowspan="1" align="top" onClick="getMAGDets();" img
    src="#WORKSPACE_IMAGES#go_arrow.gif" border="0" alt="Retrieve
    applicant details" height="14" width="14" style="cursor:hand"
    td colspan="1" rowspan="1" align="left"
    onClick="resetAppDets();" img src="#WORKSPACE_IMAGES#icon_err.gif"
    border="0" alt="Clear applicant details" style="cursor:hand"
    img src="#WORKSPACE_IMAGES#btn_nuid.png"
    onClick="toggleNUImage(this);" align="top" border="0" alt="Supply a
    Non-User ID" style="cursor:hand"
    Now I am able to toggle the bottom image as follows:
    function toggleNUImage(x)
    if (x.src = (x.src.indexOf("#WORKSPACE_IMAGES#btn_nuid.png") > -1))
       x.src = "#WORKSPACE_IMAGES#btn_hide_nuid.png";
       x.alt= "Hide Non-User ID details.";
    }My problem is, when I load the record I have just created, on the onload event, it defaults to the btn_nuid.png image, I actually would like it to default to the btn_hide_nuid.png.
    How would I go about doing this and how would I also go about actually not showing this image at all that I have attached to an item within it's post element property?
    Thanks.
    Tony.

    Hi Rana,
    FYI, it's actually part of my post element field within an item - it's not a separate button. Only way to achieve what I would like to do, is via javasript. Cannot use the conditional display section.
    Just not familiar with the syntax.
    Tony.

  • Creating a file download link on jsp

    I have the following on my jsp. The code worked fine until I tried to use it in a new html design page.
    <code>
    //page name is index.jsp
    try //DISPLAY THE CONTENTS OF THE DATA DIRECTORY
    File dirname = new File(PATH); // create an instance of the File class
    if (dirname.exists()&&dirname.isDirectory())//check to see if File class dirname exists and is valid
    String [] allfiles = dirname.list();//create an array of files in the dirname File class
              for (int i=0; i< allfiles.length; i+=2)//loop through allfiles[] and print out file links
    out.println("<br><table border='1' cellspacing='1' width='99%'>");
                   out.println("<tr><td width='50%' class='pageFont'><input type='checkbox' name='cb' value='"+allfiles[i]+"'>"+allfiles[i]+"      ");
    %>
    <a class="a" href="index.jsp?downfile=C:\\data\\<%=allfiles[i+1]%>">DOWNLOAD</a></td>
    <% if(i+1 < allfiles.length)//PRINTS OUT THE SECOND TD SO THAT WE HAVE 2 COLUMNS OF LINKS
    out.println("<td width='50%' class='pageFont'><input type='checkbox' name='cb' value='"+allfiles[i+1]+"'>"+allfiles[i+1]+"      ");
    %>
    <a class="a" href="index.jsp?downfile=C:\\data\\<%=allfiles[i+1]%>">DOWNLOAD</a></td></tr>
    <%
    out.println("</form></font></table>");
    catch (IOException excep)
         out.println("An IO exception has occured.");
    </code>
    Then when clicked this code is run:
    <code>
    try{
    //CHECK TO SEE IF THE FILE HAS BEEN CLICKED TO DOWNLOAD SINGLE FILE
    if (request.getParameter("downfile") != null)
    String filePath = request.getParameter("downfile");
    File f = new File(filePath);//CREATE AN INSTANCE OF THE FILE CLASS AND POINT IT TO THE LOCATION OF THE DIRECTORY CONTAINING THE FILES
    if (f.exists() && f.canRead())
    response.setContentType ("application/octet-stream");
    response.setHeader ("Content-Disposition", "attachment;filename=\""+f.getName()+"\"");
    response.setContentLength((int) f.length());
    BufferedInputStream fileInputStream = new BufferedInputStream(new FileInputStream(f));
    int i;
    out.clearBuffer();
    while ((i = fileInputStream.read()) != -1) out.write(i);
    fileInputStream.close();
    out.flush();
    </code>
    When I click on this link I get the download dialog box. If I open it I get the following open up in notepad(the files I am trying to give download links are .txt files)
    Below is what is displayed in notepad ALL on 1 line:
    <html>
    <head>
    <LINK rel="stylesheet" ty
    That is displayed in all of the links that I click on. It is the first few lines of html code for index.jsp.
    I know this code is probably not a good way of doing what I need but I got it to work fine until the change.
    I am sure there is an easier way to code the download link without resubmitting the page.
    Thanks in advance!!

    Well all was fine with this jsp until I moved it to ApacheJServ. Now the problem has resurfaced(although it is a little different now)
    I had moved the following code to the top of my page:
    //CHECK TO SEE IF EITHER DOWNFILE OR ZIPFILE VARIABLE EXIST, AND IF THEY DO SET CONTENT TYPE BEFORE SENDING ANY HTML CODE TO THE BROWSER
    try{
    //CHECK TO SEE IF THE FILE HAS BEEN CLICKED TO DOWNLOAD SINGLE FILE
        if (request.getParameter("downfile") != null)
                String filePath = request.getParameter("downfile");
                File f = new File(filePath);//CREATE AN INSTANCE OF THE FILE CLASS AND POINT IT TO THE LOCATION OF THE DIRECTORY CONTAINING THE FILES
                    if (f.exists() && f.canRead())
                        response.setContentType ("application/octet-stream");
                        response.setHeader ("Content-Disposition", "attachment;filename=\""+f.getName()+"\"");
                        response.setContentLength((int) f.length());
                        BufferedInputStream fileInputStream = new BufferedInputStream(new FileInputStream(f));
                        int i;
                        out.clearBuffer();
                        while ((i = fileInputStream.read()) != -1) out.write(i);
                            fileInputStream.close();
                            out.flush();
                            response.flushBuffer();
    catch (Exception e){}
    //This is where the java code ends and the javascript/html code begins.Then further into the page I create the file download links like so:
                            <a class="a" href="main.jsp?downfile=C:\\data\\<%=allfiles[i+1]%>">DOWNLOAD</a>I know this isnt a secure way of doing this but I am on a intranet.
    The problem I am having now is that when I click on one of the links and download the file and then open it, I get the contents of the file plus concatenated to the end of it is the first few HTML lines of the actual jsp that I downloaded the file from. Before I was just getting the first few lines of html from the jsp, not the actual contents of the downloaded file.
    This is an example of what I am getting:
    This is the contents of the file that I downloaded.//This is where the file contents ends.
    <html>
    <head>
    <LINK rel="stylesheet" type="text/css" href="default.css">
    <script language="JavaScript1.2">
    //function that allows user to select all checkboxes
    function doIt(v)
    for(var i=0;i<document.form1.cb.length;i++)
       document.form1.cb.checked=eval(v);
    function swap(imageName,image)
    imageName.src = "templateImages/"+image;
    function imageOver(imageSrc, imageName)
         changeImage = new Image();
         changeImage.src = imageSrc;
         document.images[imageName].src = changeImage.src;
    var hide = true;
    function hideShow( ) /
    Any morre ideas?
    TIA!
    BTW, I went to ApacheJServ because they wont let me use tomcat :(

  • LR Download Link Not Working

    I am trying to download a trial version of Lightroom, but the link button does not respond. I have tried on two different computers.
    Here's the page:
    https://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_lightroom
    I already have Creative Cloud subscription which now includes Lightroom. I have everything installed on two allowed computers. How can I get just Lightroom onto a third computer? Please tell me I don't have to purchase full product
    Okay, I found this link in another thread and it worked:
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    The link on the main download page does not work

    This thread about I E not working for the lightroom 4 download is from August of 2012.
    It's now November of 2012 and I found this thread after trying to download LR4 without success, using multiple computers with IE as the default browser.
    I just tried it with Chrome and it worked just fine.
    What the **** is going on here?
    IE is still a major browser and it appears the Adobe has completely ignored this issue.
    This is a problem with the Adobe site and there should be ramifications to Adobe for not even posting a warning on the download page so that people can at least use another browser and avoid so much troubleshooting.
    Again, this is from months ago.  You should be ashamed Adobe.  Utterly disgusting way to treat your clients.

  • My hard drive crashed and I need to reload my CS6 software.  Where can I find a download link?

    My hard drive crashed on my desktop.  I need to reload my CS6 software.  Where can I find a download link?  I use to be able to download it at work . . . I work at FedEx Office.
    Thanks,
    Audrey

    You can download the trial from the Adobe site https://www.adobe.com/products/cs6.html and activate it with your serial number.
    Alternatively you can download it directly (without any download manager) from http://prodesigntools.com/adobe-cs6-direct-download-links.html - make sure you follow the Very Important Instructions before proceeding to the download.

  • Downloading files as zip

    Hello,
    I am trying to download and zip files from SharePoint document library via a button click. I have added the button and script to get the selected document Urls. However stuck with how to zip it. Please somebody suggest me how to zip and download selected
    documents from SharePoint library through ECMA script?
    Thanks,
    Praveen Kumar Padmakaran

    Hi Praveen,
    Using SharePoint client object model (ECMA/JavaScript) I don't see it is possible to achieve what you are looking for. Only possible way is SharePoint Server Object Model (Managed Code), which I had already shared with you.
    I found while searching on the Internet where a user has posted similar question but his requirement was to download document sets as zip files. If you read the post's comments you will come to know that Microsoft Consultant has informed that client side
    API code is not available to download document sets as zip files. This also applies to documents in document libraries.
    http://sharepoint.stackexchange.com/questions/77631/download-documentset-as-zip-using-csom
    Please remember to click 'Mark as Answer'
    if the reply answers your query or 'Upvote' if it helps you.

  • Website image and zip file download links not working in Dreamweaver Air application

    Hi
    I have successfully created and AIR app for an existing business website using the Dreamweaver AIR Extension. The site works very well in all respects except for the part where we have high resolution images and zip files available for download. The download links refuse to do anything, and right-click (PC) / ctl-click (Mac) does nto work either.
    I suspect this may be an AIR sandbox/security issue but am I correct and what can I do to fix it?
    Thanks in advance for any assistance you may be able to give.
    Martin

    I am now facing the same problem. I wrote a servlet .
    code like this
             response = (HttpServletResponse) faces.getExternalContext().getResponse();
             response.setContentType("application/x-download");
             String agent = request.getHeader("USER-AGENT");
             boolean isIE=false;            
            if (null != agent && agent.indexOf("MSIE")!=-1) { 
                isIE=true;
            if (isIE) {
                fileName = URLEncoder.encode(fileName, "UTF-8");
            } else {
                fileName = new String(fileName.getBytes("utf-8"), "ISO-8859-1");
            response.setHeader("Content-Disposition","attachment;filename="+fileName);
            ServletOutputStream os = response.getOutputStream();
            byte b[]=new byte[1024];
            int n;
            while((n=in.read(b))!=-1){
                os.write(b,0,n);
           in.close();
           os.close();
    and i open a new window refer to above jsp ,also i set a breakPoint at os.close(),the program has passed through,but nothing happened in the window.
    If i use IE or FF ,the browser will open a small window to allow me select whether open or  save the file.So can anybody give me some advice.Is it because air using webkit engine and the engine does not do this kind of job?
            Thanks.

  • Download files from document library in zip file using javascript

    Hi,
    I am developing SharePoint Hosted App which needs to download all the files in the document libraries of SharePoint site in a zip folder where in that zip file each document library should be a folder, in that folder the files of that document library will
    be shown. Currently I am display all the document library in a table with check boxes as shown in the below figure. Now when user selects the check boxes and click on download button, the selected document libraries along with the files should be downloaded
    in a zip folder. This should be achieved through javascript. Can anyone share me the code to solve this problem.
    Thanks & Regards,
    Kishore
    Kishore

    You can use
    zip.js, but the best way - implement your solution on the server-side.
    [custom.development]

  • Download link for images

    What is the solution to create a download link that will
    automatically start to download to the hard disk or ask where to be
    saved (ie. Desktop, Downloads)? What I don't want to happen is to
    have the image open in a new browser window. I have .eps, .tif and
    .jpg files. Is this hard to do? I can't find any help anywhere on
    the net for this problem.

    .oO(A Dion Lainy)
    >What is the solution to create a download link that will
    automatically start to
    >download to the hard disk or ask where to be saved (ie.
    Desktop, Downloads)?
    >What I don't want to happen is to have the image open in
    a new browser window.
    >I have .eps, .tif and .jpg files. Is this hard to do? I
    can't find any help
    >anywhere on the net for this problem.
    Well, usually the preferred way is to just link to the image
    or another
    file and let the browser/user decide what do with it.
    If you still want to "force" a download, the easiest way for
    you as the
    author is to simply zip the file(s). In most cases this will
    cause a
    download dialog, but also creates another hurdle for the
    user, because
    he has to unpack the file before he can use it.
    Another way - a bit more complicated for you, but much easier
    for the
    users - would be to deliver the files with another content
    type like
    "application/octet-stream". This should also cause a download
    dialog.
    How to do that depends on the capabilities of your server. It
    can be
    done with scripting or even with just a simple AddType
    directive in an
    .htaccess file on Apache servers.
    Micha

  • Random text with links using Javascript?

    I have a very simple script I downloaded that makes text random using javascript. I would like to add a hypertext link on parts of the text, but can't seem to get it to work.
    Would anyone be so kind as to show me how this can be done. I would like to add links to the "Random text string 1.", Random text string 2. etc., within the javascript below.
    <SCRIPT LANGUAGE="Javascript"><!--
    function text() {
    text = new text();
    number = 0;
    // textArray
    text[number++] = "Random text string 1."
    text[number++] = "Random text string 2."
    text[number++] = "Random text string 3."
    text[number++] = "Random text string 4."
    text[number++] = "Random text string 5."
    // keep adding items here...
    increment = Math.floor(Math.random() * number);
    document.write(text[increment]);
    //--></SCRIPT>
    Thank you!

    Hi, Mic,
    I actually don't know if this will work, but what if you added <a href> coding around your text line? You might need \ escape characters so that your script sends it out without trying to execute it as code.
    Z

  • Showing image instead of download link

    I am using an interactive report and entered this for the source. I want to show the picture instead of a download link however I don't get the picture I get a
    Source:
    select "IMAGE_ID",
    "SUBJECT",
    "CREATED_DATE",
    "CREATED_BY",
    decode(nvl(dbms_lob.getlength(image),0), 0, null, '<img src=
    "'||apex_util.get_blob_file_src('P53_IMAGE', image_id)||
    '" height="75" width="75" />') Image
    from "#OWNER#"."IMAGES"
    Shown in the report:
    <img src= "apex_util.get_blob_file?a=100&s=3229276571420106&p=53&d=1943731550155986&i=1941402717155956&p_pk1=1&p_pk2=&p_ck=58C90FE7F1EC9618676F23C2FC24FA0A" height="75" width="75" />
    Any idea as to what I may be doing wrong?

    Hi ,
    It looks like your report column is set to display as Text. Go to "Home>Application Builder>Application #>Page #>Interactive Report Attributes" and change it to Standard report Column and you should be all set.
    Thanks,
    Manish

  • How to use JavaScript to Open a link automatically

    Is there a method (using JavaScript) to allow a user clicked link to open the link through a “intermediary” page?
    For example, say I have a web page with a embedded Flash file that contains links to several different (outside) web pages. The behavior I want is that the user clicks a link (within the Flash file), a HTML window opens (over the 1st HTML/Flash window) with the new content, leaving the original Flash/HTML window displayed in the background. The user reads the new content. The user can then close the newer window and be back at the displayed HTML/Flash file.
    The twist is that the link embedded in the referring Flash/HTML file goes to a “intermediary page”. Call that the “collector” page. I control that page. On that page I have collected (in a list) all the actual outside URLs (I do this so that I can easily change the URLs using HTML rather than having to edit the Flash file.) The Flash file contains essentially the same URL for each outside location (plus a variable unique to a specific URL).
    The user should not ever actually see this intermediary/collector page. Instead, they click the link, a variable is passed from the referring page to the collector page and fires the corresponding link automatically (replacing the content in the newly created window). Since the link fires automatically the content in the new window (initially created by the collector page) changes to the destination content.
    Is this possible?
    What JavaScript functions are used?
    How are the referring links constructed in the Flash so the variable is passed to the collector page?
    How does the “collector” page auto open the actual content?
    If anyone can point me to descriptions on how this might be done I’d certainly appreciate it.
    TPK

    >is there a way i can call javascript without security checking?
    It wouldn't be security if you could just bypass it. Did you read all
    the security notes? You might be able to do something with trusted
    functions, but I'm not sure how that would integrate with a plug-in.
    Aandi Inston

  • SharePoint 2013 Media Player using UNC path directly without using a Website in IIS (either out of the box or custom player using javascript only)

    Hi,
    There isn't much info on this and I am hoping its possible.
    I have come across the following article which explains how we can setup SharePoint 2013 Asset Library using video links using a website in IIS that is mapped to a UNC path.
    http://stevemannspath.blogspot.com.au/2012/12/sharepoint-2013-videos-in-sharepoint.html
    This is great. However we have an issue where I work and I need somehow to get SharePoint mediaplayer to point to a video directly using the UNC path like :- \\WINSP13\TempVideos\NTV_Carr_Indig.wmv without the use of a website in IIS.
    I understand that we won't be able to stream the video then thats ok.
    when trying to add a video link to an asset library using the UNC path, we get the following error: We don't support
    playing a video of that format from a file share.
    Is there a way or a workaround to do this? we are using only javascript to do this (AngularJS or any custom Javascript player such as MediaElement)
    Thanks
    Kind Regards,
    Will

    From a SharePoint architecture perspective, this is a BAD design, since you are rerouting the communications (from the client to the UNC) away from and outside of SharePoint... as a result, SP cannot provide any level of guarantee about the ability for videos
    to play on the client machine.
    Secondarily, I'm not sure that the browser will let you pull resources from such different locations (doing so has been the root of several type of attacks, such as "Cross Site Scripting").
    That said (and assuming the browser lets you), you can always use JS to handle creating the video player HTML and setting the UNC location... instead of using a site asset library to store the links, just create a list for the videos
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

Maybe you are looking for

  • XML page display Error in IE5

    To JDev Team: When I generate XML under IE5 browser I get the following error: The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. Invalid xml decla

  • Alert: Health Set unhealthy - Clustering

    We have SCOM 2012 R2 setup to monitor our Exchange 2013 CU5 enviroment and we have gotten this error message about our Clustering going in to an unhealthy state a couple of times.  We have checked the FSW and everything seems OK on its end.  I cannot

  • Overwhelmed by magic mouse!

    I bought this **** magic mouse and it will not scroll. How do I know I am running the right system. I think I am running leopard. Is that why it will not scroll? I did get some feedback. Check in System Preferences > Universal Access > Mouse & Trackp

  • If I have everything backed up to iCloud and restore my iPhone from a backup made on iTunes last week, can I get back everything I saved on iCloud this week?

    I have just started using iCloud as I have always backed up everything on my iPhone to iTunes on my computer. So now I have everything backed up to my iCloud account as well. What I'm trying to ask is: Let's say I made a back up on iTunes on my compu

  • App Store not working IPad2

    I have an IPad 2.  Just got ita few months ago.  All was working well untill last night.  My App Store will not work.  It will open but it will not let you search or show apps.  All I get is a white screen.  I have tried resetting, hard boot, nothing