Search for:
Jump to: 
Your Ad Here
Post new topic Reply to topic
Author Message
 Post subject: To upload a image on same page using javascript
PostPosted: Mon Jun 13, 2011 6:41 am 
Offline

Joined: Fri Apr 29, 2011 5:01 am
Posts: 3
Uploading any image from any location
___________________________________
<html>
<head>
<title>File upload</title>
<script type="text/javascript">
function preview()
{
document.getElementById("pic").src = file.files.item(0).getAsDataURL();

}
</script>
</head>
<body>
<form>
<center>
<img id="pic" src="" alt="no image to preview" height="450px" width="450px"></img>
<br/><br/>
<input type=file id='file' onchange='preview();'></input>
</center>
</form>
</body>
</html>


Thanks
Rohini


Top
 Profile  
 
 Post subject: Re: To upload a image on same page using javascript
PostPosted: Wed Aug 03, 2011 6:28 pm 
Offline

Joined: Wed Aug 03, 2011 6:26 pm
Posts: 1
not work in ie


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic    [ 2 posts ] 

1, 2, 3, 4, 5 ... 414
Recent topics  Replies   Views   Last post 
No new posts Add Slide Notes & Images as Logos in MS PowerPoint

by aspose » Tue May 21, 2013 4:03 am in Miscellaneous

0

6

Tue May 21, 2013 4:03 am

aspose View the latest post

No new posts Jquery ajax Pagination using php

by rajkumar » Tue Apr 19, 2011 11:14 am in Coding Repository

8

17615

Mon May 20, 2013 2:46 am

gfsdfg View the latest post

No new posts Ecommerce website development and website Design

by iweballey » Fri May 17, 2013 7:15 am in PHP-Code Help

0

264

Fri May 17, 2013 7:15 am

iweballey View the latest post

No new posts How to upgrade and migrate Joomal site

by mallikharjuna rao » Mon Jan 21, 2013 1:40 pm in Joomla

1

356

Thu May 16, 2013 9:53 am

sunitha12 View the latest post

No new posts Benefits of PHP

by hirephpexpert » Fri Sep 07, 2012 4:41 am in CakePHP

6

1595

Wed May 15, 2013 6:25 am

PrettyPrincesG View the latest post


Your Ad Here