Click to See Complete Forum and Search --> : Table with hidden rows


saintgregor
12-17-2003, 07:05 AM
Hi!

I found some ways to hide certain page elements lately, but none was really the right thing for my case. Maybe someone out there has a proper solution.

I've got a table with a large number of products. The visitors are coming from a page where they indicate their location, so some variable will be sent to the product page (e.g. with the value "dk" for denmark).
Afterwards I would like to put sort of a "tag" to each row of the table - So each row will be displayed just for those visitors where their country code is included in the tag.

I know - stupid solution in the era of databases. But unfortunately this kind of solution is out of the question for our project.

By the way: If it works, will the other rows (with images!) load in the background? Just wondering if it will still be time conuming for people with a slow connection.

Thanks for any help!!

saint

furious70
12-17-2003, 08:05 AM
is this to be written in perl, asp, CF, C??

Why not just use the native language constructs (if's and such) to determine whether you should output the rows based on the cgi var coming in?

saintgregor
12-17-2003, 08:32 AM
fact is that we do have a bloody notes document management running here, that takes care of all web pages. right now they are about to figure out how to send variables from one page to another. let's just assume that there is a variable with the country code.

a javascript solution is definitely the only thing possible for this project.

does this help??

thx.saint

furious70
12-17-2003, 08:38 AM
so this is a static html page? Written in HTML?

saintgregor
12-17-2003, 08:43 AM
yop - notes is very limited in that way.

saintgregor
12-17-2003, 08:51 AM
... but i will check back with the notes experts. is there a better solution in DHTML? (I'm not really familiar with the dhtml possibilities. but it has to be something that works on every browser).

furious70
12-17-2003, 08:54 AM
Where I was going is that I hardly ever write a .html page. We use perl or cold fusion to create html pages. This gives you the ability to do all the cgi processing, database interaction, etc.
I have no idea what 'notes' is. But if you're going to be passing a cgi or some other type of variable, you have to have some other language going on in addition to plain html. That language may have control constructs (if's, loops, etc) that can help you here, rather than javascript.

saintgregor
12-17-2003, 01:33 PM
CF or anything like that is out of the question. maybe it will be a coockie that is sent to the visitor which the product page will read, I don't know...

by "notes" I mean Lotus notes. it has got an integrated document management system and it manages the pages of the website. a link to a non-notes database from our page is not possible for this project and a link to a lotus database is not available either (sounds stupid, I know... this system really sucks...)

so we have to work around and make some all-in-one pages. In the worst case the user has to indicate the location right on the product page - not ideal, but then there will be no sending of variables between the pages.

saintgregor
12-18-2003, 05:37 AM
maybe anyone got a solution for the simple one where the user selects his/her country on a dropdown box right on the page??

i know it's possible somehow, but my javascript knowledge is a bit limited...

thanks!
saint

furious70
12-18-2003, 07:47 AM
using javascript 1.5 you can create objects and append them to an existing page. I'm trying to get some of that stuff working myself though, so I don't feel like I'm qualified. But you'd need to use functions like GetElementByID, CreateElement, AppendChild. Those are some keywords to search for