PDA

View Full Version : Drawing Javascript boxes?


Nomadicus
11-02-2002, 10:03 PM
Is there anyway to draw a simple box using Javascript? I do not see that it has these graphics capabilities. I am trying to get away from using tables (which have their own limitations) and draw my own grids on screen.

PHP has a scripting library to do this, but most commercial web hosts do not provide this library package as a feature. And I see nothing in HTML or CSS that can handle these types of graphics.

chrismiceli
11-02-2002, 11:43 PM
what is wrong with this

-----------------------------------
| |
| |
| Hi |
| |
-----------------------------------

lol :)

joh6nn
11-02-2002, 11:46 PM
no, javascript can't draw lines. but, you could probably get your hosting provider to install the package if you asked.

iceman
11-03-2002, 03:36 AM
Don't know if thisz what yr looking for, but take a look at Dan Steinman's "box widget" at http://www.dansteinman.com/dynduo/examples/boxwidget4-50random.html

jkd
11-03-2002, 04:19 AM
Originally posted by joh6nn
no, javascript can't draw lines. but, you could probably get your hosting provider to install the package if you asked.

... C++ "can't draw lines" either. It requires an external API. In this sense, HTML does not provide Javascript with a suitable one, but you can use Javascript in SVG to achieve this easily.

Nomadicus
11-03-2002, 03:05 PM
I'm sorry, but what is Javascript in "SVG ?" I'm not familiar with that term in regards to JS.

Nomadicus
11-03-2002, 03:08 PM
I did, but they are very slow on upgrades. So it may be time for a new web host. :)

Nomadicus
11-03-2002, 03:14 PM
That looks like a good start! Now if I could just detect the actual mechanism that puts the pixels where they go. It seems to be in the BoxBuild function, but I don't see it as yet, just a bunch of coordinates for the style sheet to work with.

I'll have to tear it apart, reduce it to it's basics (get rid of all that random stuff and other clutter) and solve the mystery. I wish the author had taken more time with good comments on this core function, but I'll figure it out.

Thanks very much.

Nomadicus
11-03-2002, 03:19 PM
Me thinks looking at your solution that I am back in the days of MS DOS, with only a 128 char set! ;)

It's funny that my Turbo C package, from 1988, can handle graphics better than than all our "modern" web tools.