[Seaside] NAME attribute over-ride for dynamic HTML

Romain Robbes romain.robbes at lu.unisi.ch
Fri Oct 22 09:53:52 CEST 2004


	Hi Bob,

I think you can freely use the id attribute instead of the name one.
Then in javascript you can use document.getElementById(id) to access
the html element you need.

Cheers,
	Romain

On Oct 22, 2004, at 5:53 AM, Robert Hawley wrote:

> I have been doing some dynamic HTML driven from seaside.  In order to 
> be able to do things like animate web page components I have written 
> JavaScript code that gets downloaded to the web page.  It works well 
> and I can do things like drag an image around a web page and see it's 
> coordinates changing. However, I have a problem that is to do with the 
> way seaside allocates names to HTML components that makes scripting 
> hard for getting the new coordinates back to the server.
>
> Seaside's naming is done behind the scenes and is subject to change 
> whenever the programmer adds or removes components from the web page.  
> Seaside allocates names sequentially: <INPUT NAME="1"....> <INPUT 
> NAME="2"....> etc..  If I use my own (meaningful) naming however, then 
> both names are downloaded so currently I get things like <INPUT 
> NAME="XPOSITION" NAME="1" ....> and in this little clash seaside wins! 
>  Depending on seaside's naming convention could allow something of a 
> work-around, but it is not a good solution because it is vulnerable to 
> changes and it makes the JavaScript (even more) unreadable.
>
> It would be good if seaside could detect when the programmer has 
> already set a 'name' attribute and use that name instead of the 
> automatically generated one.
>
> I would welcome a 'fix' - or at least some advice on where to start 
> looking.
>
> Yours
>
> Bob
> (Robert Hawley - Plymouth)
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>



More information about the Seaside mailing list