Watermark using jquery or javascipt

Last Reply on May 16, 2012 12:21 AM By Mudassar

Posted on May 15, 2012 08:04 AM

hi i have three textbox

1.txtcity,
2. txtproduct

3. txtarea

if i type mumbai in txtcity textbox then display the default area in another txtarea textbox(

which is retrieved the area based on city). simpy to say mean same as http://www.justdial.com  search

 

i have done it using server side in asp.net by textchangedevent of textbox but it is taking to refresh the page.

Posted on May 15, 2012 08:05 AM

Refer

http://www.aspsnippets.com/Articles/Watermark-TextBox-using-JavaScript.aspx


Posted on May 15, 2012 12:13 PM Modified on on May 15, 2012 12:20 PM

Thanks for reply Mudassar Ahamed Khan.  I forgot to post  major thing.  value should be retrieved and displayed from database table

Eg.

I have three column in my table

City                companyName                area

Chennai          Reliance                         AnnaNagar

Coimbatore     ChennaiSilk                   Townhall

Coimbatore      PothysSilk                     Gandhipuram

so if i type coimbatore  in onetexbox area name should be displayed in another textbox without refreshing the page by textchanged event in javscript

I have done it on sever side in asp.net.

 

 

 


Posted on May 16, 2012 12:21 AM

Then use WaterMarkExtender control

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/TextBoxWatermark/TextBoxWatermark.aspx