php - validation on dropdown in javascript -


i have dropdown named po_no same id coming ajax file

in po_no getting 2 values in format of 1025*3

when put validation on dropdown in javascript write code

if(document.getelementbyid('po_no').value=="")   {  alert("choose purchase order number");  return false;   } 

but code not work plz give me ideas

does javascript run after "po_no" added dom? if runs before, "document.getelementbyid('po_no')" return null.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -