C o o k i e s A n d M i l k?

B i g   Q u e s t i o n s - L a r g e r  T h a n  A v e r a g e  R e w a r d

Many questions to follow:  

I have constructed and will be maintaining www.petroleum.org.  The site will be a "Start" page for the petroleum industry.  I have the site devided into 2 sides.  One side being standard html and the other being shockwave.  You will notice that I started with a splash page to introduce the site.  Would/do I need to divide the site into IE4 capable, NS4 capable install a sniffer and then branch to the shockwave?

1.  I would like to give the user the opportunity to select his desired means of browsing, html or shockwave.  I have done this by already but would like to improve on what I already have.

2.  I would like to set a cookie so that when the user comes "home" he will be directed to the area he choose to "subscribe to".  The user will also need to be able to reset their cookie, so that they can make a change to the way they view the site.  I have in no way the comprehension on how to write the cookie, where to place it on my server, download it to their machine, ect.  What I will need is VERY specific instructions on how to do this to include a working example of the code and where to place it within my splash page html.

3.  Under IE4 the splash page buttons are the same size.  In NS4 the stanard html button/link is larger.  I can't figure out why.  Please help.

4.  Would it be better to sniff the browser and reload the window to send the browser to the proper "side" of the site?
If so, please include the html/script that will sniff the browser, java settings, resolution and colors if all that is possible.  I have used another popup window on another site I manage that sniffs the browser.  Will this be effiecent enough (www.odp-inc.com)

5.  I need a better way to manage the menu so that it doesn't reload the menu each time a user selects an item in the menu.  I think an include tag or something like this will work.  I would like the site menu to actually be like MSNBC's site menu (www.msnbc.com) where a click expands and passes the menu to the right of the upper level menu.  Please include the html/script to accomplish this.

6.  You will notice the stock ticker at www.petroleum.org is pretty generic.  The reason it is this way is because you don't have the cookie I received from the server that sets it for me.  I would like to take my cookie (on my local pc) which configures the ticker for the petroleum industry portfolio and set it in the visitors browser so they see the ticker that I want them to see.  Is it safe to upload my cookie to my webserver call it and have it set the cookie on your machine?  Can this be done and how?

8. I also need a one time constructive critic of the TOTAL SITE, its design, colors, flaws, merits, etc.  I do not want to hear it looks bad... it looks good... it sucks.... When anwsering please include your browser type and resolution/colors(hence the large reward of 500 pts, to the individual who awnsers my question completely)

Thank you much in advance.

Who is Participating?
Following is some javascript you can use to manipulate cookies on the client side. Connect to the onclick event of your interface elments that control the user choices.  the cookie lives on the client.  It gets sent to the server.  You can see it in Request.Cookies("PRESENTATIONMODE")

