473,386 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Giving up on VML

Unless someone can show me how to use it I am giving up on VML.

Problems

1) I cannot work out how to detect whether it is present.

I tried some VB IsObject( CreateObject( ...)) but that did not work.

2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.

Any help welcome,

Aaron
Dec 31 '06 #1
14 4145
VK

Aaron Gray wrote:
Unless someone can show me how to use it I am giving up on VML.

Problems

1) I cannot work out how to detect whether it is present.
You dnt have to - it is presented by default. VML over ActiveX was on
the testing stage for IE 4, you can happily forget of it. If it's IE -
then you have native VML support
2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:oval coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:oval>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>

Just place the line yourself wherever you want. Overall I do not
understand why are you refusing to google for and to read VML and SVG
references? The things do not have to be found in starvations by
yourself, just read the manual.

Dec 31 '06 #2
>Unless someone can show me how to use it I am giving up on VML.
>>
Problems

1) I cannot work out how to detect whether it is present.

You dnt have to - it is presented by default. VML over ActiveX was on
the testing stage for IE 4, you can happily forget of it. If it's IE -
then you have native VML support
I have came across a friends machine that does not support it.
>
> 2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:oval coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:oval>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>

Just place the line yourself wherever you want.
AND now in JavaScript ?
Overall I do not
understand why are you refusing to google for and to read VML and SVG
references? The things do not have to be found in starvations by
yourself, just read the manual.
I have read both W3C and MS'es documentation.

MS seems not to follow W3C documentation AFAICT.

Aaron
Dec 31 '06 #3
> 2) I cannot seem to get it to draw properly
>>
cannot draw a circle(oval) crossed by a line to two.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:oval coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:oval>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>
They appear as separate elements not as one. As if they were in two separate
DIV's.

Also why the style rather than the position attribute as in W3C
documentation ?

Aaron
Dec 31 '06 #4
Aaron Gray said the following on 12/31/2006 3:57 PM:
>> 2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:oval coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:oval>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>

They appear as separate elements not as one.
Because they *are* two separate elements.
As if they were in two separate DIV's.
span elements maybe, div tags - unless told otherwise - fill an entire line.

Use CSS to "stack" them:

<v:oval coordsize="21600,21600"
style='width:156pt;height:156pt;position:absolute; top:0px;left:0px'>
</v:oval>
<v:line style="position:absolute;top:0px;left:0px"
coordsize="21600,21600" from="0pt,0pt" to="156pt,156pt">
</v:line>

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 31 '06 #5
>They appear as separate elements not as one.
>
Because they *are* two separate elements.
>As if they were in two separate DIV's.

span elements maybe, div tags - unless told otherwise - fill an entire
line.

Use CSS to "stack" them:

<v:oval coordsize="21600,21600"
style='width:156pt;height:156pt;position:absolute; top:0px;left:0px'>
</v:oval>
<v:line style="position:absolute;top:0px;left:0px"
coordsize="21600,21600" from="0pt,0pt" to="156pt,156pt">
</v:line>
Thats crazy if you look at the W3C spec.

And how do you put them in a <groupelement without them disappearing ?

Aaron
Dec 31 '06 #6
I just cannot seem to get the following to work :-

<html xmlns:vml="urn:schemas-microsoft-com:vml">
<head>
<style>
vml\:* { behavior: url(#default#VML) }
</style>
</head>
<body>

<vml:group coordsize="1000,1000" coordorigin="0, 0">
<vml:oval style="width:500; height:500" position="500, 500" size="450,
450" />
<vml:line from="0, 0" to="500, 500" />
</vml:group>

</body>
</html>

Totally stumped...

Aaron
Dec 31 '06 #7
And how do you put them in a <groupelement without them disappearing ?

Okay add a 'style' statement. This is horrible !

Aaron
Dec 31 '06 #8
Aaron Gray wrote:
Unless someone can show me how to use it I am giving up on VML.

Problems

1) I cannot work out how to detect whether it is present. :-)
If the browser isn't IE 5+, it's not present.

I tried some VB IsObject( CreateObject( ...)) but that did not work.

2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.

Any help welcome,
Why are you pursuing VML? It is a proprietary IE technology that is
not well supported (if at all) in other browsers. It will likely be
more useful to get into SVG or maybe XAML, try this post from Laurent
Bugnion:

<URL:
http://groups.google.com.au/group/co...d8b317f3896154
>
The canvas element:
<URL: http://www.whatwg.org/specs/web-apps...t-work/#canvas >

Check out this article which discusses implementing SVG in IE using
VML:
<URL: http://me.eae.net/archive/2005/12/29/canvas-in-ie/ >

The Mozilla canvas tutorial:
<URL: http://developer.mozilla.org/en/docs/Canvas_tutorial >

Regarding vector drawing in browsers:
<URL: http://wiki.svg.org/Vector_Format_Comparisons >
--
Rob

Dec 31 '06 #9
VK
You dnt have to - it is presented by default. VML over ActiveX was on
the testing stage for IE 4, you can happily forget of it. If it's IE -
then you have native VML support

