- Hi david.
the id parameter is the id of a SVG layer, but that's not the problem.
here is my hiliteElement function:
function hiliteElement(checkbox, layerId)
svgdoc = parent.document.getElementById("mapasvg").getSVGDocument();
var v = checkbox.checked ? "visible" : "hidden" ;
this function works fine, I´ve tested it before (with static
I found out that, when creating elements dinamically (using
createElement), the events associated to them don't work!!! Maybe a
browser problem, I don´t know... I´ve tried to do it with another
objects (buttons, for example...), and with another events
(onmouseover, onmouseout), and I've got the same result.
innerHTML only works in IE, right? :(
anymore... I create a iframe element, the src atribute is a JSP page.
That page creates all checkboxes that I need, and this works fine.
Once again, thanks for your help.
> I'm a bit uneasy about the inclusion of "id" as a quotedparameter. What's in it?
>an alert call and see if it looks right. I.e.
> Best way to check what this is doing is to pop the information into
>http://www.faqts.com/knowledge_base/view.phtml/aid/9592 which gives a
> alert("hiliteElement(this,'" + id + "')") ;
> However, also look at this link
workaround for IE5.5 - don't know if it applies to IE6.
>quotes) and got quite a few hits - but there's a lot of confusion.
> I did a Google search for 'setattribute onclick' (without the
>the dark myself. I just tend to write the HTML out, and use
> Hope this helps. (I don't use createElement much, so am a bit in
innerHtml calls where necessary.)
> Regards, David Smart
> SmartWare Consulting
> ----- Original Message -----
> From: i980365
> Sent: Tuesday, August 05, 2003 1:53 AM
> Hi all.
> I have the following problem:
> associated with that event (onclick) isn't executed...+ "')") ;
> I've tried with static content, and it works!!!
> can't understand why it doesn't work when creating checkboxes
> this is my function:
> function createSVGLayer( id )
> if( id == null ) return ;
> var input = document.createElement("input");
> // svglayers --> global variable
> svglayers.appendChild(document.createTextNode(id)) ;
> svglayers.appendChild(document.createElement("br")) ;
> input.setAttribute("checked",true) ;
> input.setAttribute("onclick","hiliteElement(this,'" + id
> Thanks in advance
> Best regards
> Yahoo! Groups Sponsor
> To unsubscribe from this group, send an email to:
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> [Non-text portions of this message have been removed]