|
-
October 28th, 2008, 07:22 AM
#1
display image in a <img> control placed in iframe
hi all,
I'm trying to display an image in a <img> control which is placed inside an iframe. for this I'm using <asp:FileUpload> control..
how can I do it using javascript?? I have tried all the codes that has been given in almost all websites.. I hav really run out of resources..
guys, u can only help me ...
pls.. help me out .....
thanx in advance :-)
-
October 28th, 2008, 03:46 PM
#2
Re: display image in a <img> control placed in iframe
What exactly are you trying to do? You aren't being really clear.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
October 28th, 2008, 11:17 PM
#3
Re: display image in a <img> control placed in iframe
Hi PeejAvery,
As I hav mentioned in my previous post, that I'm using a file upload control which is placed in an iframe. After I click the browse button and select an image, I would like to display that image in an <image> control which too is placed within the iframe.
The file upload control <tag> looks like this..
<input type="file" id="fileUserAttachment" runat="server" onchange="return StartFileChangeTimer();" />
And inside StartFileChangeTimer() function , I'm trying to display the image in the <image >control.. However, the code to display image is executing without any problem.. but the image is not being displayed..
The following code is what I have used to display the image..
var sFileName = document.getElementById('fileuploadControl').value;
sFileName = sFileName.replace(/\\/g,'/');
document.getElementById('imgControlID').style.display = 'block';
document.getElementById('imgControlID').src = sFileName ;
From this , can u tell me where I have gone wrong ???
any help would b much appreciated .. :-)
thanx PeejAvery
-
October 29th, 2008, 07:41 AM
#4
Re: display image in a <img> control placed in iframe
Are you using Internet Explorer? If so, that would explain its lack of functionality.
Microsoft removed the ability to show images if the src attribute points to the local machine (ie. c:\path\to\image.jpg).
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
November 3rd, 2008, 06:49 AM
#5
Re: display image in a <img> control placed in iframe
its not possible to display an image using js.
u could better save the image to server and then relaod it.. a postback wil do that for u..
i think that may work.. just try it..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|