Loading ...
Sorry, an error occurred while loading the content.

Re: [svg-developers] Re: Problem with SVG and Javascript

Expand Messages
  • Jonathan Watt
    I would recommend that instead of removing document. you make it document.getElementById( SVGdata ).elements... This should work in a wider range of
    Message 1 of 4 , Jul 1, 2005
    • 0 Attachment
      I would recommend that instead of removing 'document.' you make it
      document.getElementById('SVGdata').elements...

      This should work in a wider range of browsers, and is likely to
      continue working in future.


      On 6/30/05, Nicholas Lucaroni <U.mojan@...> wrote:
      > looks decent... try removing 'document.' ?
      >
      > --- In svg-developers@yahoogroups.com, "derguteonkeldod"
      > <derguteonkeldod@y...> wrote:
      > > Hello,
      > >
      > > I want to manipulate the value of a HTML form by Javascript.
      > > I got this error message: 'document.SVGdata.elements is Null or no
      > > object'. I really don't know why.
      > > BTW: the HTML code is embedded in a portlet (Jetspeed2 Portal).
      > Maybe
      > > this could help finding a solution.
      > >
      > >
      > > That's the Javascript function:
      > >
      > > function onclickFunction(evt)
      > > {
      > > seat = evt.getTarget();
      > > document.SVGdata.elements['SeatNr'].value=seat.getAttribute
      > ("id");document.SVGdata.submit();
      > > }
      > > (I also tried 'document.SVGdata.SeatNr.value',
      > > 'document.forms['SVGdata'}.elements['SeatNr'].value')
      > >
      > > ...and that's the HTML code:
      > >
      > > <form name="SVGdata" id="SVGdata" method="POST"
      > > action="http://localhost:8080/">
      > > <input type="hidden" name="SeatNr" value="">
      > > </form>
      > > <embed src="http://localhost:8080/HelloWorld/Test.svg"
      > > type="image/svg-xml" width="100px" height="100px"/>
      >
      >
      >
      >
      > -----
      > To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
      > -or-
      > visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
      > ----
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.