javascript works in IE but not working in firefox


List of Sleep Studies Entities : 1, Instances : 1NARMC Sleep Disorders Clinic Intake Form Last Name: First Name: Age: Gender: Clinton Harry 32 Years M General Physician Sleep History Sleep Behavior Med Hist Ref Physician Breath Narcolepsy Disorders GeneralGeneral Information Patient Data Patient Name:
Last Name:Req
First Name:
MI:
Personal Information:
Age:
Gender:MF
Birthday:
Why is there air
To Breathe.To Fill Basketballs.Other Contact Information:
Home Phone:
Work Phone:
E-Mail:
Address:
Street:
City:
State:
Zip
Marital Status:
SingleMarriedDivorcedWidow(er) Physical Description:
Height:
Body Frame:SmallMediumLarge
Weight (Lbs):
Race:
African-AmericanAsianCaucasianHispanicNative American Please give a brief description of your clinical complaint and its duration, especially as it relates to sleep:
Please describe any events which occur while falling asleep, during sleep or while waking up that you consider unusual:
Which of the following games do u play. Select all that apply:
Football
Soccer
Basketball
Tennis
Cricket
PhysicianPatients Physician Doctor Name: Newname Sleep HistorySleep History Do you feel you suffer from insomnia
Yes No Do you feel that you get too little sleep at night
Yes No Do you feel you get much sleep at night
Yes No Weekday Bedtime
(hh:mm)
Please select:ampm
Weekend Bedtime
(hh:mm)
Please select:ampm
Weekday Wakeup
(hh:mm)
Please select:ampm
Weekend Wakeup
(hh:mm)
Please select:ampm
How long does it usually take to fall asleep (mins) How long are you awake in the morning before you actually get out of bed (mins) Sleep BehaviorSleep Behavior Do your legs or arms bother you when resting or falling asleep
Yes No
Please Describe:

Do you have unusual movements (Leg Jerks, Head Movements, etc.) during sleep
Yes No
Please Describe:

Do you have any unusual sleep behavior (sleep walking, sleep talking, etc.)
Yes No
Please Describe:

Do you experience dreams
Yes
No
Sometimes
Have you noticed a change in your dreams (i.e. increased, decreased, more action packed, etc.)
Yes No
Please Describe:

Do you experience nightmares
Yes No
Please Describe:

Med HistMedical History Have you had high blood pressure
Yes No
How long
How is it being treated (medication, diet, etc.)

Have you ever had a seizure
Yes No
Please Describe:

Do you suffer from recurrent dizzy spells
Yes No Have you ever experienced a rapid or pounding heart beat
Yes No Have you had a Heart attack or stroke
Yes No
Please Describe:

Do you have a history of Diabetes
Yes No
How long
How is it being treated (medication, diet, etc.)

Have you tested positive for HIV
Yes No Have you been told that you have TB or had a positive PPD test
Yes No Please list any medications you take on a regular basis: Name of Drug Reason Dosage (e.g.-20 mg/day or .05 mg every other day) Last Dose (Date) (mm/dd/yyyy) Aspiron Headache 10 mg 08/23/2003 Citamol Fever 20 mg 05/25/2004 Paracitamol Fever 100 mg 04/28/2004 Have you experienced a change in body weight
Yes No
Gained (lbs):
Lost (lbs):
Over what time Perioddaysweeksmonths
Do you currently use tobacco
Yes No
Cigarettes/day
how many years
test
Name of Referring Physician:
Office Phone:
Office Fax:
Ref PhysicianReferring Physician Data List all your current medications Name of Drug Reason Dosage (e.g.-20 mg/day or .05 mg every other day) Last Dose (Date) (mm/dd/yyyy) A R1 Ds1 D1 B R2 Ds2 D2 C R3 Ds3 D3 D R4 Ds4 D4 E R5 Ds5 D5 F R6 Ds6 D6 Do you like Pizza
Yes No Best Friend
Last Name:Req
First Name:
MI:
Doctor: Name: Dorian BreathBreathing Disorders Do you experience any breathing problems during sleep
Please Describe:

