/    Sign up×
Community /Pin to ProfileBookmark

Table with hidden rows

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

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@furious70Dec 17.2003 — 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?
Copy linkTweet thisAlerts:
@saintgregorauthorDec 17.2003 — 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
Copy linkTweet thisAlerts:
@furious70Dec 17.2003 — so this is a static html page? Written in HTML?
Copy linkTweet thisAlerts:
@saintgregorauthorDec 17.2003 — yop - notes is very limited in that way.
Copy linkTweet thisAlerts:
@saintgregorauthorDec 17.2003 — ... 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).
Copy linkTweet thisAlerts:
@furious70Dec 17.2003 — 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.
Copy linkTweet thisAlerts:
@saintgregorauthorDec 17.2003 — 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.
Copy linkTweet thisAlerts:
@saintgregorauthorDec 18.2003 — 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
Copy linkTweet thisAlerts:
@furious70Dec 18.2003 — 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
×

Success!

Help @saintgregor spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...