Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Place an Image at a specified coordinate 3

Status
Not open for further replies.

rbri

Programmer
Jun 27, 2002
84
US
Hello Everyone

I am new to javascript and I was wondering is there a way to add an image at a specified coordinate value. For example add an image at x=100 and y=75. What I am trying to do is create a graph by using an image of a dot in jpg format. I thought that if I could place an image at a specific coordinate value the images would look like a graph of points.

Thanks in advance for any help.
Randy
 
faq216-3516

-pete
I just can't seem to get back my IntelliSense
 
Randy,

using CSS:

<img src=&quot;myImage.jpg&quot; style=&quot;position:absolute; top:75px; left:100px;&quot;/>

or javascript:

<img src=&quot;myImage.jpg&quot; style=&quot;position:absolute;&quot; id=&quot;img1&quot;/>
<script type=&quot;text/javascript&quot;>
var oImg = document.getElementById(&quot;img1&quot;);
oImg.style.top = &quot;75px&quot;;
oImg.style.left = &quot;100px&quot;;
</script>

=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
Pete, I'm flattered you remembered that. Thanks!

Randy, the function in the FAQ allows you to build whatever kind of chart or graph you like, and then display it. You can populate the grid using whatever colors you want.

You can probably modify this code such that it'll produce whatever page you want. In the example, it just puts a bit of text in there, but there's no reason you can't produce an entire page filled with charts and graphs and whatnot. All produced dynamically.

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Thank you to everyone for your help. That's exactly what I'am trying to do.

Thanks Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top