<script language="JavaScript">
// Use this function to retrieve a cookie.
function getCookie(name){
var cname = name + "=";              
var dc = document.cookie;            
    if (dc.length > 0) {              
    begin = dc.indexOf(cname);      
        if (begin != -1) {          
        begin += cname.length;      
        end = dc.indexOf(";", begin);
            if (end == -1) end = dc.length;
            return unescape(dc.substring(begin, end));
return null;

// Use this function to save a cookie.
function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) + "; path=/" +
((expires == null) ? "" : "; expires=" + expires.toGMTString());

// Use this function to delete a cookie.
function delCookie(name) {
document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";

function removePlusSigns(name){
var strTemp = "";
var i = 0;            

    for (i = 0; i < (name.length); i++)      
            if (name.substring(i, i+1) == "+")
            //if (name.substr(i, 1) == "+")
            {      // A '+' was encountered, substitute a space.
                  strTemp+= " ";
                  //strTemp+= name.substr(i, 1);            
                  strTemp+= name.substring(i, i+1);
            }      // end else            
return strTemp;
}      // end removePlusSigns

// end of  Cookie functions -->

// use this var for expires if you want a 30 day timeout set.
var exp = new Date();                                  
exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 31));

function setPresentation(argPresentation) {
    if ( argPresentation == "HTML") {
        setCookie("PRESENTATIONMODE", "HTML");
    else {

<!-- put this where the users can select their options -->
<form name="something" action="canbeAdummyNameIfThereIsNoSubmitButton">
<input type="button" name="whatKindOfPage"
value="Click Me For ShOCkwave Pages"  onclick="setPresentation('Shockwave')">
<input type="button" name="whatKindOfPage"
value="Click Me For HTML Pages"  onclick="setPresentation('HTML')">

The first page you send them could then be the HTML version
<html><head><title>Home page</title</head>
<!--- inline script gets executed immediately --->
<script language="javascript">
    document.location.href = "http://server.com/theshockwavepage"
<!--- other normal body content --->


kpaulkAuthor Commented:
Edited text of question
kpaulkAuthor Commented:
Edited text of question
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

kpaulkAuthor Commented:
Edited text of question

A word of advice - the points for this questions are most generous, but it's unlikely you're ever going to get any answers.
Think about it, do you really think mad cookie experts are good
at judging the usability of a site, or talented artists know all the technical differences between NS and IE? Splitting this question into 5 pieces would make a lot more sense. Also, the number of answers/comments for this question will quickly become unmanageable.

Concerning the cookies - I suggest you do a quick search on the net and read some of the excellent documentation that's available. Do you really want to deploy technology on a site you're responsible for without understanding it? Also, there are usually 20 different ways of solving a problem. Without all the background, it's quite possible you'll choose a solution that will be incompatible with long term goals.

More generic advice - do you really want to maintain every page in 185 versions (IE3,4, NS3,4, ShockWave/HTML, plus a slew of
the less popular browsers)? That is an incredible amount of work.
Using the lower (not lowest) common denominator (i.e. versions 3+ or versions 4+) is probably a much better option. Keep in
mind that both technology and content rapidly change.

More to the point - saving the HTML/ShockWave preference in a cookie is not a bad plan. Replace your homepage with a CGI program that reads the cookie and redirects the browser to the correct homepage for HTML or ShockWave.

Concerning point 4 - do you really want to take the users screen resolution into account? If your site has more than half a dozen pages, you've either got too much time or a very large budget. The standard these days is 800x600 with 256 colours.
Besides, not everyone likes having their browser maximized.

I'm quite sure the experts here will be happy to help with all the issues you listed, but in the current form it's rather overwhelming. Don't get me wrong, I'm not trying to be negative.
I took a quick peek at the site and graphically it looks great.


Just a comment:

Visited your site.  and WOW!  The graphics look wonderful.  I am using IE 4.x w/ 1024x768 screen @ 16bit color.  A suggestion though may be to remove the top graphic.  I think that the large "PETROLEUM.ORG©: Indstry Headquarters" with the cicle behind is enough at first.  It seems a little crowded there at the top.  Also would recommend removing the "Experience PETROLEUM.ORG" at the top.

The bottom "bar" is a very good idea. I would however, remove the "version 2.2" from it because it gives the people a "computer" like interface.  You want to get your visitors to "get into" the site and people, even the ones surfing the net, seem to shy away from computer stuff.  

Ticker is good.  May be able to configure the colors?  Not sure if you can.

Also, a not about the graphic right above the ticker.  It doesn't fade very well with the background on the left.  It is too light over there.  

Also, the link in the bottom left of the bar, when clicked, pops up a new window.  ou need to cnahge content1 to main in your frame definition page.  

Personally would not use the "mouseover" buttons on such a professional site.  To me, they look a little tacky.

Visited the site.... The menu, like you said, doesn't need to reload.  This about frames?  Maybe something like @ microsoft's site.

On the shockwave version... VERY Good animation... I like that a lot.  Maybe have the menu automatically opened.  kind of hard to find if you do not know what you are looking for.  Also, help at bottom right is a little hard to find.  I just accidently ran my mouse over it.

Hope this helped a little.

- Matt

kpaulkAuthor Commented:
Thank you for your comments.  Taking everything into consideration that everyone so far has mentioned.  I did make some changes, but my questions still really haven't been awnsered.  I suppose the most important questions that I have concern the cookie and the different size of the two round buttons on the splash page.

Thank you again
What type of server is this running on?
kpaulkAuthor Commented:
Compaq Alpha running Digital Unix 4.0; Apache Ver. 1.2.6 Frontpage Extensions up to date. The site is hosted via Mindspring.  I have about 99.9% access to all areas of the hosted site.  I do have access to run perl, cgi, and other scripts and programs.  =)  I think..


Hmm I was going to say that if you had ASP, I could help with the cookies, but I am not well versed in other internet languages.
kpaulkAuthor Commented:
Nope, I don't have ASP capabilities as of yet.  I have been begging Mindspring to install ASP functionallity.  
kpaulkAuthor Commented:
Is anyone going to try and awnser this question?  If not is it possible to get the points back?
Yes, you can get the points back by
1) waiting till it falls off (after ~ month)
2) send a message to linda in the experts exchange forum and tell her to remove question Q.10099425

PS.  I forgot in the setPresentation function,  include the 3rd argument to setCookie to make it live for 30 days.


Note the var exp has been iniitalised to now + 30 days for you.

kpaulkAuthor Commented:
I'll try it out eventually...sorry took me so long to get back to you.  Thanks for the help.  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.