Well I have tried it and it works fine it just needs
some enhancements to be imlemented..
Yet I think it is ideal with my project as I have a
web server with very very limited capabilities...so I
want to get rid of scripting as much as possible ..
but I do have a large svg file and around 23
buttons..how can I integrate xforms with each svg
button...is there a scenario for that...
thnx a million
Kojo
--- Mark Birbeck <[EMAIL PROTECTED]> wrote:

> Jeff,
> 
> To show how powerful XForms + SVG is, I took your
> snippet of code, and
> turned it into XForms + SVG -- your SVG rectangle is
> still used to initiate
> the submission, but the submission and event
> handling is defined in terms of
> XForms rather than bits of script.
> 
> I've also replaced your alerts with XForms messages,
> which allows me to show
> off some additional features, namely putting further
> SVG in the messages.
> 
> Finally, I've put a bit more SVG into the
> mouseover/hint to show how easy
> that is -- not something that's very easy to do
> without even more script in
> SVG.
> 
> The entire mark-up is here, and a link to a live
> form on our server is at
> the end:
> 
>   <?xml version="1.0" encoding="utf-8"?>
>   <html
>    xmlns="http://www.w3.org/1999/xhtml";
>    xmlns:ev="http://www.w3.org/2001/xml-events";
>    xmlns:xf="http://www.w3.org/2002/xforms";
>    xmlns:svg="http://www.w3.org/2000/svg";
>   >
>     <head>
>       <xf:model>
>         <!--
>           The data we want to submit
>         -->
>         <xf:instance>
>           <test xmlns="" />
>         </xf:instance>
> 
>         <!--
>           This is the actual submission -- send the
> data
>           referred to, to the specified URL, and put
> the
>           returned value in the same instance.
>         -->
>         <xf:submission id="s1"
> action="http://example.org";
>          method="post" replace="instance">
>           <!--
>             The event xforms-submit happens on the
> reqest,
>             but before the work is done. We show a
> modal
>             message at this point. Note that the
> message
>             has SVG in it.
>           -->
>           <xf:message level="modal"
> ev:event="xforms-submit">
>             About to post because you pressed the
> red square that looks
>             like this 
>               <svg:svg width="25" height="25"
> viewBox="0 0 100 100">
>                 <svg:rect fill="red" x="0" y="0"
> height="100" width="100" />
>               </svg:svg>
>           </xf:message>
> 
>           <!--
>             The event xforms-submit-done happens
> when
>             submission is complete, provided there
> is no
>             error. We show a modal message at this
> point,
>             too.
>           -->
>           <xf:message level="modal"
> ev:event="xforms-submit-done">
>             XML posted
>           </xf:message>
>         </xf:submission>
>       </xf:model>
>     </head>
>     <body>
>       <!--
>         This is the 'button' that initiates the
> submission.
>       -->
>       <xf:submit submission="s1"
> appearance="minimal">
>         <!--
>           The label is SVG ...
>         -->
>         <xf:label>
>           <svg:svg width="100" height="100"
> viewBox="0 0 100 100">
>             <svg:rect fill="red" x="0" y="0"
> height="100" width="100" />
>           </svg:svg>
>         </xf:label>
>         <!--
>           ... and the hint (usually a mouseover) is
> also
>           SVG -- in this case a smaller version of
> the
>           actual trigger
>         -->
>         <xf:hint>
>           <svg:svg width="100" height="100"
> viewBox="0 0 100 100">
>             <svg:rect fill="blue" x="0" y="0"
> height="100" width="100" />
>           </svg:svg>
>         </xf:hint>
>       </xf:submit>
>     </body>
>   </html>
> 
> This form will work as is in a future version of
> Mozilla, and it works today
> in Internet Explorer if you have formsPlayer and ASV
> installed.
> (object/import tags need to be added, but a
> forthcoming version of
> formsPlayer removes this need.)
> 
> The form above is live here:
> 
>  
>
<http://www.formsplayer.com/demo/svg/simple-submit.html>
> 
> so if you have fP and ASV installed you can try it
> now. Try moving your
> mouse over the 'button' (the red square) and seeing
> the hint which includes
> further SVG. Also click on the 'button' to get a
> submit, and see the first
> message -- also with SVG -- followed by the failure
> message (the submit
> won't work).
> 
> And all with no script!
> 
> Regards,
> 
> Mark
> 
> 
> Mark Birbeck
> CEO
> x-port.net Ltd.
> 
> e: [EMAIL PROTECTED]
> t: +44 (0) 20 7689 9232
> w: http://www.formsPlayer.com/
> 
> Download our XForms processor from
> http://www.formsPlayer.com/
> 
> 
> > -----Original Message-----
> > From: Jeff Rafter [mailto:[EMAIL PROTECTED] 
> > Sent: 17 December 2004 17:34
> > To: [EMAIL PROTECTED]
> > Subject: Re: [svg-developers] Re: SVG post server
> request...
> > 
> > 
> > 
> > Here... note, this may or may not work in
> different 
> > implementations and 
> > may or may not let you do cross site posting. It
> depends on 
> > the environment.
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <svg xmlns:xlink="http://www.w3.org/1999/xlink";
> >       xmlns="http://www.w3.org/2000/svg";>
> >    <title></title>
> >    <defs>
> >      <script type="text/javascript"><![CDATA[
> > 
> >        function DoPostComplete(status) {
> >          alert("XML posted - " + status.content);
> >        }
> > 
> >        function DoPost() {
> >          if (typeof postURL=='undefined') {
> >            alert('Sorry, but the viewer you are
> using does 
> > not support 
> > the URL interaction. ' +
> >              'Try updating to a newer viewer.');
> >            return;
> >          }
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
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/
 



Reply via email to