I have came across a friends machine that does not support it.
Tell your friend to reinstall immediately - the machine is badly broken
or (s)he's using very obsolete IE version wide open for all
vulnerabilities found in IE over the last 6 years.
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:oval coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:oval>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>

Just place the line yourself wherever you want.

AND now in JavaScript ?
Think! Learn! Then think again! ;-) :-|

SVL is not Prototype/Scriptaculous crap linking: you have to _think_
and be ready to work over differences in SVG and VML. It also presume a
good understanding of the involved entities: finit viewport, infinit
Descartes space, their relations, geometrical shape vs. physical body.
Briefly if you wanted to surprise your girl by the next week-end you've
chosen a wrong matter to deal with ;-) :-|

As an inside info: VML is noticeable more powerful and _much_ more easy
to script than SVG. You cannot do it with VML - you have little chances
with SVG.

<http://www.dynamicdrive.com/dynamicindex11/editor.htmis not an ideal
sample to copy - not at all, it is just a proof of concept that behind
the knowledge you'll obtain the things will be much more easy than they
are right now.

Dec 31 '06 #10
As an inside info: VML is noticeable more powerful and _much_ more easy
to script than SVG. You cannot do it with VML - you have little chances
with SVG.
I did my SVG example in about 1/2 an hour.

SVG is much much nice that VML particularly MS'es VML.

Anyway I am getting there but there are so many oddities, styles used
instead of attributes in the MS version which is just horrible.

Aaron
Dec 31 '06 #11
Anyway I am getting there but there are so many oddities, styles used
instead of attributes in the MS version which is just horrible.
opacity and fill=false do not seem to work I cannot seem to get a see
through oval.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:group style='width: 100%; height:100%'>
<v:line from="0, 0" to="1000, 1000" stroke='true' strokecolor='black'
strokeweight='2px'>
</v:line>
<v:oval opacity="1.0" fill="false"
style='top:50;left:50;width:900;height:900'>
</v:oval>
</v:group>

</body>
</html>

moan, moan, moan, happy new year, hackers, ...

Aaron
Dec 31 '06 #12
Unless someone can show me how to use it I am giving up on VML.
>
Problems

1) I cannot work out how to detect whether it is present.

I tried some VB IsObject( CreateObject( ...)) but that did not
work.
Still none the wiser as to why that did not work.
2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.
Here's where I am with a JavaScripted DOM version :-

http://www.aarongray.org/Test/VML/VML-DOM.html

Again still non the wiser as to why the line will not display and as to why
I cannot get transparent circles ?

Many thanks if you can help, dont be bothered if you cannot,

Aaron
Dec 31 '06 #13
Here's where I am with a JavaScripted DOM version :-
>
http://www.aarongray.org/Test/VML/VML-DOM.html
Okay lines working now. 'toString()' does not convert numbers to numeric
strings !

I still cannot get transparent circles ? Even with 'fill=false' and
'opacity=0' !

Any help welcome,

Aaron
Jan 1 '07 #14
>'toString()' does not convert numbers to numeric strings !

Especially if I pass the input as a paramenter rather than as the object,
he, he, Arg.

Aaron
Jan 1 '07 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: prasi | last post by:
hi all, I have executed the following program, I was expecting some errors in the program but it didn't give any ERRORS!!!!!!!!!!!!!!!!!!!!!!!!!!! please can anybody explain me ?...
0
by: sandeep pandit via .NET 247 | last post by:
hello sir, i read your article on URL rewriting in asp.net on msdn.i have also used the same in my project.URL rewriting is working fine in our LAN and on our configured IP but problem is that...
5
by: washoetech | last post by:
Hello, I have tried to run my ASP.NET 2.0 application from IIS and I get a page not found error. When I debug from within Visual Studio.NET 2005 my application works fine. Any ideas? ...
9
by: Rhino | last post by:
How hard (and desireable) would it be to give the user certain choices when it comes to printing web pages? The pages on my site use colours and pictures and contain an imbedded menu, among...
1
by: bikkaran | last post by:
Hi , I have a peculiar situation where the same query is giving different out on th edatabase server and the when the same database is catalogged to another server What I find is the out...
2
by: Sridhar | last post by:
Hi, I have a web form where it has a <input type=file id=file1> control. I have an Upload button to upload the file. WHen I click on browse and select one file, it is showing the full file path...
1
by: Rahul Bhate | last post by:
Hello Sir My problem is in dos giving error that javac is not recognised.Tell me the steps for debugging.I have already set the CLASSPTH through command line & also set the PATH.But still giving...
5
by: Sendil kumar | last post by:
Hi All, The FtpWebRequest.GetResponse( ) method is not giving "550 File not found exception " when I do a directory list operation on a invalid(not present) directory in HP Unix and Sun Solaris...
0
by: charmeda103 | last post by:
when i run my program it runs with no erorrs but the output screen is giving me strange results here is whats its giving me: CONFERENCE OVERALL RANK TEAM W-L % WINS MARGIN W-L ...
6
tpgames
by: tpgames | last post by:
I'm trying to get a maze to default to always giving me the image as the marker and never give me the color as the marker. The code requires you to check a box to get the image marker to be used. So,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.