php - selecting field text with javascript -


I'm using code below to select field text with javascript but it does not work much:

// Automatically select field text field to easily coop material = paint document. Getalment BIID ('share_field_ & lt ;? php echo $ id;? & Gt;'); Content.focus (); Content.select ();

To select the field:

// Share field

  echo & lt; Div class = "name" style = "display: none" id = "share_field _". $ Line ['id']. ' '& Gt; & lt; input name = "share" type = "text" value = "http://www.site.com/play/' $ Line ['id']. '"Size =" 53 "> 

I think you should use something like this:

  var content = parent.document.getElementById ('share_field_ & lt ;? php echo $ id ;? & gt; ; ';); Content.firstChild.focus (); content.firstChild.select ();  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -