Results 1 to 2 of 2

Thread: print image in javascript

  1. #1
    Join Date
    Aug 2013
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default print image in javascript

    am trying to output images from database via json. the code below displays the image name eg mutago.jpg.

    Code:
    chat_div.innerHTML += response.messages.message[i].user_image + '<br />';
    i want to display the real image in directory upload. i have trie this below

    Code:
    chat_div.innerHTML += <img src="upload/ ' response.messages.message[i].user_image +'"> '<br />';
    Any help

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    chat_div.innerHTML+='<img src="upload/ '+response.messages.message[i].user_image+'" ><br />';
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

Similar Threads

  1. How to print more number copies with JavaScript?
    By DhanaPriya in forum JavaScript
    Replies: 0
    Last Post: 02-25-2013, 05:38 AM
  2. Need javascript to open print dialog box in PDF
    By simcomedia in forum JavaScript
    Replies: 0
    Last Post: 02-22-2011, 12:16 AM
  3. 'JavaScript:window.print()';
    By squizeers in forum JavaScript
    Replies: 7
    Last Post: 11-15-2010, 04:28 PM
  4. Print with Javascript and CSS problem?
    By writeman in forum JavaScript
    Replies: 4
    Last Post: 04-03-2007, 12:32 AM
  5. javascript and print friendly version
    By newtojavascript in forum JavaScript
    Replies: 2
    Last Post: 09-21-2005, 05:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •