ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I've recently placed my website in public view, but I have two slight problems, one of which occurs only when my files are on this web host.
The site works almost perfectly except that my links (on the top menu, and the first and 3rd on the side menu) that are supposed to load via jQuery's ajax-rendering "load()" function default instead, loading the entire page. Please note, they work on firefox/centOS, but not IE, and this bad behavior doesn't show up at all on my own web-server. You can see from the default that the bottom right part should be the only part that reloads.
I've tested the public code on my CentOS_5/Firefox (3.6.24) which works fine on either server
I've tested it on my own XP, and another IE which I believe was Windows 7, both of which load the default pages (not the ajax pages).
Which version of IE? BTW this is an age old tale in web design if you're new to this. It's always, design for everything, and then redesign for IE hehe.
Which version of IE? BTW this is an age old tale in web design if you're new to this. It's always, design for everything, and then redesign for IE hehe.
I am new but, yeah, in the last year I've learned the stupidity of IE's defiance of reasonable standards, and the need to work around it.
I've tested on IE8 at home on XP, and probably the same version of IE on Vista--they do the same thing--load the default rather than run the ajax.
You can detect the browser using JavaScript like so...
Code:
var msie=(navigator.userAgent.indexOf("MSIE")>0)?1:0;
if(msie)
{
//do an XMLHttpRequest for IE
}
else
{
//use JQuery or XYZ library for everything else.
}
I know me telling you to reinvent the wheel is a bummer but the thing is IE is changing. Not sure for better or worse but it is changing. I know this because I use the mootools library and the AJAX doesn't work at all in IE9 (haven't tested IE8).
So basically what I'm telling you is: when bullets don't work, bombs and nuclear missiles will. Write just for IE and then account for the rest of the world; strictly speaking about AJAX. There are other nuances but I'm sure you'll discover them over time as you gain more experience doing the whole web design thing.
You might also want to alert your UserAgent on IE in case something has changed in that regard.
You can detect the browser using JavaScript like so...
Code:
var msie=(navigator.userAgent.indexOf("MSIE")>0)?1:0;
if(msie)
{
//do an XMLHttpRequest for IE
}
else
{
//use JQuery or XYZ library for everything else.
}
I know me telling you to reinvent the wheel is a bummer but the thing is IE is changing. Not sure for better or worse but it is changing. I know this because I use the mootools library and the AJAX doesn't work at all in IE9 (haven't tested IE8).
So basically what I'm telling you is: when bullets don't work, bombs and nuclear missiles will. Write just for IE and then account for the rest of the world; strictly speaking about AJAX. There are other nuances but I'm sure you'll discover them over time as you gain more experience doing the whole web design thing.
You might also want to alert your UserAgent on IE in case something has changed in that regard.
SAM
Thanks. Originally I bypassed jQuery and tried to do everything in javascript, but I didn't realize how jQuery covers so much. And now I know the problem I'm having in this case must be extremely simple--My code works perfectly when I refresh after the initial load; then I can click my links on my main menu and the parts of the page that should load do so. Why it works in this case is beyond me. My solution has to be very obvious to someone, but I think I've lost folks' attention.
It could also be that you're not developing for a particular standard for the w3c. You should choose an actual standard because it will change the render mode of the browser. It makes code more reliable; this includes in IE.
You should always use that to validate your code. FYI I'm still tearing apart and understanding your code so it may take some time for me to get a good grasp at it (and to look at it a couple of times).
FYI I'm still tearing apart and understanding your code so it may take some time for me to get a good grasp at it (and to look at it a couple of times).
I took your advice and validated my code. There were 16 or 17 errors which I fixed (including dynamically written link attributes w/out quotes & some empty attributes), but I'm still having the same issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.