Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing elements inside div tag  RSS feed

 
yuvaraaj mohan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
We are facing a problem in javascript. We created a element using



in the above snippet, 'content1' is the id of another <div> which is declared in our HTML page.




Now, we want to retrieve the text entered inside the text field.

I used document.getElementById('t1').value, eval('t1').innerHTML..... Nothing is working.... Can someone point out the mistake i m commiting.

TIA,
Yuvaraj
 
yuvaraaj mohan
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOLUTION FOUND!!!... My friend onKeyup helped me..........

in javascript,


in html body,


The value is obtained in entVal..........

Yuvaraj
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!