 |
|
 |
| |
Developer on focus
Anton Zamov is a dipl. engineer with more than 6 years of active professional
experience and many awards ...
read more>>
|
|
 |
 |
 |
|
 |
|
 |
| |
|
JavaScript function which renders a VML grid
|
Very useful when you wish to place a grid behind your
VML chart graphics.
RenderGrid(gridWidth,gridHeight,hLines,vLines)
gridWidth - width of the gridht
gridHeight - height of the gridth
hLines - number of horizontal lines
vLines - number of vertical lines
Example:
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<head>
</head>
<script>
function RenderGrid(gridWidth,gridHeight,hLines,vLines){
document.write("<table>");
document.write("<tr>");
document.write("<td>");
for(i=0;i<=hLines;i++){
document.write("<v:line from='0,"+(i*(gridHeight/hLines))+"' to='"+gridWidth+","+(i*(gridHeight/hLines))+"' ></v:line>");
}
for(i=0;i<=vLines;i++){
document.write("<v:line from='"+(i*(gridWidth/vLines))+",0' to='"+(i*(gridWidth/vLines))+","+gridHeight+"' ></v:line>");
}
document.write("</td>");
document.write("</tr>");
document.write("</table>");
}
RenderGrid(600,100,5,10);
</script>
</body>
</html>
|
About the author of this programming example or tutorial:
Anton Zamov is a software engineer with more than6 years
of active experience in web and software development and design.
Anton Zamov has extensive experience and broad knowledgebase
in C# and JAVA programming and has created a lot of
running e-commerce systems, portals and content management
systems using PHP and other web development technologies.
For more information about Anton Zamov, you may visit the personal web site of
Anton Zamov.
|
|
|
 |
 |
 |
|
|