Closed Thread Icon

Preserved Topic: A practical application of insertRow() and deleteRow() Pages that link to <a href="https://ozoneasylum.com/backlink?for=18193" title="Pages that link to Preserved Topic: A practical application of insertRow() and deleteRow()" rel="nofollow" >Preserved Topic: A practical application of insertRow() and deleteRow()\

 
Author Thread
DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 06-03-2002 02:18

OK, this is fun, and the story is kind of amusing. I'm doing some work for a company, a joint venture between two *very* big swedish companies, where I've been hired to create the "web interface" templates for this system they've built for helping old people live at home longer, and also for helping people in elder-care facilities do their jobs better. There's a whole *bunch* of stuff related to this, but at it's core there are 3 systems, "Access", which controls all of the automatic door locks and such, with different permissions for everybody (nurses can get to the meds cabinet, flaky nephew cannot, etc...) Then there's the "Information" part, where they write weekly letters on what's going on, with diferent levels of people doing there own things, and then finally the "Monitoring", aspect: ie: all the old people wear special bracelets monitoring vital signs, doors and lghts and all sorts of other things get monitored 24 hours a day.

ANYway, it's a fun project, and I know the intended audience very well, (they'll *all* have to use IE5.x or better!) and now I need to make an inteerface that can do anything for anybody, anytime. It has to be able to support infinite levels (not really, but deep) navigation, so I chose to try working with InI's insertRow() function.

What was even cooler is that they know all about this place, and all you lunatics. I got special permission to show you versions of the templates before they get launched, although they asked me to strip the logo for now. Here's where I'm working...

Link: http://www.bigbonfire.com/ <- Finally! A use for this domain.

Any clues on just what will happen with the insertRow() function on older browsers? How far can I go back with this? I'm up working all night, now I'm going to pause the menu and do the "change colors and font size" functions. Comments and advices appreciated!

Your pal, -doc-

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-03-2002 02:33

If insertRow is a W3C recommendation, then I doubt it goes earlier than IE 5. Opera probably doesn't support it, Netscape Nav 4.x definitely doesn't. Mozilla probably does.

Hmm, I seem to have clicked something that killed the menu bar, and since I can't speak this language, I can't figure out how to get it back... =) Ah! reload.

Hmm, are you aware that when two rows are showing, and you click "Logg" in the upper row, the lower row disappears?

Otherwise, this is really interesting... you using style sheets for this?

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 06-03-2002 02:48

The "Logg" function is just where I chose to test the "killRow()" function, it gets over-excited, heh. The code for it is really simple, and only uses one stylesheet, the rows get written or deleted on the fly, using naught but javascript. It sems to work in Mozilla, but of course explodes in Opera (no surprise there, really.) They'll be using this in a controled environment, so we get to specify which browsers they can use, if they don't have the right one, they need to install it as part of the package! I'm having fun with this, I'm not used to not having to worry about this stuff. Here's the code that does all this...

where=1;
function loadMenu(which){
if (where>1) killRow();

// load objects..
url="/templates/subMenuOptions/"+which+".shtml";
document.tempText.document.body.innerHTML = ""
if(document.getElementById) { document.getElementById('tempText').src = url; }
checkVar();
// end load
}
function checkVar() {
if(document.tempText.document.body.innerHTML != ""){
clearTimeout(checkTime); loadMenu2(); }
else { checkTime = setTimeout('checkVar()',25); }
}
function loadMenu2(){
eval("tempMenuArray = new Array("+document.tempText.document.body.innerHTML+")");
T = document.getElementById("mainTable");
where++;
newRow = T.insertRow(where);
newRow.className="subMenu";
newRow.insertCell(0);
bTable = "<table id=table"+where+" height=21 cellpadding=0 cellspacing=0 border=0><tr>";
for(x=0;x<tempMenuArray.length;x++){
bTable += "<td class=subMenu onMouseover=this.className='subMenu_over' onMouseout=this.className='subMenu'>"+tempMenuArray[x]+"</td>";
}
bTable += "</tr></table>";
newRow.cells[0].innerHTML = bTable;
}

function killRow() {
T = document.getElementById("mainTable");
T.deleteRow(where);
where--;
}

I'll be working on it a bit later this evening, for right now the options it works from are pretty static, it's just a "proof of concept" so far. I grab the values for what those buttons are going to be from an external file, so this thing ought to be pretty scaleable, they plan to do strange things to it after my part is done, heh.

Your pal, -doc-

InSiDeR
Maniac (V) Inmate

From: Oblivion
Insane since: Sep 2001

posted posted 06-03-2002 03:31

That story wasn't really amusing doc

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 06-03-2002 03:53

Sorry, it's late. The amusing part was that I received special dispensation from a bunch of (otherwise) corporate suit types to share the work with a bunch of lunatics before it got launched. These are *big* secrecy types, I've had to sign several different NDA agreements, and there's a special section specifically allowing me to share the work with the OzoneAsylum. I guess maybe I'm just easily amused.


Your pal, -doc-

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 06-03-2002 08:17

The Asylum get's given special clauses in legal documents! Way cool.

Very interesting menu concept. So there's no limits as to how deep this can go eh?

Oh, you mentioned this was only for IE 5.x + Yah?

Well, if the site will remain liquid like it is now then it'd look a tad prettier if you killed the main document scrollbars. There's an IE only <body> property to swith them off no regardless of the size of the page:

<body scroll="no">

Just a suggestion as you've still got a disabled scroll bar sitting there which often confuses me in sites like this. I keep reaching for the outer most scroll bar by default only to realise it doesn't actually get used. Removing it make my brain a tad happier. But that's just me.

I'm also impressed at how you managed to use red and green togther while not making me think of christmas. I've never been able to do it!

[This message has been edited by Dracusis (edited 06-03-2002).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-03-2002 08:25

Aha! But if you really didn't think of christmas, then why did you post that? =)

Besides, it's sort of a puke green color anyway, not really christmassy green.

BTW, Doc, if and when you post this in site reviews, I have a few things to say about various stuff to think about in the future, but in the meantime I'll hold it in since that's not what this thread is about =)

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-03-2002 18:29

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu