PDA

View Full Version : vml editor drawing image to be saved



meenakshi
06-28-2008, 09:50 PM
hi
i came across this really interesting link on dynamicdrive
http://www.dynamicdrive.com/dynamicindex11/vmleditor.htm
where i can do freehand sketching just like i m doing to an image
can anyone tell me is there a way to save that drawing as an image with incremental image number.
what i m looking for is saving a form and along with it this image should be saved
is it possible
pls advice
smile always:)
anand

meenakshi
06-30-2008, 09:35 AM
hi
i got this link
this is in dutch which is actually saving the drawing on the server
i m using a standalone machine with ms access as backend and javascript as the front end
now i m unable to find a way to save the file on local computer just like it saves on the server as the link shows
link : - http://variomatic.quickhost.nl/graffiti/editor.htm

pls help
smile always
anand

jscheuer1
06-30-2008, 11:58 AM
You would need a method of saving a file locally then. I have this which uses Active X, so will work in IE on a local machine:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
// Instantiate a File System ActiveX Object:
var fso = new ActiveXObject("Scripting.FileSystemObject");
// Invoke the method:
var a = fso.CreateTextFile("c:\\testfile.txt", true);
// Do something with it:
a.WriteLine("This is a test.");
// Close the connection:
a.Close();
</script>
</head>
<body>

</body>
</html>

I just tested it and it works, but you would need more to get it to work with the vml editor. The MS Knowledge Base:

http://search.msdn.microsoft.com/Default.aspx?query=Scripting.FileSystemObject&brand=msdn&locale=en-us&refinement=

Should have all the information you need.

meenakshi
06-30-2008, 05:22 PM
hi john
thanks for the above code and it is working nicely
:)
but i m not sure abt the vml editor because the code is written in dutch.
i tried to translate the code from dutch to english using google translate but still cud not undeerstand the code
i know i m asking too much but is it possible to edit that code to incorporate the save function in it?
your help wud be really nice:)
smile always
anand

meenakshi
07-01-2008, 05:54 PM
hi
i also came across this link which is using canvas tag

http://www.nihilogic.dk/labs/canvas2image/
this is somehwhat similar to what i m looking for only two things have to be done
1.when i click on save it saves the image in any of the format gif,jpg or png
2.it saves the file with the name like 1.jpg and next time auto increment to 2.jpg searching from the directory from local machine.
can you help me in this regard?
thanks
anand
__________________
smile always:)

meenakshi
07-01-2008, 07:17 PM
hi
i searched and read that vml is only meant for ie and support all functions and only after knowing that i searched the editor and found it here only at dynamicdrive.com scripts
i also tried to contact the author of the script but the email bounced back:((((

link : - http://variomatic.quickhost.nl/graffiti/editor.htm
is actually saving the image but have two problems
1.it is saving the image on to the server
2.the code is written in dutch and i m not a good programmer so m unable to locate where to i sud ammend it to be able to save the image on to local computer

i have also come across this link

http://www.nihilogic.dk/labs/canvas2image/
which is similar to the editor but is made using canvas tag which is not having full functions support for ie:(((.it also has a feature where i can save the image in jpg,gif,bmp format.

what i m looking for only two things have to be done
1.when i click on save it saves the image in any of the format gif,jpg or png
2.it saves the file with the name like 1.jpg and next time auto increment to 2.jpg searching from the directory from local machine.

any idea how to do this?
smile always:)
anand