Image for form submission

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Image for form submission

Jim Menard-2
I'd like to use an image to submit a form---reall, to call the #login
method on self. The image ilives at a fixed URL. The HTML I'm trying
to mimic is

<input id="btnLogin" type="image" src="http://.../foo.gif"
class="btnImage" value="Log In" />

If I wanted to use a text submit button, I would use
    html submitButtonOn: #login of: self.

I don't think that
    html inputWithType: 'image' named: ...
will work for me because then it won't call the #login method, will it?

I've checked my Seaside mailing list archves and Googled, and haven't
been able to find an answer one way or another.

Is it possible, or not? If so, can someone point me to documentation
or post a code snippet? Thank you.

Jim
--
Jim Menard, [hidden email], [hidden email]
http://www.io.com/~jimm
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Image for form submission

Boris Popov, DeepCove Labs (SNN)
I can only attest to the new render canvas protocol, which you can use by
implementing this on your component,

rendererClass
 ^RenderCanvas

Once you do that, here's what you can do to create an image button,

(html imageButton)
  url: (self pictures addToPath: 'login');
  callback: [self login];
  text: 'Login'

Hope this helps,

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jim Menard
Sent: Friday, June 30, 2006 7:23 AM
To: [hidden email]
Subject: [Seaside] Image for form submission

I'd like to use an image to submit a form---reall, to call the #login
method on self. The image ilives at a fixed URL. The HTML I'm trying
to mimic is

<input id="btnLogin" type="image" src="http://.../foo.gif"
class="btnImage" value="Log In" />

If I wanted to use a text submit button, I would use
    html submitButtonOn: #login of: self.

I don't think that
    html inputWithType: 'image' named: ...
will work for me because then it won't call the #login method, will it?

I've checked my Seaside mailing list archves and Googled, and haven't
been able to find an answer one way or another.

Is it possible, or not? If so, can someone point me to documentation
or post a code snippet? Thank you.

Jim
--
Jim Menard, [hidden email], [hidden email]
http://www.io.com/~jimm
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Image for form submission

Jim Menard-2
Boris,

Thank you for your help.

On 6/30/06, Boris Popov <[hidden email]> wrote:
> I can only attest to the new render canvas protocol, which you can use by
> implementing this on your component,
>
> rendererClass
>  ^RenderCanvas

I see WARenderCanvas but not RenderCanvas. I guess I have an older
version of Seaside.

>
> Once you do that, here's what you can do to create an image button,
>
> (html imageButton)
>   url: (self pictures addToPath: 'login');
>   callback: [self login];
>   text: 'Login'

Would that submit the form, including the fields in the form?

Jim
--
Jim Menard, [hidden email], [hidden email]
http://www.io.com/~jimm
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Image for form submission

Boris Popov, DeepCove Labs (SNN)
No, you have the right version. Use WARenderCanvas, as RenderCanvas is my
own subclass of it here internally, my apologies for confusion.

Cheers!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Jim Menard
Sent: Friday, June 30, 2006 7:49 AM
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: Re: [Seaside] Image for form submission

Boris,

Thank you for your help.

On 6/30/06, Boris Popov <[hidden email]> wrote:
> I can only attest to the new render canvas protocol, which you can use by
> implementing this on your component,
>
> rendererClass
>  ^RenderCanvas

I see WARenderCanvas but not RenderCanvas. I guess I have an older
version of Seaside.

>
> Once you do that, here's what you can do to create an image button,
>
> (html imageButton)
>   url: (self pictures addToPath: 'login');
>   callback: [self login];
>   text: 'Login'

Would that submit the form, including the fields in the form?

Jim
--
Jim Menard, [hidden email], [hidden email]
http://www.io.com/~jimm
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

smime.p7s (4K) Download Attachment