Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > getSVGDocument() gives unspecified error

Reply
Thread Tools

getSVGDocument() gives unspecified error

 
 
Ashish
Guest
Posts: n/a
 
      10-04-2004
I have a svg file which is embeded in HTML file like:

<embed id="svgroomindex"
src="http://in-dev-ashishm/SVG/11roomindex.svg" width="100%"
height="100%" />

I have a javascript function to get the svg document object:

// Returns the embedded SVG Document
function getSVGDocument(embedName) {
var plugin = document.embeds[0];
return plugin.getSVGDocument();
}

which I call in onload event of body

<body onload="svgDoc=getSVGDocument('svgroomindex');">

But I get a javascript error onload of HTML file: Unspecified Error

I have tried many variants but all gives the same error. What can be
the problem (with code or anything else)?

Thanks,
Ashish
 
Reply With Quote
 
 
 
 
Jim Ley
Guest
Posts: n/a
 
      10-04-2004
On 4 Oct 2004 06:22:13 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Ashish) wrote:


>which I call in onload event of body


the SVG document won't be loaded in the embed by this time, do it
later - in fact use the SVG documents load event to tell its parent
when it's ready.

Events! That's the way to go.

Jim.
 
Reply With Quote
 
 
 
 
Ashish
Guest
Posts: n/a
 
      10-05-2004
Now I removed onload from body in HTML and in SVG file svg tag I added
onload="fn_init()"

Also in SVG I have written fn_init() function.

<script type="text/ecmascript">
<![CDATA[
function fn_init(){
parent.fn_initialize();
}
]]>
</script>

In fn_init I want to call initialize() function which is in the HTML
which embeds this SVG.

But this also is not working.

Thanks,
Ashish

(E-Mail Removed) (Jim Ley) wrote in message news:<(E-Mail Removed)>...
> On 4 Oct 2004 06:22:13 -0700, (E-Mail Removed) (Ashish) wrote:
>
>
> >which I call in onload event of body

>
> the SVG document won't be loaded in the embed by this time, do it
> later - in fact use the SVG documents load event to tell its parent
> when it's ready.
>
> Events! That's the way to go.
>
> Jim.

 
Reply With Quote
 
Jim Ley
Guest
Posts: n/a
 
      10-05-2004
On 4 Oct 2004 22:14:33 -0700, (E-Mail Removed) (Ashish) wrote:

>Now I removed onload from body in HTML and in SVG file svg tag I added
>onload="fn_init()"
>In fn_init I want to call initialize() function which is in the HTML
>which embeds this SVG.


I think we need more information, and it might be better at the svg
developers mailing list:
news://news.gmane.org/gmane.text.xml.svg.devel

Jim.
 
Reply With Quote
 
Ashish Mundra
Guest
Posts: n/a
 
      10-07-2004




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Ashish Mundra
Guest
Posts: n/a
 
      10-07-2004
Hi Jim,

Thanks for the help. Actually today I discovered that my original code
works when I access web page (in ASP.NET) using
http://machine-name/....aspx but it do not work when I access it by
localhost in URL, i.e. http://localhost/....aspx.
I do not know the reason, but it's strange.

Thanks,
Ashish



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unspecified error Oracle error occurred, but error message could not be retrieved fro kanman Case Modding 0 04-25-2009 02:00 PM
Error Executing CMS_GetProductsPage: Unspecified error Gatsu ASP .Net 2 09-05-2008 03:46 PM
MS Access + ASP + ADO + OpenSchema + error - Unspecified Error abcd ASP General 0 05-08-2006 03:30 PM
MS Access + ASP + ADO + OpenSchema + error - Unspecified Error abcd ASP General 0 05-05-2006 10:30 PM
Framework 1.1 / Access Unspecified Error RM ASP .Net 3 08-19-2003 09:09 AM



Advertisments