Click here to Skip to main content
15,888,802 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Wow. A forum dedicated to slagging him off Pin
LunaticFringe21-Jul-10 11:37
LunaticFringe21-Jul-10 11:37 
AnswerRe: Wow. A forum dedicated to slagging him off Pin
Luc Pattyn21-Jul-10 12:08
sitebuilderLuc Pattyn21-Jul-10 12:08 
QuestionActiveX is Missing in IE. Pin
002comp21-Jul-10 2:49
002comp21-Jul-10 2:49 
AnswerRe: ActiveX is Missing in IE. [modified] Pin
002comp21-Jul-10 18:35
002comp21-Jul-10 18:35 
Questionjsf 2.0 <f:ajax> help [modified] Pin
martinlm119-Jul-10 21:18
martinlm119-Jul-10 21:18 
Questiondisplay image on mouse over in java script Pin
varsh1218-Jul-10 22:13
varsh1218-Jul-10 22:13 
AnswerRe: display image on mouse over in java script Pin
Peace ON18-Jul-10 22:36
Peace ON18-Jul-10 22:36 
QuestionAccess an element that is present in a embed object Pin
cdpace17-Jul-10 6:47
cdpace17-Jul-10 6:47 
Hello,

I have the following file called index.html

<!DOCTYPE html>
<html>
<head>
	<title>HTML 5 and SVG Test</title>
	<script type="text/javascript">
		
		document.onmousemove = MoveRectangle;
	
		function MoveRectangle(event)
		{
			var rect = document.getElementById("mytestrectangle");
			var ev = event || window.event;
			rect.x = ev.pageX;
			rect.y = ev.pageY;
			alert("x" + ev.pageX + "y" + ev.pageY);
		}
	</script>
	<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
	<embed id="mysvg" src="test.svg" width="800" height="600" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" />
	
</body>
</html>


and this code in another file called test.svg

<svg width="100%" height="100%"
xmlns="http://www.w3.org/2000/svg">

<rect id="mytestrectangle" width="300" height="100"
style="fill:rgb(255,0,255);stroke-width:1;
stroke:rgb(0,0,255);fill-opacity:0.9;"/>

<polygon points="0,0 100,100 170,250 20,10"
style="fill:#cccccc;
stroke:#000000;stroke-width:1"/>

</svg>



now what i am tring to do is from the file index.html try to access the element called "mytestrectangle" that is in the file test.svg. But I am incliding this file in index.html via the embed object. Is there a way I can access that element via javascript from the index.html page?

hope i expained clear what i need.

Thank you in advance for the help.
AnswerRe: Access an element that is present in a embed object Pin
Peace ON18-Jul-10 22:14
Peace ON18-Jul-10 22:14 
GeneralRe: Access an element that is present in a embed object Pin
cdpace20-Jul-10 21:12
cdpace20-Jul-10 21:12 
GeneralRe: Access an element that is present in a embed object Pin
Peace ON21-Jul-10 19:51
Peace ON21-Jul-10 19:51 
QuestionProblem with menu image Pin
swornavidhya_m16-Jul-10 21:20
swornavidhya_m16-Jul-10 21:20 
AnswerRe: Problem with menu image Pin
Peace ON16-Jul-10 22:29
Peace ON16-Jul-10 22:29 
GeneralRe: Problem with menu image Pin
swornavidhya_m18-Jul-10 19:13
swornavidhya_m18-Jul-10 19:13 
AnswerRe: Problem with menu image Pin
Graham Breach18-Jul-10 22:03
Graham Breach18-Jul-10 22:03 
GeneralRe: Problem with menu image Pin
swornavidhya_m19-Jul-10 0:19
swornavidhya_m19-Jul-10 0:19 
Questionjava script code error Pin
varsh1216-Jul-10 19:35
varsh1216-Jul-10 19:35 
AnswerRe: java script code error Pin
Peace ON16-Jul-10 19:46
Peace ON16-Jul-10 19:46 
GeneralRe: java script code error Pin
varsh1216-Jul-10 20:14
varsh1216-Jul-10 20:14 
AnswerRe: java script code error [modified] Pin
Peace ON16-Jul-10 20:20
Peace ON16-Jul-10 20:20 
Questionjavascript : submit for via link + "retrieving value of submit button" Pin
sharp_k16-Jul-10 12:02
sharp_k16-Jul-10 12:02 
AnswerRe: javascript : submit for via link + "retrieving value of submit button" Pin
sharp_k16-Jul-10 12:15
sharp_k16-Jul-10 12:15 
QuestionSurvey request for Javascript Developers Pin
Sean Ewington16-Jul-10 5:46
staffSean Ewington16-Jul-10 5:46 
QuestionBackground-image not working in external stylesheet Pin
swornavidhya_m16-Jul-10 3:40
swornavidhya_m16-Jul-10 3:40 
AnswerRe: Background-image not working in external stylesheet Pin
Peace ON16-Jul-10 4:04
Peace ON16-Jul-10 4:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.