By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

Using HTTPRequest to change SVG object attributes

P: 4
Hi,

I use SVG for web-GUI, but found some serious restrictions 8-(

When I use HTML (dynamically generated from .php), I may use HTTPRequest object to provide dynamically regeneration some part of my HTML (from JavaScript).
But can`t dynamically refresh SVG, becouse SVG support only ECMAScript [ since 1999 year 8-( ] This old ECMAScript specification do not support HTTPRequest object and I can`t refresh data in my object dynamically (data for my objects dynamically generated by other .php script).
How you think, may I refresh data inside SVG object using other way?

May be I may use SVG instead HTML page like embedded object and use access to SVG object properties from JavaScript at HTML?
Like this :
[ some html file ]
<html>
<head>
<script ="javascript" >... script text .... </script>
</head>
<body>
<embed src="some.svg" width="100" height="200" />
</body>
</html>

[ some svg file ]
<svg>
<rect id="tank" x="0" y="0" width="100" height="200" fill="green" opacity="0.75" />
</svg>

I should change "height" properties of SVG "rect" object, but it`s impossible?


Do you know other way to dynamically refresh data inside SVG object?
Do you know other way to change SVG object properties with outside data using ECMAScript?

Thanks.

with best regards,
Roman Gordin.
Aug 8 '05 #1
Share this Question
Share on Google+
3 Replies


P: 4
Thanks, no need to answer. Problem already resolved.
Aug 8 '05 #2

P: 4
Opera 8.02 instead of IE 6.0 do not provide access to properties of embedded object (or I use it incorrectly? But with IE it working fine)
Aug 8 '05 #3

P: 1
Hi Roman,
I have the similar situation as yours. How did you resolve your problem?
Thanks.

James
Feb 7 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.