I find some bug in phptal, i have such as input:

<input tal:attributes="onfocus php:nick?false:'this.value=\'\'';onblur php:nick?false:'if(this.value==\'\') this.value=\'Nick\'';value php:nick?nick: 'Nick'" type="text" name="nick"/>

When nick variable isn't false - in php I have: $tal->nick=(isset($_COOKIE['nick'])?$_COOKIE['nick']:false);

this input value is this nick, otherwise value of it is "Nick" an when you focus it, "Nick" disappear, and when you blur off it, and value of it is null, "Nick" text appeat. But it isn't work good - when nick variable isn't set, this input looks like this:

<input type="text" value="Nick" onblur="if($ctx->this->value=='') this.value='Nick'" onfocus="this->value=''" name="nick"/>

Dotts are replaced to ->, an $ctx-> appeared. This is a bug of phptal, or i do something wrong?


cheers!
szymek

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to