Have you been told that you snore
Yes No Have you been told that you have breathing pauses during sleep
Yes No Do you have difficulty breathing in a flat position
Yes No Do you ever wake up short of breath
Yes No Do you ever wake up choking or gasping for air
Yes No Do you use breathing devices such as CPAP/BiPAP
Type of CPAP/BiPAP unit:
CPAP Pressure:
Date of starting CPAP usage:
Type of Humidifier:
NarcolepsyNarcolepsy Have you ever been diagnosed as having Narcolepsy
Yes No Has anyone in your family been diagnosed with narcolepsy
Yes No feeling sleepy or fatigued after an emotional experience
1 2 3 4 5 not being able to move when first waking up
1 2 3 4 5 daytime hallucinations or dreaming
1 2 3 4 5 sleep attacks (falling asleep despite not wanting to)
1 2 3 4 5 DisordersMedical Disorders "gas", indigestion or heartburn
1 2 3 4 5 awakening due to regurgitation or throat burning
1 2 3 4 5 waking up coughing
1 2 3 4 5 waking up with the need to urinate
1 2 3 4 5 nasal congestion
1 2 3 4 5 1 records.


Posted On: Saturday 10th of November 2012 11:12:18 AM Total Views:  130
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Page now only works in IE compatibility mode

The following piece of script used to work in all browsers but I have just discovered that it is now u/s unless run in IE compatibility mode. No matter how many checkboxes have been checked it always ShowResults(1); I have looked at it, stared at it and sworn at it.................. In truth I don't understand Java. Can anyone alble to help me get it working again.
VIEWS ON THIS POST

63

Posted on:

Monday 12th November 2012
View Replies!

Why multiply works but adding dont

, I was writing this micro object when I realized that something is not ok and now i'm looking for answer why it works like that. Please just ignore concept and first two methods. Let's take a look on method_Adding_Properties_to_an_Object: function() I was going to add two variables/properties and function/method(btw I try switch from procedural style to oop concept) acts strangely. It works if I try multiply, subtract and so on but with adding it doesn't work like it must. In this case JS interplates it like as a string or an array not like variable, correct me if i am wrong. Enviroment details: Xampp 1.7 Windows 7 Ultimate 64 bit //Literal Notation Object //var n = prompt("Enter value", ""); circle = { x : 0, y : 4, radius: 2, //anonymous function without names method_area: function count_area() { alert(Math.PI*Math.pow(this.radius,2)) }, method2: function test() { alert(this.radius) }, //its an anonymous function method_Adding_Properties_to_an_Object: function() { //alert(this.new_variable) //document.write(this.new_variable); /* ... block of code ... */ var b = 2; //a = this.new_variable-b; //works as it must //lol a = this.new_variable+b; document.write(a); //return a; } //document.write(new_variable); } function circle_form() { var n = prompt("Enter value", ""); circle['new_variable'] = n; circle.method_Adding_Properties_to_an_Object(); } circle_form(); question two: What debugger do you recommend for js Dream weaver is good to check syntax but i prefer notepad++
VIEWS ON THIS POST

208

Posted on:

Monday 12th November 2012
View Replies!

Javascript works in all be IE

OK, I'm at a loss... I have code that works in all browsers but IE. See the code at: http://jsbin.com/uzo...edit#javascript,html,live In jsbin, it works in IE, but once I move it to my server it will not work, see: http://www.scrapbuck.../uzamam.10.html Any ideas
VIEWS ON THIS POST

90

Posted on:

Monday 12th November 2012
View Replies!

works in FF but not in Chromium

