?
Solved

dynamic labels over a chart in gif format

Posted on 1998-11-07
9
Medium Priority
?
346 Views
Last Modified: 2013-12-25
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?
 
0
Comment
Question by:rickwinterkorn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 4

Expert Comment

by:rafistern
ID: 1856161
You can do this in IE4/NS4. Is this good enough?
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1856162
For other browsers you would have to use a <input type=text>. This would give you unformatted text.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 1856163
yup....
using JavaScript and form boxes (around your bar chart) should do the trick

CJ
0
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 

Author Comment

by:rickwinterkorn
ID: 1856164
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?
0
 
LVL 4

Accepted Solution

by:
rafistern earned 400 total points
ID: 1856165
This should do the trick:

<body>
<img src="graph.gif" width=200 height=200>
<div style="position:relative;top:-180;left:20;z-index:2">
<form>
<input type=text name="title" size=20>
</form>
</div>
</body>

It works like this. The <div> tag wraps the <input> field. it is placed in a layer over the gif using z-index. Its position (top left corner) is set as "relative" to the end of the gif where it appears in the code by -180 pixels up and 20 pixels right.
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1856166
This will work in both IE4 and NS4 only.
0
 

Author Comment

by:rickwinterkorn
ID: 1856167
Rafistern, nice job - thanks, works great!  Any easy way to get rid of the borders in the text box?
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1856168
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.innerHTML=document.forms[0].title.value">
</form>
<img src="graph.gif" width=200 height=200>
<div id="t" style="font-weight:bold;position:relative;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.
0
 

Author Comment

by:rickwinterkorn
ID: 1856169
Thanks again, this is excellent, works perfect
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question