So it resets the source. Does it do this properly? Could you show the index2.svg document to see if its something in there?
I haven't worked much with setSrc but we should be able to get to the bottom of this... Alastair --- In [email protected], Sean <[EMAIL PROTECTED]> wrote: > The second alert never appears after the error. It occurs when the it > sets the Src. It dose reset the Src, but then bails on finishing the > function after throwing the error. > > function back(){ > var svgMap = parent.document.getElementById("SvgMap"); > // look at what you retrieved > alert(svgMap); > if( svgMap != null ){ > svgMap.setSrc("index2.svg"); > } > alert(svgMap); > } > > > Alastair Fettes wrote: > > >So what line is it giving you the error on? What scripting > >environment is this occuring in? In ASV, MSIE, Firefox, etc? > > > >--- In [email protected], Sean <[EMAIL PROTECTED]> wrote: > > > > > >>--------------------------- > >>Alert > >>--------------------------- > >>[object] > >>--------------------------- > >>OK > >>--------------------------- > >> > >>Then gives me the error, then sets the Src anyway. > >> > >>Alastair Fettes wrote: > >> > >> > >> > >>>try this to debug it: > >>> > >>>function back() > >>>{ > >>> var svgmap = parent.document.getElementById("SvgMap"); > >>> > >>> // look at what you retrieved > >>> alert( svgmap ); > >>> > >>> if( svgmap != null ) > >>> { > >>> svgmap.setSrc("index2.svg"); > >>> } > >>>} > >>> > >>>Alastair > >>> > >>>--- In [email protected], Sean <[EMAIL PROTECTED]> wrote: > >>> > >>> > >>> > >>> > >>>>Below is a function in some JS that is referenced in the embeded SVG > >>>>file. It works, but not without throwing up this: > >>>> > >>>>--------------------------- > >>>>Script error > >>>>--------------------------- > >>>>Unknown error > >>>> > >>>>line: 3, column: 0 > >>>>--------------------------- > >>>>OK > >>>>--------------------------- > >>>> > >>>>which is the closing "}". > >>>> > >>>>function back(){ > >>>> parent.document.getElementById("SvgMap").setSrc("index2.svg"); > >>>>} > >>>> > >>>>I need to reference the embedded svg the reset the svg, which is > >>>> > >>>> > >in the > > > > > >>>>parent document. > >>>> > >>>>Any ideas as to what is going on? Thanks. > >>>> > >>>>Sean > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>>----- > >>>To unsubscribe send a message to: > >>> > >>> > >[EMAIL PROTECTED] > > > > > >>>-or- > >>>visit http://groups.yahoo.com/group/svg-developers and click "edit > >>> > >>> > >my membership" > > > > > >>>---- > >>>Yahoo! Groups Links > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > > > > > > > > > >----- > >To unsubscribe send a message to: [EMAIL PROTECTED] > >-or- > >visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" > >---- > >Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