i have this script (and more but the problem is in these piece of code, i think) So, in FF i have a image and it moves with arrow keys. But in Chromium, the image is static, the action of the buttons is null, nothing happens any help function desenhaBonecoBx(){ clear(); context2D.drawImage(bonecoBottom, x, y); y += 10 * yDirection; } //mover boneco function moverBoneco(dir){ if (dir == "esquerda") { desenhaBonecoDir(); } if (dir == "direita") { desenhaBonecoEsq(); } if (dir == "cima") { desenhaBonecoCim(); } if (dir == "baixo") { desenhaBonecoBx(); } } //teclas function teclar(evt){ if (evt.keyCode == 38) { moverBoneco('cima') } if (evt.keyCode == 40) { moverBoneco('baixo') } if (evt.keyCode == 37) { moverBoneco('esquerda') } if (evt.keyCode == 39) { moverBoneco('direita') } } window.addEventListener('keypress', teclar, true) This post has been edited by felito: 08 March 2011 - 10:46 AM
VIEWS ON THIS POST

126

Posted on:

Monday 12th November 2012
View Replies!

works in FF but not in Chromium

i have this script (and more but the problem is in these piece of code, i think) So, in FF i have a image and it moves with arrow keys. But in Chromium, the image is static, the action of the buttons is null, nothing happens any help function desenhaBonecoBx(){ clear(); context2D.drawImage(bonecoBottom, x, y); y += 10 * yDirection; } //mover boneco function moverBoneco(dir){ if (dir == "esquerda") { desenhaBonecoDir(); } if (dir == "direita") { desenhaBonecoEsq(); } if (dir == "cima") { desenhaBonecoCim(); } if (dir == "baixo") { desenhaBonecoBx(); } } //teclas function teclar(evt){ if (evt.keyCode == 38) { moverBoneco('cima') } if (evt.keyCode == 40) { moverBoneco('baixo') } if (evt.keyCode == 37) { moverBoneco('esquerda') } if (evt.keyCode == 39) { moverBoneco('direita') } } window.addEventListener('keypress', teclar, true) This post has been edited by felito: 08 March 2011 - 10:46 AM
VIEWS ON THIS POST

203

Posted on:

Monday 12th November 2012
View Replies!

firefox works, IE and Safari 4 dont

this is wierd, does anyone else have problems with ajax in anything other than FF as mine works perfectly in FF but not at all in IE or Safari, i havent tested any other browsers. how can i fix this easily without having to rechange all my code. i mean i use this function but it obviously isnt working. because i dont get any errors function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; }
VIEWS ON THIS POST

164

Posted on:

Monday 12th November 2012
View Replies!

slideshow works perfectly in firefox but generates error in IE

Posting this here as well as PHP as it may have something to do with the JS I'm using. My slideshow works perfectly in Firefox but I've noticed that when viewed in IE that my slideshow still works well but generates the following error Error in IE6/7 Line: 1 Char: 1 Error: Object expected Code: 0 Here is my source code and the code of the following files that I use: Source code of page: Home var counter = 0; var showImageFor = 2; //seconds function runImages(){ milliseconds = showImageFor * 1000; setInterval("showImage()", milliseconds); } function randOrd(){ return (Math.round(Math.random())-0.5); } images.sort( randOrd ); var speed = 15; // Lower numbers yield a faster transition - must be 2 or higher var delay = 2; // Number of seconds between each slide transition var pf = new photofader("pf","photoholder",images); slideshow.php class.photofader.js function photofader(nm, mainDiv, imgArr){ this.name = nm; this.imgArr = imgArr; this.curImg = 0; this.curDiv = 1; var mainDv = document.getElementById(mainDiv); document.pfObj = this; document.write("\n"); document.write("#pf_photo1 img { visibility:hidden; }\n"); document.write("#pf_photo1 { position:absolute; z-index: 1; }\n"); document.write("#pf_photo2 { position:absolute; z-index: 0; }\n"); document.write(""); this.initImages = function() { document.write("\n"); for(var i=0; i
VIEWS ON THIS POST

88

Posted on:

Thursday 15th November 2012
View Replies!

Span inside span not working in Firefox but works in IE

