<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I have some javascript that initializes a jsGraphics object when my
taskPane loads. Currently, it loads in a div within the taskPane. And
before the page loads, I have a document.onkeydown and
parent.parent.mapFrame.onkeydown set to a function to capture key
presses and then do something. I have gotten the taskPane to recognize
mouse movements and mouse clicks that are within the mapFrame, and
currently, I use those to draw in the taskPane. I had tried what you
said already, and I found the map table and inserted my own div. To
test at first, I had put some text inside to see where(if at all) it
would show up, and within the 'map' table, it showed up on top of the
map.&nbsp; <br>
<br>
However, if I try to access it dynamically, after everything has loaded
it seems, I cannot. I have something like<br>
&lt;code&gt;<br>
var map;<br>
var divID;<br>
var jg;<br>
.<br>
.<br>
.<br>
function init() {<br>
&nbsp; map = parent.parent.document.getElementsByTagName('frame')[1];<br>
&nbsp; divID = map.contentDocument.getElementById("mapSpace");<br>
&nbsp; jg = new jsGraphics(divID);<br>
}&lt;/code&gt;<br>
<br>
And when my code gets executed, the taskPane turns to a blank page, and
firebug throws numerous errors when I mouseover the map. The error it
seems to be giving me is 'clicked is not defined', which is a global
variable that has been declared and initialized.<br>
<br>
Am I unable to draw in the mapFrame once it has already been loaded?<br>
<br>
Also, somewhat unrelated, is IE7 not able to capture mouse movement or
key presses within the mapFrame from the taskPane? It doesn't seem to
react the same way as Firefox.<br>
<br>
Thanks for any help.<br>
<br>
<br>
Kenneth Skovhede, GEOGRAF A/S wrote:
<blockquote cite="mid:48665277.5090705@geograf.dk" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
What have you tried to do?<br>
  <br>
If you look at the "ajaxmappane.templ" you can see how the mapFrame is
constructed.<br>
It is actually a table, so you may want the item "map" (a cell) or the
item "mapSpace" (a div).<br>
  <br>
As long as you taskpane file and the mapframe is served from the same
server, there should be no problems.<br>
  <pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
  </pre>
  <br>
  <br>
Jonathan Manafi skrev:
  <blockquote cite="mid:48656929.2040308@cctechnol.com" type="cite">
    <meta content="text/html;charset=ISO-8859-1"
 http-equiv="Content-Type">
Has anyone ever tried this or have any suggestions?<br>
    <br>
    <br>
J Manafi wrote:
    <blockquote cite="mid:18098792.post@talk.nabble.com" type="cite">Does
anyone know how to gain access to divs in the mapFrame from a taskPane
php file? I am trying to use the jsGraphics library to draw on top of
the map, but I cannot gain access to any div for drawing. I am able to
have my mouse movements tracked within the map, but I am currently
restricted to drawing within the taskPane. <br>
      <br>
Has anyone else ever tried this? <br>
      <hr align="left" width="300">View this message in context: <a
 moz-do-not-send="true"
 href="http://www.nabble.com/gain-access-to-mapFrame-divs-for-javascript-drawing--tp18098792p18098792.html">gain
access to mapFrame divs for javascript drawing?</a><br>
Sent from the <a moz-do-not-send="true"
 href="http://www.nabble.com/MapGuide-Users-f14845.html">MapGuide Users
mailing list archive</a> at Nabble.com.<br>
      <pre wrap=""><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
    </blockquote>
    <pre wrap=""><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
  </blockquote>
</blockquote>
</body>
</html>