• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
Code outside of functions is run when it's <script> tag is parsed, so code in the <head> won't be able to see the values of elements in the <body>, because they don't exist yet. That's why you should setup your globals and such on "load" (or on DOMContentLoaded), and by using addEventListener, instead of "onload".
[QUOTE=TheDecryptor;31872539]Code outside of functions is run when it's <script> tag is parsed, so code in the <head> won't be able to see the values of elements in the <body>, because they don't exist yet. That's why you should setup your globals and such on "load" (or on DOMContentLoaded), and by using addEventListener, instead of "onload".[/QUOTE] this man is correct. it's why you guys are encouraged to wrap everything in $(function() { ... }); when using JQuery (because you "don't need to know js for jquery" :rolleye:)
Is Linode a good choice for a first VPS?
[QUOTE=Epic Sandwich;31877422]Is Linode a good choice for a first VPS?[/QUOTE] Expensive, but they're pretty reliable and fast. I hear the support's good too.
I would recommend FanaticalVPS.
[QUOTE=pdkm931;31877807]I would recommend FanaticalVPS.[/QUOTE] FanaticalVPS or BuyVM. If you really don't need a VPS though, I'd actually recommend checking out NearlyFreeSpeech.
The thing that made me think about Linode was what I read about the control panel; it looks pretty good for a Linux newbie like me, seeing as I actually want to learn how to use it properly. The fact it's a bit more expensive isn't really an issue, however I do realise that you can get the same sort of concept for cheaper though. I've always heard good things about fanatical though, so I may use linode for a month or two then swap to something a bit more unmanaged - like fanatical.
[QUOTE=Epic Sandwich;31879712]I've always heard good things about fanatical though, so I may use linode for a month or two then swap to something a bit more unmanaged - like fanatical.[/QUOTE] What? Linode is as "unmanaged" as it gets.
[QUOTE=vepa;31881434]What? Linode is as "unmanaged" as it gets.[/QUOTE]By me liking the control panel, I meant I liked the ability to change things like distros and disk images with a button. I know that it's un-managed in the conventional sense.
[QUOTE=Epic Sandwich;31881753]By me liking the control panel, I meant I liked the ability to change things like distros and disk images with a button. I know that it's un-managed in the conventional sense.[/QUOTE] Pretty much any decent VPS host will have some sort of control panel that will let you reimage the VPS, etc. Linode does have some less common features like LISH though (direct tty access to the VPS through either a web console or SSH).
So I'm going to start out small with html again to have something to do but it was like 1 year ago I had it in school and I need my memory refresh again with codes and shit. If I remember right this is a good site to find the right help or what to say [url]http://w3schools.com/default.asp[/url] Or is it a better site to look at? I know like basic html but still need some help to remember.
I don't see a problem with that site, lots disagree though but I am unsure as to why.
Obligatory w3fools.com Try htmldog.
Is there anyway to get a template that is even remotely good, for a gaming website?
[QUOTE=ChloeBlackSythe;31886502]Is there anyway to get a template that is even remotely good, for a gaming website?[/QUOTE] It differs the way you took at it. try [url]http://themeforest.net/[/url]
Well, looking at that website you have to pay, and i have no money so...?
then you're out of luck...?
free 'gaming' templates look cheap as hell
I just googled free gaming templates and look what i found. [url]http://www.clantemplates.com/templates/counterstrike_s_Orbic/OrBic.html[/url] [img]http://www.facepunch.com/avatar/65691.png[/img] [quote]Thank you for choosing this template. You are free to change everything except the Author info on the bottom. In order to use this template , you must keep the author info and one of the affiliates buttons somewhere on your site with a link back to [url]www.ClanTemplates.com[/url] . If you need any help with this template, feel free to email me at [email]stinkyjoe@gmail.com[/email] or visit the ClanTemplates forums. Enjoy! - StinkyJoe[/quote] Here are some good templates [url]http://www.clantemplates.com/free_templates/author/1852/[/url]
[QUOTE=zzlawlzz;31889582]I just googled free gaming templates and look what i found. [url]http://www.clantemplates.com/templates/counterstrike_s_Orbic/OrBic.html[/url] [img]http://www.facepunch.com/avatar/65691.png[/img] Here are some good templates [url]http://www.clantemplates.com/free_templates/author/1852/[/url][/QUOTE] everything.... is an image :suicide:
[QUOTE=Alcapwne;31889685]everything.... is an image :suicide:[/QUOTE] I know, but he has total of 39k downloads.
I don't usually ask for help but I'm stumped as to how to approach this. I'm building a back-end to a website, and I can't seem to figure out how different items in the navigation bar highlight differently according to the page it's on. I want to make one navigation bar template, and have all the pages on the site use it, but will only highlight a certain item on it. Sounds simple enough, but I haven't done anything like it. I would prefer a PHP method.
[QUOTE=Lequinx;31889764]I don't usually ask for help but I'm stumped as to how to approach this. I'm building a back-end to a website, and I can't seem to figure out how different items in the navigation bar highlight differently according to the page it's on. I want to make one navigation bar template, and have all the pages on the site use it, but will only highlight a certain item on it. Sounds simple enough, but I haven't done anything like it. I would prefer a PHP method.[/QUOTE] I'm not sure exactly what you're asking but I'm sure you'd have to use PHP along with javascript if you wanna do it the PHP way actually wouldn't just doing it in css just be best?
I don't know javascript.. Just a lot of PHP and a little CSS
[QUOTE=Lequinx;31889764]I don't usually ask for help but I'm stumped as to how to approach this. I'm building a back-end to a website, and I can't seem to figure out how different items in the navigation bar highlight differently according to the page it's on. I want to make one navigation bar template, and have all the pages on the site use it, but will only highlight a certain item on it. Sounds simple enough, but I haven't done anything like it. I would prefer a PHP method.[/QUOTE] [code] $page = 0; switch ($_SERVER['PHP_SELF']) { case "/index.php": $page = 1; break; case "/otherpage.php": $page = 2; break; } [/code] Put all the pages in an array and use a for statement while building your bar, if array index is same as $page change it's id or class to match the highlighted css.
I would use the long and unoptimized but easy route using if statements to change the class.
[QUOTE=Lequinx;31889764]I don't usually ask for help but I'm stumped as to how to approach this. I'm building a back-end to a website, and I can't seem to figure out how different items in the navigation bar highlight differently according to the page it's on. I want to make one navigation bar template, and have all the pages on the site use it, but will only highlight a certain item on it. Sounds simple enough, but I haven't done anything like it. I would prefer a PHP method.[/QUOTE] I'm not sure if what i'm doing is a good way of solving this but this is my "testing" page index.php [url]http://pastebin.com/JaG3YPrg[/url] .htaccess [url]http://pastebin.com/kQmNaExm[/url] config.php [url]http://pastebin.com/hfNscXqR[/url]
[QUOTE=Lequinx;31889764]I don't usually ask for help but I'm stumped as to how to approach this. I'm building a back-end to a website, and I can't seem to figure out how different items in the navigation bar highlight differently according to the page it's on. I want to make one navigation bar template, and have all the pages on the site use it, but will only highlight a certain item on it. Sounds simple enough, but I haven't done anything like it. I would prefer a PHP method.[/QUOTE]You could do it easily if you used a template system, just pass the page's name to the template.
[QUOTE=zzlawlzz;31891153]I'm not sure if what i'm doing is a good way of solving this but this is my "testing" page index.php [url]http://pastebin.com/JaG3YPrg[/url] .htaccess [url]http://pastebin.com/kQmNaExm[/url] config.php [url]http://pastebin.com/hfNscXqR[/url][/QUOTE] youre not passing any information on to index.php with that .htaccess, all it's doing is redirecting everyone to index.php
[QUOTE=Lequinx;31889764]I don't usually ask for help but I'm stumped as to how to approach this. I'm building a back-end to a website, and I can't seem to figure out how different items in the navigation bar highlight differently according to the page it's on. I want to make one navigation bar template, and have all the pages on the site use it, but will only highlight a certain item on it. Sounds simple enough, but I haven't done anything like it. I would prefer a PHP method.[/QUOTE] put a class on your body, put a unique id on each nav item and highlight it with css: [css] .page_login #nav_login { background:red; } [/css] or some shit
Sorry, you need to Log In to post a reply to this thread.