Hi All ,
i have a requirement where in user can copy the images from the external source and paste in the web form
so i need to access the pasted image and store it in oracle DB ... well i am able to paste the image from the
external application like excel or any other Web sites ... but problem is that i am not able to retrieve the image
so if any one have some idea do guide me... below i am providing the code where i am able to paste the images
i am using div tag inside it i am pasting the image ...
well i think that even though if we use .NET Clipboard class but we can't access the client clipboard... this problem
for me ... so any can put a light on this topic it will really helpfull for me as well for others who are struggling with
such problem..thanks in Advance
<html>
<head>
<script>
function CopyToClipBoard()
{
var div = document.getElementById('copythis');
div.contentEditable = 'true';
var controlRange;
if (document.body.createControlRange ) {
controlRange = document.body.createControlRange();
controlRange.addElement(div);
controlRange.execCommand('Copy');
}
div.contentEditable = 'false';
}
function PasteToClipBoard()
{
var div = document.getElementById('pastethis');
div.contentEditable = 'true';
var controlRange;
if (document.body.createControlRange) {
controlRange = document.body.createControlRange();
controlRange.addElement(div);
controlRange.execCommand('Paste');
}
div.contentEditable = 'false';
}
function GetImage()
{
var ctrlRange = document.body.createControlRange();
ctrlRange.add(document.all(sImgID));
ctrlRange.execCommand ("Copy");
}
<head>
<script>
function CopyToClipBoard()
{
var div = document.getElementById('copythis');
div.contentEditable = 'true';
var controlRange;
if (document.body.createControlRange ) {
controlRange = document.body.createControlRange();
controlRange.addElement(div);
controlRange.execCommand('Copy');
}
div.contentEditable = 'false';
}
function PasteToClipBoard()
{
var div = document.getElementById('pastethis');
div.contentEditable = 'true';
var controlRange;
if (document.body.createControlRange) {
controlRange = document.body.createControlRange();
controlRange.addElement(div);
controlRange.execCommand('Paste');
}
div.contentEditable = 'false';
}
function GetImage()
{
var ctrlRange = document.body.createControlRange();
ctrlRange.add(document.all(sImgID));
ctrlRange.execCommand ("Copy");
}
</script>
</head>
<body bgcolor="white">
<div id="copythis">
</div>
<form>
<div id="pastethis">
</div>
<input type="button" value="Copy To ClipBoard" ><input type="button" value="Paste To ClipBoard"
<img src="" id="ImageToPasted">
</form>
</body>
</html>
--
Kiran R Kawalli
mob no:9880281339
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/
Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---
