Draw Signature Image using Javascript

hi, i use a PDA to view my personal website .
i want to let other people able to sign their signature in a given screen ...
the signature should be visible on screen ...
how can i do that by javascript?

if not javascript, any other method can recommend ?

Who is Participating?
check this example, this is how to use .net to implement a PDA application


this feature is impossible to be implemented using javascript, as it is only a client script language.

however, you can easily achieve this using .net (eg. c# or vb.net). roughly the code should be:

            private static Bitmap CreateImage( string sImageText )
                  Bitmap bmpImage = new Bitmap( 1, 1 );

                  int iWidth = 0;
                  int iHeight = 0;

                  //Create a Font object
                  Font MyFont = new Font( "Verdana", 24, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point );

                  // Create a Graphics Class to measure the text width      
                  Graphics MyGraphics = Graphics.FromImage( bmpImage );

                  // Resize the bitmap, this is where the bitmap is sized.
                  iWidth = (int)MyGraphics.MeasureString( sImageText, MyFont ).Width;
                  iHeight = (int)MyGraphics.MeasureString( sImageText, MyFont ).Height;

                  // Create the bmpImage again with the correct size for the text and font.
                  bmpImage = new Bitmap( bmpImage, new Size( iWidth, iHeight ) );

                  // Apply the colors and draw the bitmap.
                  MyGraphics = Graphics.FromImage( bmpImage );
                  MyGraphics.Clear( Color.Navy );
                  MyGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
                  MyGraphics.DrawString( sImageText, MyFont, new SolidBrush( Color.Red ), 0, 0 );

                  return( bmpImage );
chongkeng_woonAuthor Commented:
i know only little about Microsoft .NET technology ....i developed software basically using Delphi ..by the way, you are right, it is impossible for  javascript do that ...however, i know that Java Applet can do that ...

how can .NET technology can do this on web? i just wonder where can i get any example from the web ? or even explaination ?

by the way, since i am viewing this website at PDA ...is the application developed by .NET compatible to all the PDA operating system ?

sorry for asking so many questions , i am still new to that .....

chongkeng_woonAuthor Commented:
finally, i did it by using javascript ...i change the
<td> bgcolor to black color in "onMouseMove" event ....it works fine in IE 6 ...

<td width=3px height=3px OnMouseOver="changecolor()">&nbsp;</td>

however, when i view it in PDA (running under Window CE) ....it doesn't work ..
the stylus seems like does not recognize the "OnMouseMove" event handler ..
it does not change the <td> bgcolor to "black"

what should be the event handler for stylus in order to do the "OnMouseMove" event?

thanks again

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.