Community > Posts By > Kevin3824

 
Kevin3824's photo
Wed 03/14/07 11:14 PM
Welcome to JSH

Kevin3824's photo
Wed 03/14/07 11:14 PM
Welcome to JSH

Kevin3824's photo
Wed 03/14/07 11:13 PM
Welcome to JSH

Kevin3824's photo
Wed 03/14/07 11:12 PM
Ok here is a test for the guru people here. I am working on a JavaScript
style switcher to allow a person to click a button on my website that
will implement a different CSS stylesheet for them so they can view the
same page with a different size text. It is part ot the accessibility
for the handicapped and disabled.

Here is the code I currently have for the JavaScript switcher:

function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 &&
a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
createCookie("currentstyle", title, 365);
}

function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 &&
a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
}
return null;
}

function getPreferredStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("rel").indexOf("alt") == -1
&& a.getAttribute("title")
) return a.getAttribute("title");
}
return null;
}

function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca;
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return
c.substring(nameEQ.length,c.length);
}
return null;
}

function styleswitcher_onload(){
var cookie = readCookie("currentstyle");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
}

function styleswitcher_unload(){
var title = getActiveStyleSheet();
createCookie("currentstyle", title, 365);
}

// To be run in the dispatcher

function styleswitcher(){

styleswitcher_onload();

var cookie = readCookie("currentstyle");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
}


Can anyone tell me why it is not working? I believe it has something to
do with the title attribute of the link element not being recognized but
am unsure at this point.

Kevin3824's photo
Wed 03/14/07 08:58 PM
Interesting thing though about cookies and sessions. if you were to
disable both of them you would not be able to make any purchases online
at all as the shopping carts need either one or the other to be able to
know what you put in them. Most times you really don't have to worry
about cookies though. The fact of the matter is that when you disable
cookies you can also be disableing other features as well.

An example of that came to mind when reading this posting for me. I am
dealing with a style switcher that is written in JavaScript for my
website that will allow you to change the font size with the click of a
button. What it is really doing is switching out the CSS stylesheet that
your browser uses to determine how the pages are going to be displayed.

It is also useful for the WAI accessibility standards as not only the
handicapped and blind have trouble surfing the web with their screen
readers and braille processors but many of the older generation cannot
see a size 10 font clearly at 1024x768 resolution.

Rathar then disabling cookies you might want to consider just erasing
them by default when the browser window is closed.

Sessions on the other hand are domain specific so whenever you have to
log into a website always log out of it do not just close the window.

Kevin3824's photo
Wed 03/14/07 05:56 PM
come on you know there are several graphics programs out there that work
well Photoshop, Fireworks, Flash, indesign how many do you want me to
list here. If I was you I owuld just get a copy of the macromedia suite
on the yahoo auctions like I did. I got it delivered for 25 dollars to
my door and it contains Dreamweaver 8, Fireworks 8, Flash 8 and a bunch
more as well.

Kevin3824's photo
Wed 03/14/07 05:52 PM
Well if you are looking for help to learn MySQL I would look on their
website it is located at http://mysql.org/ they offer full documentation
on it. If you are looking to learn PHP which is a programming language
widely used on the web and can be used to interface with MySQL
databases I would stick with the books published by O'Reilly

Most people stick with phpmyadmin to do their database work and most
webhosts offer that in their control panle as well although it may be a
version of it that has their logo on it for more info on phpmyadmin
check out http://www.phpmyadmin.net/home_page/index.php

Kevin3824's photo
Wed 03/14/07 05:45 PM
you might want to check out a program called XAMPP it will literally
install MySQL, PHP, Apache, filezilla on a windows based OS. When it is
all done you have yourself a pretty nice webserver and what is known as
a WAMP environment as opposed to a LAMP environment. Currently, Every
website I have ever done is on Linux servers and I am very reluctant to
take a job that requires me to work on a Microsoft webserver. Apache
just does it better faster and more reliably.

XAMPP and Linux are actually still free downloads if I am not mistaken
you only have to pay if you want them to give it to you on a CD.

Kevin3824's photo
Wed 03/14/07 05:38 PM
you are funny squinting your eyes repaired it huh.

I have found that even with a cable modem connection here. I work so
hard and use so much bandwidth in doing so they like to drop my
connection or slow down the download speeds alot. I actually got upset
over having to reboot to get a valid IP address so often I found that
going to the run command prompt and typing in cmd then enter it brings
up a real command prompt where I can type in ipconfig /release then type
in ipconfig /renew will give me a good IP address and I can surf again.
Once I found that out I made up a .bat program to do it and have that on
my desktop works alot better then having to cold boot all the time to
get a new address.

Kevin3824's photo
Wed 03/14/07 02:05 PM
I am single I replaced my ex wife with this pc I am typing to you on as
it is far cheaper to maintain and doesn't talk back either. When it gets
old I will just replace it with a newer model.

Sorry all I could not resist.

I am single but I have very little life outside of working on the web
these days. I come here for the friends and the possibility of meeing
someone compatible with me who shares the same interests as I do.

Kevin3824's photo
Wed 03/14/07 12:13 PM
This site is addicting I am sure she will be back just needs time to
settle.

I was away from this site for a few weeks maybe a month or more lately.
While I did not deactivate, I came back and it seems the site is still
suffering from the same kinds of things it was when I left. People come
and people deactivate they typically come back after time though.

Kevin3824's photo
Wed 02/21/07 12:44 PM
A while back I had a conversation with another member on here that was
into the art of Wiccan. They mentioned that the wiccan websites they
knew of wer shut down and said it was the government saying it was some
sort of security risk or something. Well I just happened accross a link
that anyone involved or who would like to be incvolved with that might
be interested in.

http://r.webring.com/hub?ring=wiccanbusiness

Kevin3824's photo
Wed 02/07/07 09:42 PM
Hello and welcome to JSH

Kevin3824's photo
Wed 02/07/07 09:41 PM
Hello and welcome to JSH

Kevin3824's photo
Wed 02/07/07 09:40 PM
Hello and welcome to JSH

Kevin3824's photo
Wed 02/07/07 09:40 PM
Hello and welcome to JSH

Kevin3824's photo
Wed 02/07/07 09:39 PM
Hello and welcome to JSH

Kevin3824's photo
Wed 02/07/07 09:39 PM
Hello and welcome to JSH

Kevin3824's photo
Wed 02/07/07 09:39 PM
Hello and welcome to JSH

Kevin3824's photo
Wed 02/07/07 09:38 PM
Hello and welcome to JSH

1 2 9 10 11 13 15 16 17 24 25