SEARCH YOUR SOLUTION HERE  

Javascript is not working in IE6

I have created a web page with javascript, its successfully working in firefox but not in internet explorer version 6 and 7. I am not good in scripting and I have done this page with the help of my friend. I have uploaded the zip file. It contain two directories one is for web page (php_files) other for support file (Support_Files). Please unzip the file and test the page. I have also uploaded my browser output for Firefox and Internet explorer. My apologize I have not shared my original page, this is the test page. Please help me and also let me know if you need any more information regarding the same.

Posted On: Saturday 24th of November 2012 04:30:58 AM Total Views:  110
View Complete with Replies




Related Messages:

javascript not working   (101 Views)
this is just part of the code. when i added the variable hide it stopped working. basically i want the php variable hide to add on to the variable newtext2. if i've implemented it wrong, need help correcting it. var newtext2 = obj( "reply" ).value; var hide =
onClick not working   (112 Views)
This code adds & removes textboxes from the screen. In the remove function, it also renames any textboxes that come after the one deleted so that the numbering stays in order (i.e. 1,2,3,4 instead of 1,2,4,5,8) and updates the count parameter of the textbox's corresponding remove link so that the textbox's name (i.e. file3) matches its count parameter. This is the line of code that appears to be causing me a problem: document.getElementById('removeLink' + nextFile).onclick = "removeAdditionalFile(this.parentNode, ' + count + ')"; in the while loop of the removeAdditionalFile function. Basically, the textbox doesn't get deleted like it should when you click on the link. My guess would be because "this.parentNode" isn't pointing to the right thing, but I don't understand why it's not. Anybody know how to fix this I had been fooling around for awhile with updating the entire innerHTML instead of just the onclick (in the while loop of the remove function), and it was kind of working but not quite and it was much more complicated, so if I could just get the onclick changed correctly, that'd be great. function addFileTextbox() { //main div that the other divs will be added to var divLocation = document.getElementById('addToDiv'); //create new div for holding textboxes, & give it a unique name for uploading var newDiv = document.createElement('div'); var count = document.getElementById('addToDiv').getElementsByTagName('input').length + 2; //+2 because since it hasn't been appended yet, the length will be short one. We need this number to set the unique div name. var divIDName = 'file' + count; var removeLinkID = 'removeLink' + count; newDiv.innerHTML = ' Remove'; //THIS WORKS FINE //Attach new div to main div location divLocation.appendChild(newDiv); //Increase the count of files to be uploaded (+1 for the file textbox already there) var fileCount = document.getElementById('addToDiv').getElementsByTagName('input').length + 1; document.getElementById('fileCount').value = fileCount; } function removeAdditionalFile(divIDNode, count) { //get main div that the other divs are attached to var divLocation = document.getElementById('addToDiv'); //delete the file textbox divLocation.removeChild(divIDNode); //Decrease the count of files to be uploaded (+1 for the permanent file textbox) var fileCount = document.getElementById('addToDiv').getElementsByTagName('input').length + 1; document.getElementById('fileCount').value = fileCount; //rename file textboxes that come after the one deleted so that they get uploaded var nextFile = count + 1; while (document.getElementById('file' + nextFile)) //there are file textboxes after the one deleted { //rename the file textbox to be one less & change the count parameter of the remove link document.getElementById('file' + nextFile).name = "file" + count; document.getElementById('removeLink' + nextFile).onclick = "removeAdditionalFile(this.parentNode, ' + count + ')"; //THIS DOESN'T WORK nextFile++; count++; //will always be one less than nextFile } }
OnClick/OnChange not working in IE   (206 Views)
I have a checkbox on click of which I'm calling a JavaScript function to disable another checkbox. The onClick event is not working in both Firefox/IE. I am capturing onChange event of the checkbox1 as of now which works in Firefox, but not working in IE. Please suggest a way to implement this. This is urgent. Thanx.
AJAX and stylesheets developed for IE not working?   (139 Views)
Hi ALL, We have developed some HTML pages code using AJAX and we have used some style sheets. This works fine in IE but the style sheets used are getting distracted Firefox as well as the AJAX calls are not working in Firefox. Please help.
why this is not working   (96 Views)
hi i wrote a simple ajax script its working and i don`t know why can any one here can help me when we place a mouse on a link then it shows that page this is my basicajax.php page ajax praveen kumar goud and this is my script.js file window.onload= init; var xhr=false; var xpos,ypos; function init(){ var alllinks=document.getElementByTagName("a"); for(var i=0;i
onclick problem in IE, working in FF/other   (142 Views)
! I am trying to make an image gallery navigation work in IE (works in FF2+, safari, not working in opera 9, probably other browsers) but my severely limited Javascript knowledge is really holding me back! I am using JonDesign's SmoothGallery (camelback heaven, there), but the problem almost certainly lies in my rouge implementation of onclicks. The website in question is http://honorrollmusic.com , but here is the code that is occasionally functioning (ignore the class and mouseovers): I've also tried, to no avail: There is also a thumbnail gallery that calls individual images, as follows, though I'm sure the problem is the same as the problem with the above code: Lastly, here is the script: function startGallery() { myGallery = new gallery($('myGallery'), { timed: false, showCarousel: false, showInfopane: false, showArrows:false, slideInfoZoneSlide: false, delay: 3500 }); } window.addEvent('domready',startGallery); In any case, this seems to work in about half the browsers I've tried, which makes me think that maybe my code is pretty close but I'm off a bit with my syntax or something. The linked javascript file is at http://honorrollmusic.com/scripts/gallery.js and the original gallery is at http://smoothgallery.jondesign.net/ , but I'm hoping the answer is glaringly obvious.
Anyone see why this isn't working for IE?   (113 Views)
all Can anyone see why this isn't working for IE but is Firefox I'm trying to update a div on the page using some javascript and php. Whenever a dropdown box on the html page is changed, its value is passed to a javascript function, then onto a php file. The php file runs and javascript updates the div. HTML Code: Indoor Outdoor Sand Javascript Code: var xmlhttp; function updateTourns() { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } var url = "include/js/tournSearch.php"; url = url + "in_out_door1=" + document.getElementById('in_out_door').value; url = url + "&class1=" + document.getElementById('class').value; url = url + "®ion1=" + document.getElementById('region').value; url = url + "&level1=" + document.getElementById('level').value; url = url + "&year1=" + document.getElementById('year').value; url = url + "&sid=" + Math.random(); xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) document.getElementById("tourn").innerHTML=xmlhttp.responseText; } function GetXmlHttpObject() { if (window.XMLHttpRequest) return new XMLHttpRequest(); // code for IE7+, Firefox, Chrome, Opera, Safari if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP"); // code for IE6, IE5 return null; } Finally, tournSearch.php $in_out_door = $_GET['in_out_door1']; $class = $_GET['class1']; $region = $_GET['region1']; $level = $_GET['level1']; $year = $_GET['year1']; echo $in_out_door . ", " . $class . ", "; In Firefox whatever was selected from the dropdown box is echo'd. This does not happen in IE. Thank you!
Spry menu not working in IE   (256 Views)
Can anyone help me I tried using spry in dreamweaver CS3 for the first time and, upon completion of my site, found that it isn't working in some versions of IE. It opens perfectly in Firefox, Safari, and Opera. Different versions of Internet Explorer seem to carry out the code differently. Here is my site http://www.kearneyevents.com/index.html And my css http://www.kearneyevents.com/SpryAssets/SpryMenuBarHorizontal.css and my javascript http://www.kearneyevents.com/SpryAssets/SpryMenuBar.js If ANYONE could look over my code and help me I would really appreciate it!! PLEASE!!
Ajax.PeriodicalUpdater (Prototype) not working with?   (145 Views)
I'm trying to use Prototype's Ajax.PeriodicalUpdater to scroll through/display an array of items on an interval. So far I've managed to make it display a new item every 2 seconds, but it only works in Firefox. Haven't tested in Safari or Opera yet...but I know it doesn't work in IE6. It can be seen below here: http://squarebox.org/sandbox/comment_slide/ on the index.php page, I have this script written: Event.observe(window, 'load', function() { new Ajax.PeriodicalUpdater('comment_slider', 'comment_slider_ajax.php', { method: 'post', frequency: 2, onSuccess: function(){ new Effect.Fade('comment_div', { duration:0.3 }) }, insertion: 'top', }); }); function showComment(divId){ new Effect.SlideDown(divId, { duration:0.3 }); } showComment() is called in comment_slider_ajax.php, which displays the "comment_div" and calls the showComment() function. I've searched through some similar issues -- some people seem to experience it, but others confirm that it's working. I've seen some users say that the object only fires the AJAX request once, then stops working. Anyone have any ideas
AJAX snippet not working with Firefox   (104 Views)
hello people, here is a piece of AJAX that i have used in my JS file. It's working fine with IE but somehow the page does not load in Firefox. function secondRead(){ if(xmlHttp.readyState == 4){ if (xmlHttp.status == 200) { try{ var status = xmlHttp.responseText; alert(status); status = status.split(":")[0]; status = status.split("ment ")[1]; if(status == "Success"){ htmlResponse = " Your transaction was successful. Congratulations, Your E-Commerce trainer will contact you within 1 business day. Please take a moment and fill out the survey below, so we may know how to serve you better. 1. What do you currently do for a living Which best describes your industry   -----Business----- Agriculture, Fishing and Forestry Broadcast/Cable/Tv/Radio Construction Engineering and Management Graphic Design Insurance Legal Manufacturing Media/Entertainment/Arts Mining Non-Profit/Charity Other Industry Printing and Publishing Professional Services (Business) Professional Services (Technical, Web, IT) Real Estate Retail/Wholesale/Trade Services Technology/High Tech Telecommunications Transportation Utilities -----Creative----- Advertising Architecture Film/Video/Animation Production Membership OrganizationPhotographyPublic Relations-----Education-----Education - Higher EdEducation - K-12-----Government-----Government - FederalGovernment - Military/Aerospace & DefenseGovernment - State/Local-----Other-----Other-----Life Sciences-----Health CareHospitality and Food ServicesPharmaceutical/Biotech2. What is your age   Less Than 25 25 - 50 Above 50 3. What is a suitable time to contact you   Before 12 noon Between 12 pm and 5 pm After 5 pm 4. How Much Debt Are You In   Less than $10,000 Between $10,000 and $50,000 Between $50,000 and $100,000 More than $100,000 5. How Motivated Are You To Succeed   Not that motivated Slightly! Some extra cash would be nice Very Motivated! I need more money FAST Extremely Motivated! I am in debt and at RISK 6. How Much Time Can You Dedicate To Making Money Online   Just 1-hour per week 5-hours (1-hour per day) 10-hours (2-hours per day) 20-hours (4-hours per day) 7. If You Are Selected To Work With Our Team, How Committed Are You to Using Our Training Program Please Select One   I am not really that interested but I will at least see what all the fuss is about I think this might work for me. I am willing to try anything once I am 100% committed 8. If you are selected, what would your goals be   I would like to quit my job and work from home I would like to get out of debt I want to secure my financial future "; } else if(status == "Failed"){ htmlResponse = " There was a processing error, please click the home button and try again. "; } document.getElementById("main").innerHTML = htmlResponse; } catch(err){ alert("!!!"); } } } }//end of secondRead() it could be something about the split() used here. please have a look and let me know ASAP.
alert(xmlHttp.responseText) not working   (132 Views)
i want to get the alert on responce text, but getting nothing, my code is as follow, var xmlHttp function checkCAP(str) { if (str=="") { alert("plase enter the code"); return } xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="test.php" url=url+"id="+str xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true) xmlHttp.send(null) } function stateChanged(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { var response = xmlHttp.responseText; if( response == "incorrect"){ alert(Please enter the right words); } } } function GetXmlHttpObject() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } Securimage Test Form
javascript code not working in firefox   (348 Views)
Your code is far from being a proper XHTML document, but works in IE, since its really forgiving. A few things: the form elements should go in the form tag. Its only when they go inside the form tag, a name attribute given to them is valid, otherwise name attribute for non-form elements is deprecated. The language attribute of tag is deprecated. Use 'type ' instead. Something like . Its always recommended to place your script in the header section or include it at the bottom of your page. The way you are accessing the elements is completely wrong. One possible way would be to just pass the form element to the validate function and let the function pull out values from the form. Something like this: I would recommend you to get hold of a good tutorial (google is your friend) and start some serious reading., thanks got it working.... another thing, can you tell me how to get a login dialog box at the start i.e "on loading" of a page, Erm.. not using javascript. It's not a good way to adequately password protect pages. The best you can do with javascript is: - hide everything but the password form on the page (wrap everything in an html element, set display:none; or visibility:hidden; in css) unless the user enters the correct password (then set everything visible, using display:; or visibility:visible; respectively). unfortunately, everything on the page can be seen using view > source. - have the page redirect when the user enters the correct password ( as you're doing here ); again, anyone can look at the source, and find out the URL of the restricted page. - the best javascript 'password protection' i've seen did this: have a page with a password form; when the user enters anything in the password field; the script redirects to a folder with the name of the correct password; the basic principle is, that it's difficult for the average user to know where the folders on a webserver are, unless you give some hint ( links, common folder names, etc ). every incorrect guess will redirect to some unmapped location on your server; not ideal, but it restricts access. the bad point here, is that any user watching an 'admin' can see what the password-named folder is.. but, it's the best javascript password restriction method that I can imagine. You could take it a step further, and transform the password entered by some text/ascii math function before redirecting, but, the script suffers from the same vulnerability I mentioned if someone sees an admin login, although, its less obvious if the function generates some long non-dictionary string of characters. the real solution, is not to use javascript for password restriction. use some method server-side that only sends pages to users that are authorized. aswell as a good set of tutorials for javascript, some for basic server side authorization, and somewhere in there the client-protocol-server relationship, would be quite useful... If you want to go ahead with JS validation regardless of that advice, and you just want an input dialog to pop-up; this code _should_ do that: http://www.java2s.com/Code/JavaScript/Window-Browser/PromptInputDialog.htm I haven't tested it atall, but it looks alright, although it's old-school quirks mode HTML. It would need the same fixes as s.o.s mentioned with regard to your posted code in order to make it 'new standards compliant'
Help! Tab content not working in FF   (87 Views)
I'm having problems with a tab content script/css in the way it displays in Firefox. http://www.godirect.com.sg/etravel3/test/etravel.htm It looks perfectly alright in IE, but in Firefox the big shaded tab on the far right just wouldn't line up. I have used 'html>body' for Firefox so the layout in IE remains unchanged. However, no matter how I try to extend the last tab out, anything over the padding margin set currently, the last tab gets swipe down below. However, the code in Firefox works without a table enclosing it like this one: http://www.godirect.com.sg/etravel3/Untitled-2.htm I noticed that if you click on the last tab, there's an extended invisible margin to the right of it. That could be the reason why the tab pushes down when placed in a set table width. As I'm not allowed to redesign this, plus I'll probably burn in hell for using DIVs with tables. My question is, why does Firefox render the code like that, is there something I can do to fix this so it lines up properly like it does in IE I'll appreciate any help I can get. Thank you very much. (This tab content script was taken from Dynamic drive. It uses a JS file and CSS. http://www.godirect.com.sg/etravel3/test/tabcontent.js ) Below is the CSS that the tab panel uses (for Firefox) .shadetabs1{ padding: 0px 0px -5px 0px; margin-left: auto; margin-right:auto; margin-top: 0px; margin-bottom: 0px; font: bold 15px tahoma; list-style-type: none; text-align: left;/*set to left, center, or right to align the menu as deed*/ } html>body .shadetabs1 li{ display: inline; margin: 0; margin: 5px 19px 5px -40px; } html>body .shadetabs1 li a{ text-decoration: none; position: relative; z-index: 1; padding: 19px 62px 4px 20px; margin-right: 5px; border-bottom: 0px solid #778; color: #2d2b2b; width:206px; background-image: url(images/tab_up.jpg); background-repeat:repeat-y; } .shadetabs1 li a:visited{ color: #2d2b2b; } .shadetabs1 li a:hover{ text-decoration: underline; color: #2d2b2b; } .shadetabs1 li a.selected{ /*selected main tab style */ position: relative; width:1px; top: 0px; } .shadetabs1 li a.selected{ /*selected main tab style */ background-image: url(images/tab_down.jpg); border-bottom-color: white; } .shadetabs1 li a.selected:hover{ /*selected main tab style */ text-decoration: none; }
AJAX / XMLHttpRequest working in all browsers except?   (93 Views)
Hi i am new to AJAX but i havejust managed to write one of my first basic scripts. What it does is takes all the news items out of a database and lists them as links. When you click a link i want all of the data that is linked to that news item to display underneath. Now i have got this to work except it will not work in Firefox, all other browsers it is fine. Below is the code i have written, Could anyone please help.
please help ,simple js not working   (240 Views)
It doesn't work because you don't need to surround the link with script tags for that inline javascript to work. The click this link will work just fine on its own.
reset list box is not working javascript   (76 Views)
Hmm it says SCRIPT ERROR when i click RESET (Nothing else happens) Hmmm,looks good though!
Can't put 2 Javasript working in the same page!   (109 Views)
I am working on a website and I dont know much of Javascript,but I need to put to work different scripts on the page,and it wont work!:sad: I've already try to chage all that I remeber to chage,but dosen't work!What I am doing wrongCan anybody help me out Here is my code: window.onload = function() { // Pick your classes var myBox = document.getElementsByClassName('box_title'); var myBoxOpen = document.getElementsByClassName('information'); // Create the accordion var myAccordion = new fx.Accordion( myBox, myBoxOpen, { onActive: function(tog){ tog.setStyles({color: '#fff', background: '#840000'}); }, onBackground: function(tog){ tog.setStyles({color: '#b7d30b', background: '#7d8c87'}); }, alwaysHide: true } ); } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } $(document).ready( function(){ $('ul#hFade').innerfade({ speed: 7000, timeout: 13000, type: 'sequence', containerheight: 'auto' }); });
IE 7 and existing online ordering system not working   (82 Views)
I need someone to point me in the right direction or just hit me over the head and tell me what I need to do. I feel comfortable doing the html coding - javascript is not my friend as of yet -- but I am working on that. The other programmers here have embraced it faster than I have but they do not know the answer either. We have an existing online ordering system that works great in IE6 but now the drop downs are doing strange (unwanted) things. In one instance the box will not stay open unless you right click on it first. In the others (which are many) the box opens and you can make a selection but then your mouse is disabled on this page for minutes at a time. The way around that is to get focus off of that page. I know there is an issue with the onblur() event but I don't know what it is or how to solve it, and I don't know if that is the only issue.
javascript image animation not working????   (192 Views)
Javascript not working under Mac! Why O why?!   (59 Views)
, I have a javascript code (a part of it is in php) that populates a pull-down menu. It works perfectly well with Explorer, Netscape and Firefox under Windows. But impossible to make it work with Explorer or Safari under Mac!!! Is javascript different between windows and mac Here's the code, if anyone has the slightest idea or suggestion.