jwwceo Posted August 28, 2006 Share Posted August 28, 2006 I want to add some javascript rollover menus to my php pages. But the javascript menu items will be pulled from my MySQL databse.I usually have a seperate .js file which I link in at the top of my HTML...but if this seperate document is a php doc (that outputs javascript) will this still work..what's the best way to go about this???? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted August 28, 2006 Share Posted August 28, 2006 Instead of using Javascript for the rollover menus, think about using CSS. Most of the CSS implementations are based on simple [nobbc]<ul></ul>[/nobbc] lists. Take a look at http://css.maxdesign.com.au/listamatic/ for more information.Ken Quote Link to comment Share on other sites More sharing options...
jwwceo Posted August 28, 2006 Author Share Posted August 28, 2006 The menus are supposed to pop up when a link is hovered on, not just change color....can this be done with CSS???sorry for not being clear... Quote Link to comment Share on other sites More sharing options...
Joe Haley Posted August 28, 2006 Share Posted August 28, 2006 It is possable.http://cssplay.co.uk/menus/index.htmlMany examples of neat CSS menus. (including ones similar to that which you describe.) Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted August 28, 2006 Share Posted August 28, 2006 Try this one:http://www.dhtmlgoodies.com/index.html?whichScript=dhtmlgoodies_menu2It uses an unordered list, but it also uses js to make it compatible with IE without using some crazy hacks the only work half the time. Quote Link to comment Share on other sites More sharing options...
jwwceo Posted August 28, 2006 Author Share Posted August 28, 2006 I like the last menu...thanks..1 question....This may sound stupid..but I don't want to jarble up my <head> with all that css and script data..can I make one big php file to echo the whole thing and just plop it into my header...and just include the php file....JW Quote Link to comment Share on other sites More sharing options...
Joe Haley Posted August 28, 2006 Share Posted August 28, 2006 I would use an external CSS stylesheet, and external script. thus only 2 lines need to be in the header, and the browser may cache the data for faster loading times. Quote Link to comment Share on other sites More sharing options...
jwwceo Posted August 28, 2006 Author Share Posted August 28, 2006 I already have a Style sheet applied...will this style sheet overide the other one for containers of the same type....how do you make sure that for items like <html> or <p> the right style sheet is being used... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.