hiding_in_side: (Default)
I'll admit that I've only very lightly dabbled in JavaScript before this.  I tried two books and got frustrated just skimming them.  I'm going to have to try another.  I spent yesterday trying to get better Search Engine hits for a very old animal care website I maintain.  Since I don't have Dream Weaver anymore, and this page uses templates I wasn't looking forward to it.  I have a spry menu and since I couldn't set it as a library item when I was using Dream Weaver I had kind of given up on being able to edit it once and have it dynamically change on all the pages.  So I've been opening every file and pasting the new menu in addition to fixing the page titles, changing my h3 headers to h1 and fixing page description and keyword issues.  I got all the CSS into one file and am using classes on the body tag to change colors.  I'm painfully proud about that as I redid this site last before learning advanced CSS.

This morning as I have 350 or so more files to open I thought what about googling java script menu load.  This  wonderful site popped up.  I did some programming in college (mostly crashed lab computers) so I really just need syntax and such.  It was painfully simple, and my new JavaScript menu file is also simple.  It is a set of 117 document.write commands with my spry menu list tags in them.  It took less then 20 minutes to work out the kinks and it freaking works.  I replaced the code on all the pages of the huge menu with 3 lines for the script call and a link in the header.  I think I'll make one for the footer as well, though I can change that with find/replace easily.  It was just the multi-line menu that notepad++ would not search through.  Using simple noscript tags I can just make them appear where the menu would if someone has JavaScript turned off.  This site is on a cheap shared server and I don't know enough programming to play with PHP outside WordPress yet, so I’m finding this an awesome solution.

Downside: I still have to open all those files, and now I have to reopen the ones I fixed yesterday.  It will probably also kill my XML sitemap as it will appear there are very few links on all the pages. 

Profile

hiding_in_side: (Default)
hiding_in_side

February 2011

S M T W T F S
   1 2 34 5
6 7 89 101112
13141516171819
20212223242526
2728     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 20th, 2017 05:44 am
Powered by Dreamwidth Studios