javascript get sql data

Hi,

I know this is an easy one for someone in the know, so heres the scenario:

Building a small address book/ organiser type site.
Top level of this is a list of addresses
When an address is clicked on we go to the organiser page (using the ID as a qrystring) that has an upload/ download file, todo list, pic viewer and google map with street view.
Got this all working fine, but want the map to auto centre on the address that is relevant.
the page loads with ?AutoID=X so I want to use this var to pull the address so I can geocode it. Baseing the query on this ID will guarantee only 1 record returned.
Ive tried to hold the value in a datagrid and pull it into javascript using document.getElementbyID('<%# gmaps_add %>') and entbyID('<%# gmaps_add{0} %>') but I just dont know enough to think my way out of this one,

If possible, as well as the answer Id love to understand whats happening logic wise.

Thanks

DaveP
LVL 5
gingermolemanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pacemaker9007Commented:
Hi DaveP, you can find a nice example here> http://www.netomatix.com/development/gridviewclientsideaccess.aspx. or you can get the values from the gridview in codebehind and save them in a cookie, which can be used in javascript
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gingermolemanAuthor Commented:
Nice find, the 2 associated articles were also extremely useful
0
gingermolemanAuthor Commented:
Solution from the links is somewhat incomplete. Im unsure as to why (poss update to HTMLTableElement from asp2 to 3.5??), but was constantly getting 'undefined' as the response. Having played about I found that by ammending function getCellValue to
return gridCell.firstChild.nodeValue;
instead of innerText, it pulls the content correctly
0
Pacemaker9007Commented:
I think that innerText does not work in Firefox, only IE, sorry for not mentioning that.
0
gingermolemanAuthor Commented:
aaah, fair enough. Thanks for settling that one for me
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.