Forum Moderators: coopster

Message Too Old, No Replies

PHP Include files

My rollovers (image) are not working with my include file

         

bartainer

1:55 pm on Sep 22, 2006 (gmt 0)

10+ Year Member



Hello:

I am using a PHP include file and my image rollovers are not working? Also, (unlike DW Library Files) can I include CSS and Java Script ONLY in my include file? One more! Can I use the head and body tags in my include file if I were to eliminate the tags in the original file? If I don't an error will take place because of the redundancy.

Thank you.

coopster

2:14 pm on Sep 22, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The included file should not be affected your rollovers whatsoever. Try a "View Source" in your browser after the page is rendered to see if the HTML is what you expect it to be.

You can include any content you wish in an included file. PHP will step out of "PHP parse mode" when it first gets to the included file and will again parse anything included within <?php script blocks.

bartainer

2:43 pm on Sep 22, 2006 (gmt 0)

10+ Year Member



The include file brings over the html and it overlapes the existing html. E.g., the include file has the <HEAD> </HEAD> tags. The page that I insert the include file also has these tags. If so, an html is rendered. Should I eliminate the redundent tags?

Thanks

jatar_k

2:46 pm on Sep 22, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



yes, you'll need to make sure the resulting page has valid html

so removing redundant tags would be the next step

bartainer

2:54 pm on Sep 22, 2006 (gmt 0)

10+ Year Member



I do apologize! Da! My mistake!

I know rollovers work with the include file; however. I ment to ask why I cannot use a drop down menu with the PHP include file. Sorry!

I'm using DW and I'm trying to use a drop down menu with the inlude file; however the drop down menu is not rendering. I would like slections below the rollover.

I hate library files and that's why I'm resorting to the include file.

Thanks again.

jatar_k

2:57 pm on Sep 22, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you could try validating the resulting html page, my uess is that it is strictly an html problem resulting from overlapping or mismatched tags

view source and validate and work through it that way

bartainer

10:28 pm on Sep 25, 2006 (gmt 0)

10+ Year Member



Okay! It's been awhile since I responded, but yes you can insert html in the inlcude file as long as you eliminate the redundent code in the page where the include file is inserted. Did all this make sense?