Rick
asked on
dynamic labels over a chart in gif format
What is the best method & code for displaying text over a Bar chart (in gif or jpg format) on a web page that is entered by the user. The gif file stays the same, however the label at the top and bottom of the chart (gif file) change when the user enters the text and presses a submit button. They can then print out the same chart with different titles? code examples? website examples?
You can do this in IE4/NS4. Is this good enough?
For other browsers you would have to use a <input type=text>. This would give you unformatted text.
yup....
using JavaScript and form boxes (around your bar chart) should do the trick
CJ
using JavaScript and form boxes (around your bar chart) should do the trick
CJ
ASKER
the text will appear "over" a portion of the graphic using your recommendatons? I really need the text to be super-imposed over the text instead of above, below, left, and right. Is this possible by positioning the text in any way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This will work in both IE4 and NS4 only.
ASKER
Rafistern, nice job - thanks, works great! Any easy way to get rid of the borders in the text box?
Here is a different and better way to do this:
<body>
<form>
<input type=text name="title" size=20>
<input type=button value="Update" onclick="document.all.t.in nerHTML=do cument.for ms[0].titl e.value">
</form>
<img src="graph.gif" width=200 height=200>
<div id="t" style="font-weight:bold;po sition:rel ative;top: -180;left: 20;z-index :2">
</div>
</body>
You can put all kinds of formatting into the <div> tag. This is a lot better than the previous version I gave you.
<body>
<form>
<input type=text name="title" size=20>
<input type=button value="Update" onclick="document.all.t.in
</form>
<img src="graph.gif" width=200 height=200>
<div id="t" style="font-weight:bold;po
</div>
</body>
You can put all kinds of formatting into the <div> tag. This is a lot better than the previous version I gave you.
ASKER
Thanks again, this is excellent, works perfect