[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 394
  • Last Modified:

jQuery/AJAX Form not working on certain computers

We received a chat from a fellow who was trying to register with us using a 4 page jQuery/Ajax form i created.
He said he was using Chrome, and as part of the chat transcript, I can see he's using the same version of Chrome I am. (in fact, our user agents are the same - except he's on Windows 7 and I'm on 8.1)...  Turns out he gets the same error in Internet Explorer.  The error is the page just refreshes, it doesn't load the inner content.  Here's the code:

<script language="javascript">
$(function(){
	$('#startReg').click(function(){
		$( ".right_cont_sub" ).fadeOut("slow", function(){					
		$.ajax({
				url: "manager/manager1.html",	
				cache: false
			   })
		.done(function(html){
			
			$( ".right_cont_sub" ).html( html );
			$( ".right_cont_sub" ).fadeIn("slow");
			$( ".statusReg" ).fadeOut("slow", function(){
				$(".statusReg").html = "";
			});
		});
		return false;
	});
	return false;
	});
});
</script>

Open in new window


I've tested the script on a number of computers and browsers, so I'm trying to figure out what could be the problem.  Other people have registered without any issues.  Unfortunately, I'm not in a position where I can have this person test their setup, so instead I'm trying to keep it from happening again.

Is it possible that Anti-Virus or security settings could disable jQuery or AJAX code?  Could there be some other factor that I should consider?  

Thanks for your help!!!
0
slightlyoff
Asked:
slightlyoff
  • 3
  • 3
  • 2
2 Solutions
 
ambienceCommented:
I think I have seen an exactly similar question here on EE before and in that the server end of the API was returning responses with an HTTP response code of 304 (Not Modified). This could lead to intermediaries caching content and subsequent requests not even hitting the server.

Can you check server logs to see whats exactly being returned? Also, Chrome has dev tools like Firebug so would it be possible to obtain logs of what exactly happens for such requests?
0
 
RobOwner (Aidellio)Commented:
Can you also please post your form as it could be the onsubmit function is still being executed.
0
 
slightlyoffAuthor Commented:
Sorry for the delay in responding.  The issue isn't the form - it's the button that triggers the jQuery to open the div and display the form.  Literally, I just have a button with an ID of "#startReg" - and this is where the problem starts.

I wonder if there's an issue with jQuery on users' computers...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
RobOwner (Aidellio)Commented:
thinking outside the square... how are you including jQuery in your site? via a CDN or are you hosting it? It sounds like the library isn't being downloaded, which could possibly exhibit this kind of behaviour.
0
 
ambienceCommented:
You don't clearly state the nature of errors, don't answer questions, and don't respond in time. Seriously, you expect someone to be able to help you?
0
 
slightlyoffAuthor Commented:
Fair enough ambience - this is one of several issues I've been trying to solve and had to launch a website between these posts, I've been awful at following up, and it doesn't show respect.  I'm sorry.  I really do appreciate your time and your input.

I have not had anyone else complain of this issue, so it's been set on the back burner - but because it could still exist, I am interested in solving it.  

To answer the questions - as i understand them:
1. The jQuery is included in the site, not via CDN.  
2. Here's the link that triggers the jQuery: <a id="startBand" href="#"><img src="images/button.jpg" border="0" /></a>, it's not a form.  I'm using jQuery

As for stating the error, this happened once and I can't recreate it - no error code was returned.  I don't expect this problem to be solved via Experts Exchange, I was really just wondering if is possible that Anti-Virus or security settings could disable jQuery or AJAX code.  Every single other browser, OS i've tried this on works fine.

I'll leave this question open for a couple of days in case you would like to respond, if not, I'll award the points - since you both have gone above and beyond in trying to help.  

Thank you!
0
 
RobOwner (Aidellio)Commented:
Sounds more like an intermittent network issue. If it does happen again, first thing to check is the console of the developer tools.

You could also build into your site that it checks for necessary libraries such as jQuery and alerts the user if it isn't present. JQuery is as simple as:

If(! JQuery) {
   //notify that jQuery library hasn't loaded
}

Obviously include YOUR script after including the jQuery library.
0
 
slightlyoffAuthor Commented:
Thanks for the advice.  I will see if the issue happens again and try to log it better.
Sorry for the slow responses!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now