Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jacascript and AOL Browser Problems

Status
Not open for further replies.

awingnut

Programmer
Feb 24, 2003
759
US
I have a Javascript that is giving AOL users problems. I cannot reproduce the problem but I also do not have AOL nor am I very familiar with it. Am I correct that AOL has its own browser that identifies itself as Netscape (but apparently is not a full implementation of Javascript)? What are the most common gotcha's that might make a Javascript fail? Should I just detect AOL's browser and tell the user to use IE instead? If so, how do I detect AOL's browser? TIA.
 
I know nothing about what browser AOL give out... How about showing us the code (or URL) that you suspect is causing problems for AOL users?

At very least, we might be able to spot some things which are not cross-browser, and help remedy them which may just fix the issue.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Sure and thanks.

Code:
// JavaScript Document
	function previous(labelname1,labelname2,use) {
		if (use) {
			labelname1.style.display="inline";
			labelname2.type="text";
			labelname2.focus();
			labelname2.select();
		
		}
		else {
			labelname1.style.display="none";
			labelname2.type="hidden";
		}
		return;
	}
	function Checkform(theForm) {
		var errmsg="";
		errmsg+=checkBox(theForm.learn,"How you learned about us")
		if (theForm.learn[6].checked) {
			errmsg+=isEmpty(theForm.other.value,"The 'Other' source through which you learned about us");
		}
		errmsg+=isEmpty(theForm.lastname.value,"Last name");
		errmsg+=isEmpty(theForm.firstname.value,"First name");
		errmsg+=isEmpty(theForm.street.value,"Street");
		errmsg+=isEmpty(theForm.city.value,"City");
		errmsg+=isEmpty(theForm.state.value,"State");
		errmsg+=isEmpty(theForm.zip.value,"Zip code");
		if (theForm.appemail.value.length>0) {
			errmsg+=checkEmail(theForm.appemail.value,"Your");
		}
		errmsg+=checkPhone(theForm.dayphone.value,"daytime phone number");
		if (theForm.homephone.value.length>0) {
			errmsg+=checkPhone(theForm.homephone.value,"home phone number");
		}
		if (theForm.cellphone.value.length>0) {
			errmsg+=checkPhone(theForm.cellphone.value,"cell phone number");
		}
		errmsg+=checkTime(theForm.calltime.value,"Best time to call");
		errmsg+=checkBox(theForm.ampm,"AM or PM for best call time");
		errmsg+=checkBox(theForm.prevapp,"Previous application answer");
		if (theForm.prevapp[0].checked) {
			errmsg+=checkDate(theForm.prevappdate.value,"Previous application date");
		}
		errmsg+=checkBox(theForm.prevemp,"Previous employment answer");
		if (theForm.prevemp[0].checked) {
			errmsg+=checkDate(theForm.prevempdate.value,"Previous hire date");
		}
		if (theForm.relfr[0].checked) {
			errmsg+=checkDate(theForm.relfrname.value,"Name of relative or friend");
		}
		errmsg+=checkBox(theForm.currentemp,"Current employment status");
		if (theForm.currentemp[0].checked) {
			errmsg+=checkBox(theForm.contact,"Answer to contacting present employer");
		}
		errmsg+=checkBox(theForm.status,"Citizenship or immigration status");
		errmsg+=checkDate(theForm.availdate.value,"Availability date");
		errmsg+=checkDollars(theForm.salary.value,"Desired annual salary");
		errmsg+=checkBox(theForm.avail,"Times available to work");
		if (theForm.avail[1].checked) {
			errmsg+=checkBox(theForm.sess,"Part time work session");
		}
		errmsg+=checkBox(theForm.layoff,"Lay-off status");
		errmsg+=checkBox(theForm.travel,"Travel status");
		errmsg+=isEmpty(theForm.highschool.value,"High school dimploma or GED");
		errmsg+=checkNumber(theForm.hsyear.value,"High school graduation or GED year");
		if (theForm.under.value.length>0) {
			errmsg+=isEmpty(theForm.unmajor.value,"Undergraduate major");
			errmsg+=checkNumber(theForm.unyear.value,"Undergraduate graduation year,last year attended or expected graduation year");
			errmsg+=isEmpty(theForm.undeg.value,"Undergraduate degree (use NC for Not Completed)");
		}
		if (theForm.grad.value.length>0) {
			errmsg+=isEmpty(theForm.grmajor.value,"Advanced degree major");
			errmsg+=checkNumber(theForm.gryear.value,"Advanced degree graduation year,last year attended or expected graduation year");
			errmsg+=isEmpty(theForm.grdeg.value,"Advanced degree (use NC for Not Completed)");
		}
		if (theForm.emp1.value.length>0) {
			errmsg+=isEmpty(theForm.emp1addr.value,"Employer 1 address (or former address)");
			if (theForm.emp1phone.value!="NA") {
				errmsg+=checkPhone(theForm.emp1phone.value,"Employer 1 phone number (use 'NA' if no longer in business)");
			}
			errmsg+=isEmpty(theForm.emp1title.value,"Job title for employer 1");
			errmsg+=isEmpty(theForm.emp1mgr.value,"Manager's name for employer 1");
			errmsg+=isEmpty(theForm.emp1reason.value,"Reason for leaving employer 1");
			errmsg+=checkBox(theForm.emp1contact,"Answer to contacting employer 1");
			errmsg+=checkDate(theForm.emp1stdate.value,"Employer 1 start date");
			errmsg+=checkDate(theForm.emp1nddate.value,"Employer 1 end date");
			errmsg+=checkDollars(theForm.emp1stsal.value,"Employer 1 starting salary");
			errmsg+=checkDollars(theForm.emp1ndsal.value,"Employer 1 final salary");
			errmsg+=isEmpty(theForm.emp1resp.value,"Responsibilities for employer 1");
		}
		if (theForm.emp2.value.length>0) {
			errmsg+=isEmpty(theForm.emp2addr.value,"Employer 2 address (or former address)");
			if (theForm.emp2phone.value!="NA") {
				errmsg+=checkPhone(theForm.emp2phone.value,"Employer 2 phone number (use 'NA' if no longer in business)");
			}
			errmsg+=isEmpty(theForm.emp2title.value,"Job title for employer 2");
			errmsg+=isEmpty(theForm.emp2mgr.value,"Manager's name for employer 2");
			errmsg+=isEmpty(theForm.emp2reason.value,"Reason for leaving employer 2");
			errmsg+=checkBox(theForm.emp2contact,"Answer to contacting employer 1");
			errmsg+=checkDate(theForm.emp2stdate.value,"Employer 2 start date");
			errmsg+=checkDate(theForm.emp2nddate.value,"Employer 2 end date");
			errmsg+=checkDollars(theForm.emp2stsal.value,"Employer 2 starting salary");
			errmsg+=checkDollars(theForm.emp2ndsal.value,"Employer 2 final salary");
			errmsg+=isEmpty(theForm.emp2resp.value,"Responsibilities for employer 2");
		}
		if (theForm.emp3.value.length>0) {
			errmsg+=isEmpty(theForm.emp3addr.value,"Employer 3 address (or former address)");
			if (theForm.emp3phone.value!="NA") {
				errmsg+=checkPhone(theForm.emp3phone.value,"Employer 3 phone number (use 'NA' if no longer in business)");
			}
			errmsg+=isEmpty(theForm.emp3title.value,"Job title for employer 3");
			errmsg+=isEmpty(theForm.emp3mgr.value,"Manager's name for employer 3");
			errmsg+=isEmpty(theForm.emp3reason.value,"Reason for leaving employer 3");
			errmsg+=checkBox(theForm.emp3contact,"Answer to contacting employer 3");
			errmsg+=checkDate(theForm.emp3stdate.value,"Employer 3 start date");
			errmsg+=checkDate(theForm.emp3nddate.value,"Employer 3 end date");
			errmsg+=checkDollars(theForm.emp3stsal.value,"Employer 3 starting salary");
			errmsg+=checkDollars(theForm.emp3ndsal.value,"Employer 3 final salary");
			errmsg+=isEmpty(theForm.emp3resp.value,"Responsibilities for employer 3");
		}
		if (theForm.emp4.value.length>0) {
			errmsg+=isEmpty(theForm.emp4addr.value,"Employer 4 address (or former address)");
			if (theForm.emp4phone.value!="NA") {
				errmsg+=checkPhone(theForm.emp4phone.value,"Employer 4 phone number (use 'NA' if no longer in business)");
			}
			errmsg+=isEmpty(theForm.emp4title.value,"Job title for employer 4");
			errmsg+=isEmpty(theForm.emp4mgr.value,"Manager's name for employer 4");
			errmsg+=isEmpty(theForm.emp4reason.value,"Reason for leaving employer 4");
			errmsg+=checkBox(theForm.emp4contact,"Answer to contacting employer 4");
			errmsg+=checkDate(theForm.emp4stdate.value,"Employer 4 start date");
			errmsg+=checkDate(theForm.emp4nddate.value,"Employer 4 end date");
			errmsg+=checkDollars(theForm.emp4stsal.value,"Employer 4 starting salary");
			errmsg+=checkDollars(theForm.emp4ndsal.value,"Employer 4 final salary");
			errmsg+=isEmpty(theForm.emp4resp.value,"Responsibilities for employer 4");
		}
		if (theForm.keying.checked) {
			if (theForm.kspeed.value.length==0) errmsg+="Keyboard words per minute is required.\n";
			else errmsg+=checkNumber(theForm.kspeed.value,"Keyboard words per minute");
		}
		if (isEmpty(theForm.ref1.value,"").length>0 || isEmpty(theForm.ref1.value,"").length>0 || isEmpty(theForm.ref3.value,"").length>0) {
			errmsg+="Three references are required.\n";
		}
		else {
			errmsg+=checkPhone(theForm.ref1phone.value,"Phone for reference 1");
			errmsg+=checkTime(theForm.ref1time.value,"Best time to call for reference 1");
			errmsg+=checkBox(theForm.ref1ampm,"AM or PM for best time to call reference 1");
			errmsg+=isEmpty(theForm.ref1occ.value,"Occupation or position for reference 1");
			errmsg+=checkPhone(theForm.ref2phone.value,"Phone for reference 2");
			errmsg+=checkTime(theForm.ref2time.value,"Best time to call for reference 2");
			errmsg+=checkBox(theForm.ref2ampm,"AM or PM for best time to call reference 2");
			errmsg+=isEmpty(theForm.ref2occ.value,"Occupation or position for reference 2");
			errmsg+=checkPhone(theForm.ref3phone.value,"Phone for reference 3");
			errmsg+=checkTime(theForm.ref3time.value,"Best time to call for reference 3");
			errmsg+=checkBox(theForm.ref3ampm,"AM or PM for best time to call reference 3");
			errmsg+=isEmpty(theForm.ref3occ.value,"Occupation or position for reference 3");
		}
		if (theForm.resume.value.length>0) {
			if (theForm.resume.value.substr(-4)!=".doc" && theForm.resume.value.substr(-4)!=".txt" && theForm.resume.value.substr(-4)!=".rtf") {
				errmsg+="The resume file must be a '.doc', '.rtf', or '.txt' file.\n";
			}
		}
		if (errmsg.length>0) {
			alert(errmsg);
			return false;
		}
		else {
			var confirmtext="By clicking 'OK' below, I agree to the following and certify that answers given herein are true and complete.\nI authorize investigation of all statements in this application for employment as may be necessary in arriving at an employment decision.\nThis application for employment shall be considered active for a period of time not to exceed 45 days. Any applicant wishing to be considered for employment beyond this time period should inquire as to whether or not applications are being accepted at that time.\n I hereby understand and acknowledge that, unless otherwise defined by applicable law, any employment relationship with this organization is of an 'at will' nature, which means that the Employee may resign at any time and the Employer may discharge the Employee at any time with or without cause. It is further understood that the 'at will' employment relationship may not be changed by a written document or by conduct unless such change is specifically acknowledged in writing by an authorized executive of this organization.\nIn the event of employment, I understand that false or misleading information given in my application or interview(s) may result in discharge. I understand, also, that I am required to abide by all rules and regulations of the employer.\nI understand that a criminal background investigation is required and the result will be a condition of employment."
			var cnfrm=confirm(confirmtext);
			if (cnfrm) {
				theForm.affirmation.value="Yes";
				return true;
			}
			else return false;
		}
	}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top