Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Placing HTML line and rectangle shapes to X1y1X2Y2 coordinates within one HTML table cell

Posted on 2011-09-10
9
Medium Priority
?
421 Views
Last Modified: 2012-05-12
I have an HTML table with cells containing various types of content. In ONE large cell, I need to place some line rectangles, and some arrowed lines, arranged as a flowchart. Lines
start at the edge of defined rectangles and terminate, with an arrow head, on the edge of other rectangles.  The xy coordinates of each rectangle and line are known, referenced to a corner of the cell. How do I write this HTML?

Thanks, Kelvin4
0
Comment
Question by:Kelvin4
[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
  • 2
  • 2
9 Comments
 
LVL 17

Expert Comment

by:OmniUnlimited
ID: 36515981
My guess is that if you want to do this nicely, you will need to use images.  Is there a reason you couldn't make up the flowchart in some graphics program, say Photoshop or Illustrator, and simply place the image inside your large cell?

Or is this something that you are trying to change dynamically?

Either way, I'd say you would have to use images to acheive this effect.
0
 
LVL 40

Assisted Solution

by:Gurvinder Pal Singh
Gurvinder Pal Singh earned 2000 total points
ID: 36515982
rectangles and arrows can be achieved by giving borders to divs
0
 

Author Comment

by:Kelvin4
ID: 36516017
Thanks, Omni..
I agree with your core response, however, as you suspected, I AM working with dynamic data-driven content, so images are not a solution in this case. A high level of artistic precision is not required.

The number and position of each element varies and can only be defined by coordinates.  HTML and other content data is packaged as ASCII code into json, and sent off to a functional web-based DB which unpacks the data and renders it as the HTML I now need to write, so it appears in the browser.

Thanks, Gurvinder:
I have been trying to find HTML examples of using div borders in cells in the way you indicate, but my searches were ineffective. Can you reference or send me an example, please?

With appreciation for your rapid responses..
Kelvin4
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 2000 total points
ID: 36516028
it should be that complex

<div class=rectangle/>

.rectangle
{
   width:100px;
   height:100px;
   border: 1px solid #000;
   background-color: pink;
}

similarly for arrows
see this link http://www.w3schools.com/css/css_border.asp

0
 
LVL 17

Expert Comment

by:OmniUnlimited
ID: 36516054
OK, so I take it from your response that the json packet contains x,y coordinates that have to be translated into your td?  How are you handling this?

Do rectangles have four sets of coordinates?  The lines two?  What sort of coding do you put for the direction the arrow is pointing?  Are rectangles and lines the only flow chart shapes you are using?

What sort of scripting language do you have available to generate your HTML?  PHP has some imaging capabilities using coordinates.
0
 

Assisted Solution

by:Kelvin4
Kelvin4 earned 0 total points
ID: 36516185
Thanks, both.
Omni: we can interpret any HTML shape, including lines with right angle bends in them, polygons, etc. So its just the HTML syntax within a cell that I think I seek. The scripting language is flexible and simple.

Curvinder: Thanks for code and link. I will take a look through the site, run a test today and report back.

Ta for now -
K
0
 

Author Comment

by:Kelvin4
ID: 36516315
Hi Curvinder:
My HTML is weak:
Here is the HTML for a small table. I want to position a graphic in the cell labelled "Graphic here", at a specific px position from the top left corner of that cell, say 30px right and 20px down.

Could you enter your div-based syntax into the HTML below, so I can see how to use the HTML effectively?

<table border="1">
<tr>
  <th>Header</th>
  <td>Item A</td>
</tr>
<tr>
  <th rowspan="2">Graphic here</th>
  <td>Item B</td>
</tr>
<tr>
  <td>Item C</td>
</tr>
</table>

With many thanks
Kelvin
0
 

Author Closing Comment

by:Kelvin4
ID: 36553411
Thanks Gurvinder,
I'm going to close the question here and submit a further question which is a bit more detailed and hopes you will fit your div solution (above) within the framework of my simple HTML tags (above). Can you help me further
Regards,
Kelvin
0
 

Author Comment

by:Kelvin4
ID: 36550866
ok by Kelvin
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

604 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