Hello,
I have a question, that I've been wondering about for quite a while, that I never got around to answering.
I've got a website. The entire site has a standard top logo section and a standard menu section. It makes perfect sense to use include files here to keep the design consistent and to minimize headaches when updating the site. However, one problem with this approach is that when someone is on my homepage, and point points their mouse at the logo, a little text popup says "Click here to return to the homepage." (The text that's in the image alt property). The same thing follows for the menu. When someone is on the services page, and points their mouse at the services link, they get a little popup that says "Click here to learn about our web design services." That would indicate to the typical "non-programmer" that clicking on that link will bring them to another page which obviously is not the case. Also, I'd like to have a different image in the place of the currently active link on the menu bar that would indicate to the user what page they're currently on.
First of all, can you write server side code in include files and if so, how would I go about checking to find out if the current page is xyz.asp? For example, if my menu has 3 links, page1, page2 and page3. I would need something that would go something like this:
If currentPage = page1 then
display page1 active image
else if currentPage = page2 then
display page2 active image
else if .....
You get the point. Can this be done from within an include file and if so how? Any input would be greatly appreciated.
Thanks,
Ryan
I have a question, that I've been wondering about for quite a while, that I never got around to answering.
I've got a website. The entire site has a standard top logo section and a standard menu section. It makes perfect sense to use include files here to keep the design consistent and to minimize headaches when updating the site. However, one problem with this approach is that when someone is on my homepage, and point points their mouse at the logo, a little text popup says "Click here to return to the homepage." (The text that's in the image alt property). The same thing follows for the menu. When someone is on the services page, and points their mouse at the services link, they get a little popup that says "Click here to learn about our web design services." That would indicate to the typical "non-programmer" that clicking on that link will bring them to another page which obviously is not the case. Also, I'd like to have a different image in the place of the currently active link on the menu bar that would indicate to the user what page they're currently on.
First of all, can you write server side code in include files and if so, how would I go about checking to find out if the current page is xyz.asp? For example, if my menu has 3 links, page1, page2 and page3. I would need something that would go something like this:
If currentPage = page1 then
display page1 active image
else if currentPage = page2 then
display page2 active image
else if .....
You get the point. Can this be done from within an include file and if so how? Any input would be greatly appreciated.
Thanks,
Ryan