Load a pic

I have a vaiable called file and want to load it on a wepage
Like this

show_pic="<IMG SRC=\""+file+"\">";

Q 1. But on the place i have my web page doesnt accept \ can i doing on another way so my pic loads?
Q 2. I even want to change size for the pic like in this string #> <img src="file" width="800" height="300" border="0" />#
Q 3. Is there anyone who know if there is any site there i can upload files on for free?
Thx for your help


  • I have get ride of the problem with \ now do i only need to know how to rezise the pic in show_pic="<IMG SRC=\""+file+"\">";

  • Use single quotes:
    show_pic='<img src="'+file+'">';

  • thx its now working ok now i find out this line works great

    document.write('<IMG SRC="'+file+'.gif" WIDTH=800 HEIGHT=280>');
    And the problem with backslash \ too its possible to use \\ if you need to use it
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!