Passing id's between entities

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

Passing id's between entities

Richard Huxton
I'm building a series of fairly nondescript <label for="X"><input
id="X"> tags. The problem is of course setting the "for=". The only way
I've got working so far is:
   lbl := html label.
   tid := lbl ensureId,'ctrl'.
   lbl for: tid; with: label.
   ti := html textInput id: tid;...

So, that gives us something like "id27ctrl" for the <input>. Now, I want
to layout the labels separately from the inputs so I can't just embed
the input inside it and it's fiddly to have the label following the
input and then position it to the left. Am I missing something obvious here?
--
   Richard Huxton
   Archonet Ltd
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Passing id's between entities

Michel Bany

On 16 May 2006, at 19:27 , Richard Huxton wrote:

> I'm building a series of fairly nondescript <label for="X"><input  
> id="X"> tags. The problem is of course setting the "for=". The only  
> way I've got working so far is:
>   lbl := html label.
>   tid := lbl ensureId,'ctrl'.
>   lbl for: tid; with: label.
>   ti := html textInput id: tid;...
> So, that gives us something like "id27ctrl" for the <input>. Now, I  
> want to layout the labels separately from the inputs so I can't  
> just embed the input inside it and it's fiddly to have the label  
> following the input and then position it to the left. Am I missing  
> something obvious here?
>

I'm not sure this will help, but you may want to have a look at these  
methods in the classic renderer

#label:input: and #labelAfter:input:

Michel

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