Hi Thomas,
<g id="cbx1_0" transform="translate(20,52)"
onclick="onoff('cbx1_0', 'State Boundry')>
<rect width="10" height="10"
style="fill:yellow;stroke:black;stroke-width:1" />
<path d="M0,0 l10,10 m0,-10 l-10,10"
style="fill:none;stroke:black;stroke-width:2"
visibility="hidden"/>
</g>
This would not create a checkbox whereas I need a checkbox like we have in
HTML. Regarding the onoff function . This function is in js file which has
been included . This function is used for switching a particular layer on
and off.
Is it possible to make checkbox in SVG file with functionality similar to
that in HTML. Because in the code whereever I have made yellow rectangles, I
need to have a checkbox.
Is there a workaround to it.
Regards
Arvind
>From: Thomas E Deweese <[EMAIL PROTECTED]>
>Reply-To: "Batik Users" <[EMAIL PROTECTED]>
>To: Batik Users <[EMAIL PROTECTED]>
>Subject: Checkbox in SVG
>Date: Thu, 1 Aug 2002 08:22:44 -0400
>
> >>>>> "AS" == Arvind Sareen <[EMAIL PROTECTED]> writes:
>
>AS> Hi
>
>AS> I am trying to embed checkbox in an svg file but I get an error
>AS> whenever I try to write checkbox in the svg file.
>
>AS> Brief description of the code is that I have yellow rectangles
>AS> which when clicked show change of state but at the same time I
>AS> want to show the lines also which depict the colour of the lines
>AS> to be displayed. Instead of yellow rectangles, i want to have
>AS> checkboxes over there. Can anybody give a workaround or solution
>AS> to the problem. Below is the code of the svg file.
>
> Thanks for including it but it isn't very useful it has a hole
>bunch of JSP in it, and it is lacking the ecmascript that goes with it
>(no definition of the function 'onoff1'). So I really can't diagnose
>what the 'problem' is.
>
> However, if all you are having trouble with is the adding of
>lines, you might try the following as the basic structure of your
>'check box' object:
>
> <g id="cbx1_0" transform="translate(20,52)"
> onclick="onoff('cbx1_0', 'State Boundry')>
> <rect width="10" height="10"
> style="fill:yellow;stroke:black;stroke-width:1" />
> <path d="M0,0 l10,10 m0,-10 l-10,10"
> style="fill:none;stroke:black;stroke-width:2"
> visibility="hidden"/>
> </g>
>
>
> Then in the script you can look up the group, adjust the style on
>the rect (firstChild) and change the visibilty property to 'visible'
>on the path (nextSibling).
>
> I think it would actually be possible to do this just by changing
>the class of the group and having an appropriate stylesheet that would
>be cleaner in the long run but a bit tricker to set up in the short
>run.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]