Thanks a lot Brian, changing my file structure gives me good results and I am definitely using C:\www for my document root. Thank you.
On Feb 10, 7:48 pm, Brian Ronk <paladin.ri...@gmail.com> wrote: > Oh, and this should really be in the jQuery group, not the jQuery UI > group :) > > http://groups.google.com/group/jquery-en > > On Feb 10, 12:45 pm, Brian Ronk <paladin.ri...@gmail.com> wrote: > > > Well, I wouldn't use $_SERVER for anything like that. That seems > > overkill to me. For instance, here's a layout that I use: > > > project-root-dir > > - js > > - styles > > > then in my source, I would just do (using your example): > > <link type="text/css" href="styles/ui.all.css" rel="Stylesheet" /> > > <script type="text/javascript" src="js/jquery-1.3.1.js"></script> > > <script type="text/javascript" src="js/jquery.ui.all.js"></script> > > <script type="text/javascript" src="js/ui_demos.js"></script> > > > If you really want to separate the third party stuff out, you could do > > something like: > > <link type="text/css" href="styles/jquery/theme/ui.all.css" > > rel="Stylesheet" /> > > <script type="text/javascript" src="js/jquery/jquery-1.3.1.js"></ > > script> > > <script type="text/javascript" src="js/jquery/jquery.ui.all.js"></ > > script> > > <script type="text/javascript" src="js/jquery/ui_demos.js"></script> > > > I suspect that when the server uses C:\www\... that might be causing > > problems. Using $_SERVER is making it more difficult than it needs to > > be. > > > On Feb 10, 10:04 am, themba <themba.ntl...@gmail.com> wrote: > > > > Thanks for the reply earlier, jQuery is really cool, I have just > > > started working with it last night. > > > > Everything works, if I move the JS and CSS to the same directory as my > > > php file, but I wish I can still separate all the 3rdparty code from > > > my custom code(struggling) > > > > jQuery is wonderful though!! > > > > On Feb 10, 3:49 pm, themba <themba.ntl...@gmail.com> wrote: > > > > > I am running apache on Windows and my actual code looks like this: > > > > > //The PHP > > > > define('WS_DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT'] . '/lcsm/'); > > > > define('DIR_WS_INCLUDES', WS_DOCUMENT_ROOT . 'includes/'); > > > > define('DIR_WS_3RDPARTY', DIR_WS_INCLUDES . '3rdparty/'); > > > > > //The HTML/PHP File > > > > <link type="text/css" href="<?=DIR_WS_3RDPARTY; ?>jQuery/theme/ > > > > ui.all.css" rel="Stylesheet" /> > > > > <script type="text/javascript" src="<?=DIR_WS_3RDPARTY; ?>jQuery/ > > > > jquery-1.3.1.js"></script> > > > > <script type="text/javascript" src="<?=DIR_WS_3RDPARTY; ?>jQuery/ > > > > jquery.ui.all.js"></script> > > > > <script type="text/javascript" src="<?=DIR_WS_3RDPARTY; ?>jQuery/ > > > > ui_demos.js"></script> > > > > > My Document Root for the application is: C:/www/lcsm/ > > > > > Thank you. > > > > > On Feb 10, 3:34 pm, Brian Ronk <paladin.ri...@gmail.com> wrote: > > > > > > Well, you might want to change your links for js and css from ones > > > > > that are linked specifically to your machine (C:/www/lcsm/css/ > > > > > default.css for instance) to something that will work when it's > > > > > actually on a server (css/default.css instead). If you are running > > > > > XAMPP and accessing the page through localhost on your machine, this > > > > > could be the problem. > > > > > > On Feb 10, 8:09 am, themba <themba.ntl...@gmail.com> wrote: > > > > > > > Hi Guys, > > > > > > > I cannot get JQuery working at all on my web page, but the demo work > > > > > > well, can there be a fatal JavaScript error that I am unaware of? > > > > > > > Please see my example code below: > > > > > > > <html xmlns="http://www.w3.org/1999/xhtml"> > > > > > > <head> > > > > > > <meta http-equiv="Content-Type" content="text/html; > > > > > > charset=iso-8859-1" /> > > > > > > <title>Login Module- version 1.0</title> > > > > > > <link href="C:/www/lcsm/css/default.css" type="text/css"> > > > > > > <link type="text/css" > > > > > > href="C:/www/lcsm/includes/3rdparty/jQuery/theme/ > > > > > > ui.all.css" rel="Stylesheet" /> > > > > > > <script type="text/javascript" src="C:/www/lcsm/includes/3rdparty/ > > > > > > jQuery/jquery-1.3.1.js"></script> > > > > > > <script type="text/javascript" src="C:/www/lcsm/includes/3rdparty/ > > > > > > jQuery/jquery.ui.all.js"></script> > > > > > > <script type="text/javascript" src="C:/www/lcsm/includes/3rdparty/ > > > > > > jQuery/ui_demos.js"></script> > > > > > > </head> > > > > > > <body> > > > > > > > <!-- Tabs --> > > > > > > <h2 class="demoHeaders">Tabs</h2> > > > > > > <div id="tabs"> > > > > > > <ul> > > > > > > <li><a href="#tabs-1">First</a></li> > > > > > > <li><a href="#tabs-2">Second</a></li> > > > > > > <li><a href="#tabs-3">Third</a></li> > > > > > > </ul> > > > > > > <div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing > > > > > > elit, sed do eiusmod tempor incididunt ut labore et dolore magna > > > > > > aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco > > > > > > laboris nisi ut aliquip ex ea commodo consequat.</div> > > > > > > <div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, > > > > > > blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque > > > > > > sem non nisl. Fusce sed lorem in enim dictum bibendum.</div> > > > > > > <div id="tabs-3">Nam dui erat, auctor a, dignissim quis, > > > > > > sollicitudin > > > > > > eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, > > > > > > consequat vestibulum, lacus. Mauris porttitor ullamcorper > > > > > > augue.</div> > > > > > > </div> > > > > > > <body> > > > > > > </body> > > > > > > </html> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@googlegroups.com To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---