link div to input text in firefox
- by golf_nut
I'm using google maps api to have a map show up on my website where visitors can also find directions. I have a starting point setup and an end point. Both are text areas. The start is empty, but I want the end point to be populated with the address from a div that I already have in the page. I have the javascript as:
var address = document.getElementById("address").innerText.replace(/\n/g, " ");
It works in Chrome, but Firefox shows the text in the endpoint box as 'undefined.' And Firebug is giving me -
document.getElementById("address").innerText is undefined
[Break On This Error] var address = document.getElementB...ress").innerText.replace(/\n/g, " ");
Any help is appreciated.
Thanks