cmgmyr
-
Posts
1,278 -
Joined
-
Last visited
Never
Posts posted by cmgmyr
-
-
cool, thanks i'll check it out
-
I just made a style switcher for my site and now the page doesn't validate
The site is www.chrisgmyr.com go to the validation results.
here is style-switcher.php
[code=php:0]<?php
session_start();
$all_css = array();
$all_css['default']['file'] = "css/style.css"; // default
$all_css['red']['file'] = "css/red.css";
$all_css['blue']['file'] = "css/blue.css";
$all_css['green']['file'] = "css/green.css";
$all_css['default']['label'] = "Default"; // default
$all_css['red']['label'] = "Red";
$all_css['blue']['label'] = "Blue";
$all_css['green']['label'] = "Green";
$default_value = "default"; // set the default value here
if (isset($_GET['change_css']) && $_GET['change_css'] != "") {
$_SESSION['css'] = $_GET['change_css'];
} else {
$_SESSION['css'] = (!isset($_SESSION['css'])) ? $default_value : $_SESSION['css'];
}
switch ($_SESSION['css']) {
case "red":
$css_file = "css/red.css";
break;
case "blue":
$css_file = "css/blue.css";
break;
case "green":
$css_file = "css/green.css";
break;
default:
$css_file = "css/style.css";
}
function style_switcher() {
global $all_css,$PHP_SELF;
$self = $PHP_SELF;
$stripslash = explode("/", $self);
$self = $stripslash[1];
$style_links = "";
foreach ($all_css as $key => $val) {
if ($_SESSION['css'] != $key) {
$style_links .= "<a href=\"$self?change_css=$key\">";
$style_links .= "".$val['label']."</a>";
} else {
$style_links .= "<span class=\"current\">".$val['label']."</span>";
}
}
return $style_links;
}
?>[/code]
any ideas on what I can do to fix it?
Thanks,
-Chris -
What you could do is have a js.php file the 2 echos in it, then include the js.php into your main file.
-
Why don't you just combine the 2 scripts into 1?
-
Thanks again for the input. I will work on the colors, i'll try and put the style switcher in today. As for the ads...just trying them out, don't really care about the revenue but I didn't have much else to put up there for the time being.
Later,
-Chris -
Thanks for the input!
I think eventually I will put in a style switcher so that if you happen not to like the grey/black you can change it to something that you do like.
I'll do that after I get some content in there though... -
try putting the "I" in lowercase "if"
is something else not working? -
Hey everyone,
I have another critique for you. It is [a href=\"http://www.chrisgmyr.com\" target=\"_blank\"]http://www.chrisgmyr.com[/a] it's my own site...i bought the domain a while ago and haven't done anything with it so I was bored at work today and I threw it together. I know it doesn't have any content right now...but I'll work on it.
Please let me know what you think of the layout/design and anything to improve it.
[a href=\"http://www.chrisgmyr.com\" target=\"_blank\"]http://www.chrisgmyr.com[/a] -
Hey,
I like the overall design, very clean and sleek and orange! I think it's pretty cool.
The only thing that I found is with your "contact us" you have it as a mailto: link ...just make a contact form page. I don't want to wait for my e-mail to open up to tell you something, I just want a form.
But...just my thoughts. I like the page though.
-Chris -
I will work on the navigation more and try and make it all CSS.
I took off the style sheet in FF, what are some ways that I can make it look better when doing this? -
You should look into some AJAX stuff. You can do a collapse and expand (like gmail) with it. There are a bunch of tutorials out there that are simple and easy to follow.
-
Ok cool, thanks.
-
What you can do it put the image in a div, set a hight and width and set the overflow to hidden, then there won't be any scroll bars and the image might be clipped.
[code]<div style="width:100px;height:100px;overflow:hidden;">Img here</div>[/code]
Just replace the px amount with the one that you want.
Hope this helped. -
Hey, Thanks again. I fixed the rollover, and also the "Portfolio" (can't catch them all)
moberemk: what do you mean by DTD? ...sorry
Is there anything else that I should change/add? -
WOW!
Ok guys...After about 5-6 hours of work today I finally finished converting the tables to CSS (On the main page)
Everything works and looks the same on all browsers!
Let me know what you think.
[a href=\"http://syracusecs.com/index.php\" target=\"_blank\"]http://syracusecs.com/index.php[/a]
I will start working on converting some of the content pages from tables to css...there are only a few.
Later,
-Chris -
Thanks for the replys guys, I will make a few changes and post them when completed.
On my way out for now.
Thanks,
-Chris -
Awesome! Glad it worked out for you. :-)
-
I just got done re-designing my website. CSS is good and XHTML strict is good. The only problem is in Firefox...something is a little off with the tables for some reason and I can't quite figure it out.
So here are 2 versions of the site.
No Doc type - Looks ok in all browsers
[a href=\"http://syracusecs.com/index.php\" target=\"_blank\"]http://syracusecs.com/index.php[/a]
CSS good, XHTML strict - OK in IE but not Firefox, Opera
[a href=\"http://syracusecs.com/index-x.php\" target=\"_blank\"]http://syracusecs.com/index-x.php[/a]
Any ideas? Please feel free to tell me what you think.
Additionally...I have been messing around with AJAX and put a few things in the site already.
The forms don't do any validation yet...but they will soon.
Thanks,
-Chris -
try background-color : inherit; instead. This validated and it should give you the same thing as transparent
-
background-color:transparent;
try that and see what happens -
O cool...didn't know you could do that.
What do you know...you learn something new every day! -
Take a look at:
[a href=\"http://www.php-mysql-tutorial.com/php-mysql-paging.php\" target=\"_blank\"]http://www.php-mysql-tutorial.com/php-mysql-paging.php[/a]
This will get you started and you can continue from there -
No problem. AJAX is very cool! You can do a lot of slick stuff with it. That has been one of my more recent projects.
-
You would be able to do this with AJAX. Go to ajaxfreaks.com and read the tutorials.
It's very cool.
confused about php and javascript and ajax
in PHP Coding Help
Posted
For your second question...I really don't know what other programming language you can use, maybe coldfusion...but i don't really know a lot about that. Besided that my best guess would be that you are SOL.
If I come up with anything else I'll let you know