Following code works in IE but not in Firefox. Its a simple functionality. On mouse over sub menu should be displayed. function toggle(id) { if (elCurDisplay != null ) { elCurDisplay.style.display = 'none'; } el = document.getElementById(id); elCurDisplay = el; var display = el.style.display '' : 'none'; el.style.display = display; } Main One Child 1 Child 2 Child 3 ** edit ** This post has been edited by no2pencil: 09 April 2008 - 02:23 AM
VIEWS ON THIS POST

121

Posted on:

Thursday 15th November 2012
View Replies!

textbox id is not defined error for firefox, works fine in IE

I'm working on something similiar to a shopping cart item page. There is a table of items. Each item has an image, a textbox for the qty and an image for the add button. When the add image is clicked ...
VIEWS ON THIS POST

95

Posted on:

Friday 16th November 2012
View Replies!

Javascript code works only when CSS file is removed

Hi. I have a javascript code inserted before closing tag that is meant to change the color of a table row when the mouse is placed over it. It works only when I remove the css file. Please advise what is the problem, I need them working together. The Javascript code is as follows:
VIEWS ON THIS POST

157

Posted on:

Friday 16th November 2012
View Replies!

Validation problem in IE & FF (works perfect in?

I want to have a real-time validation for the first name & last name to check if user entered the data before submit. Well it's work fine in Google Chrome... But in Firefox & Internet Explorer, if user press "Tab" key in "first name", then the alert message will keep LOOPING between "first name" & "last name" to perform the validation n thus infinite alert message keep pop-up. Same apply when user press "Tab" key in "last name" & another LOOPING start. Wondering how the "setTimeout" stuff works... Here's my code, thanks a million =) Form function FN(field) { var chkFN = field.value; if (chkFN == null || chkFN == "") { alert("First name must fill !"); setTimeout( function() { field.focus(); field.select(); }, 50); // setTimeout(0, 50); // field.focus(); // field.select(); return false; } return true; } function LN(field) { var chkLN = field.value; if (chkLN == null || chkLN == "") { alert("Last name must fill !"); setTimeout( function() { field.focus(); field.select(); }, 50); // setTimeout(0, 50); // field.focus(); // field.select(); return false; } return true; } function EA(field) { var chkEA = field.value; if (chkEA == null || chkEA == "") { alert("Email must fill !"); setTimeout( function() { field.focus(); field.select(); }, 50); // setTimeout(0, 50); // field.focus(); // field.select(); return false; } return true; } function validate(form) { var chkFN = document.forms["sendForm"]["txtFirstName"].value; if (chkFN == null || chkFN == "") { alert("First name must fill !"); form.txtFirstName.focus(); form.txtFirstName.select(); return false; } var chkLN = document.forms["sendForm"]["txtLastName"].value; if (chkLN == null || chkLN == "") { alert("Last name must fill !"); form.txtLastName.focus(); form.txtLastName.select(); return false; } var chkEA = document.forms["sendForm"]["txtEmail"].value; if (chkEA == null || chkEA == "") { alert("Email must fill !"); form.txtEmail.focus(); form.txtEmail.select(); return false; } } First Name Last Name Email
VIEWS ON THIS POST

85

Posted on:

Friday 16th November 2012
View Replies!

Function works and then says not defined

I have some code to dynamically retrieve one of three AJAX files and insert it into a DIV The Javascript is function createajax() { var Ajax; try{ Ajax = new XMLHttpRequest(); } catch (e){ try{ Ajax = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ Ajax = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("Error!!!"); return false; } } } return Ajax; } function basicAjaxSwitch(File, Recipient, Animate) { if ( Animate == true ) { Animation(document.getElementById(Recipient)).duration(100).from('opacity', 1).to('opacity', 0).go(); } basicAjaxSwitch = createajax(); basicAjaxSwitch.onreadystatechange = function(){ if(basicAjaxSwitch.readyState == 4){ if ( Animate == true ) { Animation(document.getElementById(Recipient)).duration(100).checkpoint().duration(100).from('opacity', 0).to('opacity', 1).go(); setTimeout('document.getElementById("'+Recipient+'").innerHTML = basicAjaxSwitch.responseText;', 100); } else { document.getElementById(Recipient).innerHTML = basicAjaxSwitch.responseText; } } } basicAjaxSwitch.open("GET", "/ajax/"+File, true); basicAjaxSwitch.send(null); } function changesidebarinfo(changeto) { if ( changeto == 'login' ) { Animation(document.getElementById('main_layout_accountlinks_background')).to('left', '0px').duration(100).go(); Animation(document.getElementById('main_layout_accountlinks_login')).duration(100).to('color', '#FFF').go(); Animation(document.getElementById('main_layout_accountlinks_signup')).duration(100).to('color', '#000').go(); Animation(document.getElementById('main_layout_accountlinks_about')).duration(100).to('color', '#000').go(); basicAjaxSwitch('contentinfo/login.php', 'main_layout_rsbinfo_container', true); } else if ( changeto == 'join' ) { Animation(document.getElementById('main_layout_accountlinks_background')).to('left', '50px').duration(100).go(); Animation(document.getElementById('main_layout_accountlinks_login')).duration(100).to('color', '#000').go(); Animation(document.getElementById('main_layout_accountlinks_signup')).duration(100).to('color', '#FFF').go(); Animation(document.getElementById('main_layout_accountlinks_about')).duration(100).to('color', '#000').go(); basicAjaxSwitch('contentinfo/join.php', 'main_layout_rsbinfo_container', true); } else if ( changeto == 'about' ) { Animation(document.getElementById('main_layout_accountlinks_background')).to('left', '100px').duration(100).go(); Animation(document.getElementById('main_layout_accountlinks_login')).duration(100).to('color', '#000').go(); Animation(document.getElementById('main_layout_accountlinks_signup')).duration(100).to('color', '#000').go(); Animation(document.getElementById('main_layout_accountlinks_about')).duration(100).to('color', '#FFF').go(); basicAjaxSwitch('contentinfo/about.php', 'main_layout_rsbinfo_container', true); } } And the HTML that triggers the actions is   Log In Join About When I click one of the 3 buttons (doesn't matter which) the result is exactly as intended. Then when I click another (or the same) button, nothing happens and Firebug gives the error basicAjaxSwitch is not a function changesidebarinfo("login")site.js (line 61) function onclick(event) { changesidebarinfo("login"); }(click clientX=816, clientY=41)2 (line 2) [Break on this error] basicAjaxSwitch('contentinfo/login.php...'main_layout_rsbinfo_container', true);\n
VIEWS ON THIS POST

171

Posted on:

Friday 16th November 2012
View Replies!

Copy-Paste from MS Excel fails with IE but works with?

I built a very simple app using a PHP form with a bit of Javascript. In my form, I have a text input which I used to run a database search. In case I have multiple values, I have a bit of code that puts a comma in between each. The weird part is this: In Firefox, I can go do MS Excel, copy 5 values and paste them in the text input control. I can see all 5 values pasted and commas in between. In Internet Explorer version 8, I can go do MS Excel, copy 5 values but only ONE value (the first number) gets pasted in the text input control. This is my html RIDs This is my Javascript in my page header function removespaces(which) { str = which.value; str = str.replace (/\s|\n/g,","); // replace space or newline by commas document.myform.DBRIDs.value = str; } Pretty basic stuff. Tried changing textinput to textarea. No change. Am able to paste without problems from Firefox, Chrome, Safari and even Opera! IE is a no go. What am I missing How come IE cannot paste like Firefox
VIEWS ON THIS POST

97

Posted on:

Monday 19th November 2012
View Replies!

event works in IE but not in firefox

Can you help me with the equivalent code of this in firefox
VIEWS ON THIS POST

99

Posted on:

Monday 19th November 2012
View Replies!

Simple JavaScript function works in all browsers but?

IE tells me there's an error on line 17, which is the onload method of the body tag. So here's the code... function startUp() { setFocus(); } function setFocus(){ document.frmSearch.txtSearch.focus(); document.frmSearch.txtSearch.select(); } And here's how it's called: I tested this in Safari, Firefox, IE 8, Opera, and Chrome. Works in all except IE 8.
VIEWS ON THIS POST

106

Posted on:

Monday 19th November 2012
View Replies!

Ajax only works in IE

Found the problem. I forgot to add id="q" in the input field. And this was thanks to the discover of the Opera debugger which can be enabled through the preferences list. In my opinion Opera has the best debugger in the World Web as it tells you the near exact error line and a few related lines. *Solved*
VIEWS ON THIS POST

104

Posted on:

Monday 19th November 2012
View Replies!

expanding block script works in safari - not in firefox?

I have a script showing / hiding a form on a page that seems just fine in Safari 3 but not Firefox: In firefox it sems to reveal the form then quickly jups to a new page with the script in the address bar. Can anyone help
VIEWS ON THIS POST

112

Posted on:

Monday 19th November 2012
View Replies!

iframe not working in IE, works fine in Firefox

I am trying to implement a customer survey into our webpages. The survey consists of a javascript file which launches an html file in an iframe. When the user meets certain parameters defined in the js file it launches the iframe. This works fine in Firefox and the iframe is launched perfectly. In IE this does not work at all. When the iframe is supposed to be launched the page goes blank. It does not even continue to load the web page and seems to be trying to open the html file, but does not. It does not throw any errors. The js file is included in a jsp and in the same jsp a function of the js file is called. This is the function that checks if requirements are met and then launches the iframe. The implementation seems to be correct as it does work in Firefox as expected. In firefox, the webpage loads and the iframe opens the html without a problem. Any ideas why this would happen I cannot give you a url to see the error as this is in our development environment, but was hoping maybe someone has some experience with an issue like this and can point me in the right direction.
VIEWS ON THIS POST

135

Posted on:

Monday 19th November 2012
View Replies!

Script to create an input inside a div only works on certain divs?

!! I'm losing my mind here...I have a really simple script that creates an input box inside a div id -- it was working great..then I added in a piece where it would show other peoples existing replies and create the box at the top but under the original post...sometimes it works on the first div, other times it works on every third div but isn't working all the way around and I'm beating my head against a wall here... Here's the javascript function create_reply_input(post_id, db_id){ if(document.getElementById(post_id.id).innerHTML.indexOf('post_rep_box')==-1) document.getElementById(post_id.id).innerHTML += "Public Reply "; } Here's the HTML output so you can see where I'm assigning it James P McGovern Look a real live post 12/05/2011 07:56:04 PM Reply Remove As always,
VIEWS ON THIS POST

210

Posted on:

Wednesday 21st November 2012
View Replies!

Javascript works in every browser except IE.

this script is doing is loading images into a list from and XML file When I run this script, it runs perfectly in FF, Chrome, Opera, and Safari. IE is the only one it doesn't work in. I've searched all over and haven't be able to find anything. if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET", "xml/IBCAds.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; document.write(''); var x = xmlDoc.getElementsByTagName("Ad"); for (i = 0; i < x.length; i++) { document.write(""); document.write(""); document.write(""); document.write(x[i].getElementsByTagName("Name")[0].childNodes[0].nodeValue); document.write(""); document.write(""); } document.write(""); document.write(''); var x1 = xmlDoc.getElementsByTagName("Ad"); for (i = 0; i < x.length; i++) { document.write(" "); document.write(""); document.write(""); } document.write(""); and here's part of my xml file. 4:12 Student Ministry Images/412.png #2 2 http://www.expectinganencounter.com/Expecting_An_Encounter/Podcast/Podcast.html Images/412_Icon.png IBC Kids Images/IBC_Kids.png #3 3 http://www.expectinganencounter.com/Expecting_An_Encounter/Podcast/Podcast.html Images/IBC_Kids_Icon.png I haven't done a lot of work in Javascript and your help is much appreciated.
VIEWS ON THIS POST

98

Posted on:

Wednesday 21st November 2012
View Replies!