
March 24th, 2007, 10:54 AM
|
|
Contributing User
|
|
Join Date: Mar 2007
Posts: 67
Time spent in forums: 15 h 51 m 40 sec
Reputation Power: 7
|
|
|
Get text string from div
i am trying to create a search indexer for my site. but i use php to include the menus and header on every page, so it automatically adds links from those to the index db. i am trying to use javascript to get all the text from a div i specify using id's. the following code gives me an error message:
'd has no properties'
Code:
function getText(divname)
{
d=document.getElementById(divname);
return d.value;
}
what can i do instead to get all the text from a div?
|