How to use getElementById

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

This is on a content aspx page (this contents ends up in the head section)

var map = new
google.maps.Map(document.getElementById("ctl00_BottomCPH_map_canvas"),
myOptions);





map_canvas is the id of a div element in contents BottomCPH.

It is on the same context aspx page .

The context BottomCPH is defined in a table cell on the master.

By looking at the source I found the name

ctl00_BottomCPH_map_canvas which works OK



I tried making the div runat server and using <'%=map_canvas%'>

but that didn't work.

Would you expect it to work?



Got any suggestion as to what might work other than using the expanded name,
ctl00_BottomCPH_map_canvas?

Also, what is the word I need to describe what happens to the name (better
than expand"?

Something like mangle, maybe.



Thanks
 
thanks
"Segundo Serrano" <sserrano[at]jabs[dot]com[dot]pe> wrote in message Hi,

use <'%=map_canvas.ClientId %'>

Regards,

S.
 
I don't want to put words in your mouth but I believe you were not too
pleased with IE7.
I wonder how you feel about IE8?
 
Back
Top