Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7 KiB

  1. <HTML>
  2. <HEAD><TITLE>PerlScript sample: Mouse tracking</TITLE></HEAD>
  3. <!--
  4. ActiveState PerlScript sample
  5. PerlScript: The easiest, most powerful way to program custom web solutions.
  6. -->
  7. <BODY BGCOLOR="#FFFFFF" TOPMARGIN=8>
  8. <FORM method="POST" NAME="MyForm1">
  9. <TABLE CELLPADDING=0 BORDER=3 CELLSPACING=0>
  10. <TR VALIGN=TOP ><TD>
  11. <A HREF="index.htm" NAME="Image"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="The power of PerlScript!" BORDER=5></A><P>
  12. </TD></TR>
  13. <TR VALIGN=MIDDLE><TD VALIGN=MIDDLE ALIGN=CENTER><FONT SIZE=5>
  14. <INPUT TYPE="text" NAME="TxtLinkDescription" SIZE=50></FONT>
  15. </TD></TR>
  16. </TABLE>
  17. </FORM>
  18. <HR>
  19. <P>
  20. <FONT SIZE=5>
  21. <P> Move your mouse over the PerlScript logo to see Image_MouseMove event parameters.
  22. </FONT>
  23. <SCRIPT language="PerlScript">
  24. sub Image_MouseMove {
  25. my ($x,$y, $s, $b) = @_;
  26. $window->document->MyForm1->TxtLinkDescription->{'Value'} = "MouseMove s:$s b:$b x:$x y:$y";
  27. }
  28. sub Image_mousemove {
  29. Image_MouseMove(@_);
  30. }
  31. sub Image_onmousemove {
  32. my $e = $window->event;
  33. my ($x,$y, $s, $b) = ($e->X, $e->Y, $e->OffsetX, $e->OffsetY);
  34. $window->document->MyForm1->TxtLinkDescription->{'Value'}
  35. = "MouseMove [X=$x Y=$y relX=$s relY=$b]";
  36. }
  37. </SCRIPT>
  38. <P>
  39. <!-- Horizontal line -->
  40. <HR>
  41. <TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 width=600>
  42. <TR VALIGN=TOP>
  43. <TD ALIGN=RIGHT>
  44. <FONT FACE="Arial, Helvetica" SIZE="1">
  45. <B>Best experienced with<BR>
  46. <A HREF="http://www.microsoft.com/ie/" TARGET="_top">
  47. <img src="ie_animated.gif" width="88" height="31" border="0" alt="Microsoft Internet Explorer" vspace="5"></a>
  48. <BR>Click here to start.</B>
  49. </FONT></TD>
  50. </TR>
  51. </TABLE>
  52. </BODY>
  53. </HTML>