pgsjoe Posted September 26, 2006 Share Posted September 26, 2006 so I pulled some script off of DynamicDrive.com and used it on a regular HTML page and it worked awesome. But, once I tried to incorporate PHP into it, all of the sudden "it don't work so good". The script is suppose to float the menu on the page, and as you scroll down, it moves with you. And again it works fine on the regular page, so I'm almost positive it's not the javascript that's messed up.The box is taking on the CSS attributes (which it should) and parsing the correct information, as well as the rest of the page looking as it should, but the box doesn't float. I know there's a difference between client-side and server-side coding, but I really don't know what to do here. if you know anything, thanks in advance.So for some reason it won't let me post the code up...keeps giving me a "page cannot be displayed" error. So here's a link to a text version of the code. I've marked off the code that's not working with dashed lines.http://www.asse.org/gau/help.phpand, if you need to see it. that's here... http://www.asse.org/gau/gauform.phpthank you again in advance. this one is killing me! Quote Link to comment Share on other sites More sharing options...
steveclondon Posted September 26, 2006 Share Posted September 26, 2006 They do but remember if you are going to echo or print javascript you will need to escape the quotes \' Quote Link to comment Share on other sites More sharing options...
thepip3r Posted September 26, 2006 Share Posted September 26, 2006 If this is the script you tried to implement, http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm then I wouldnt' use it altogether. Not only could I not get it to work on my PHP site but when I went to the aforementioned dynamicdrive site, the menu disappeared and wouldn't come back after scrolling up and down a few times. Quote Link to comment Share on other sites More sharing options...
pgsjoe Posted September 26, 2006 Author Share Posted September 26, 2006 well I wasn't printing/echoing the script using PHP. I was closing out the PHP tags, entering in the javascript, opening the php tags in the editable region of the code, closing the php tags out and going back into the javascript.is there something special that has to be done to it? do I have to print the code through PHP?as for it not working at all, I've been using it for a while on a regular HTML page and it's been holding up okay. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 26, 2006 Share Posted September 26, 2006 Can you post some of your code here?Ken Quote Link to comment Share on other sites More sharing options...
pgsjoe Posted September 26, 2006 Author Share Posted September 26, 2006 it will not let me post the code for some reason. even in code format.you can view it here....http://www.dynamicdrive.com/forums/showthread.php?t=13462or here....http://www.asse.org/gau/help.phpthanks for looking into it! Quote Link to comment Share on other sites More sharing options...
pgsjoe Posted September 28, 2006 Author Share Posted September 28, 2006 can anyone get my back on this one? Quote Link to comment Share on other sites More sharing options...
fenway Posted September 29, 2006 Share Posted September 29, 2006 I'd like to help, but if it's someone else's script, well... it looks like the JS blocks are being correctly interpreted, that's all I can really say at this point. Quote Link to comment Share on other sites More sharing options...
pgsjoe Posted September 29, 2006 Author Share Posted September 29, 2006 well that's why I know it's not a javascript problem, the script works fine. So I posted it in the PHP help area because I think it's just the way the php is arranged within the script. I just close out the php ?> put the script in, cut into the middle of the script with php <? database retrieval of information ?> then back into the javascript. Quote Link to comment Share on other sites More sharing options...
Spencer V Posted October 1, 2006 Share Posted October 1, 2006 Are you coding your .php page to use the same doctype as your working .html version?-SV Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted October 1, 2006 Share Posted October 1, 2006 [quote author=Spencer V link=topic=109569.msg444544#msg444544 date=1159675217]Are you coding your .php page to use the same doctype as your working .html version?-SV[/quote]Shouldn't have any effect on how it works. Quote Link to comment Share on other sites More sharing options...
Spencer V Posted October 1, 2006 Share Posted October 1, 2006 Try coding a sample page to be Valid XHTML 1.0 Strict and try that code, I'll bet you change your mind.pgsjoe--you have exposed sensitive info in your sample page.-sv 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.