textarea and javascript -


I am trying to set text while loading a php file ... I am doing something like this

var a = document.getElementsByName ('Inquiry'); a.value = 'Pedingo de Information Day Preso, Relative Ao Products: http://www.musicland.pt/musicstore/product_info .php? Products_id = 2581 '; & lt; / scripts & gt; "; ? & Gt;

Now I know that it is silly but this is just a lesson I want to make an evaluation first and if there is an ID then fill in the text field

Generated source has corrected it and does not contain JavaScript errors, but textera is empty.

I can not understand !!

Can someone help me

getElementsByTagName Gives a live node list. If your element has an ID, then use getElementById if you want it to be done on many elements in the node list, then use to loop .

  var a = document.getElementById ('Inquiry');  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -