i have a website at [URL] and i want to allow access to only internet explorer and firefox users. I've heard Javascript is good for this. The reason i want to do this is because in Google Chrome my site messes up on several pages.
I have some Javascript that takes the input from some textboxes and then puts them all into a sentance automatically. It works perfectly in IE but not with FireFox... does anyone know how to make it work with both browsers?
HTML Code: <script type="text/javascript"> function Text_Change() { var TxtFName = document.getElementById("TxtFName"); var TxtSName = document.getElementById("TxtSName"); var TxtAge = document.getElementById("TxtAge"); var TxtLoc = document.getElementById("TxtLoc");
var SpnDisp = document.getElementById("SpnDisp");
var FName = TxtFName.value == "" ? "?" : TxtFName.value; var SName = TxtSName.value == "" ? "?" : TxtSName.value; var Age = TxtAge.value == "" ? "?" : TxtAge.value; var Loc = TxtLoc.value == "" ? "?" : TxtLoc.value;
SpnDisp.innerHTML = "Hello " + FName + " " + SName + ", " + "you are " + Age + " years old and " + "at the moment you live in " + Loc; } </script>
I am using this code for an HTML form and I am using Javascript to do form validation:
<form name = "Reginfo" method="post" action="/cdcsreg/procdata.php" onSubmit = "return verify_data();">
In the "verify_data" (javascript), it processes the instructions when I use Firefox and the processing stops, like it should. However, when I use IE the processing continues to "procdata.php".
I have a problem with a Javascript, which doesn't works in Firefox You can have a mouse over the 2 first pictures, but after the second picture has moved over the screen, nothing is happening when you move the mouse over the slideshow The source code:
I am using jquery ajax to retrieve data from an asp.net web service. It works ok in IE8; but when I tried it on Firefox (3.6 or so), it generated an error: parsererror
This is part of a demo I'm doing in class of forms and using Javascript to validate. What's supposed to happen is this: when the user selects a choice, it's displayed in the field. If the user selects the right choice (Optimus Prime in this case) then a pop-up says "You win." The code works in Firefox but not in IE.
Form: Code: <form name="form3" onChange="javascript:checkChoice();"> Who is the coolest Transformer? <select name="tf" size="1"> <option selected>Choose <option value="Optimus Prime">Optimus Prime <option value="Megatron">Megatron <option value="Bumblebee">Bumblebee <option value="Starscream">Starscream </select> <br><br>You chose <input type="text" name="output3" value="" size=20 readonly> </form> checkChoice() function:
Code: function checkChoice() { var choice = document.form3.tf.selectedIndex; document.form3.output3.value = document.form3.tf.options[choice].value; checkData3(); } checkData3() function:
I'm new to client side js, so I'm trying to figure out the relationship between the js frames object and the <frame></frame> tags. I have read and reread the information in my book on this subject and googled many examples, but still need clarification.if I have the following code in the body of an HTML document.
Then I should get back 2 when I do this alert(document.frames.length);
Instead I get document.frames is undefined from Foxfire and get 0 from ie8.If I replace document with top, window, self or parent I get 0 in both Foxfire and ie8.
I wrote the following page in a day or two. Everything seems to work excellent, apart from in Firefox (FF) in which it doesn't seem to work at all. None of the other browsers have any trouble with it.
I'm pretty new to Javascript (everything you see in the source code is pretty much all I know) and I have absolutely no idea why it doesn't work in Firefox.
The page in question could be found [link has been removed]. It's all there is to it.
I use this javascript in my site's header.php to preload five menu a:hover images:
<script type="text/javascript"> function preloader() { counter
[Code]...
in the body tag. I loads fine in IE7 and IE8, but Firefox seems to ignore it and not preload the images properly. What am I missing here? Did I make a mistake or does Firefox 3.5 just work differently with the loading of these five small images?[URL]...
Using Firefox 3, trying to use a confirm box where it says ok or cancel. The box shows up to confirm ok or cancel but if I click cancel it doesnt seem to return false, it just goes to the link of the url set in href. Im including the js file in the page:
Code: <script src="js/forms.js" type="text/javascript"></script> I then call it in the link:
I was trying to get the code below to work in Firefox as I can see it was aimed at old IE and Nestscape. I does work on IE7 but not Firefox or Safari or Chrome.What I was trying to achieve was playing a sound on mouseOver which would stop on mouseOut. That's all. I tried other things before I bumped into the code bellow. This one was very much what I needed but I really need to get it work in browsers other than IE and Netscape.Bellow is the original code:
Code: <script LANGUAGE="JavaScript"><!-- var aySound = new Array(); // Below: source for sound files to be preloaded[code]....
re-engineer the above but have a different solution to playing a sound when you hover over a button (solution that works on the major browsers out there),
I have an image map. I need to use XHTML 1.1 for this project and the code must validate.The problem is, XHTML 1.1 no longer supports the Name Attribute, it will not validate any code containing the Name Attribute.If I remove the Name Attribute, the image map does not work in FireFox.Are there any means or other method to make this work in Firefox without the Name Attribute?Here is the code for reference:
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
i am using the following code to set the height of the div element based on its contents inside the div using the property scrollHeight. it works fine for IE but not firefox.
I'm trying to send a byte array (JPG image) from javascript to a servlet for processing. I'm using Base64 to encode the byte array in javascript, and then a base64 decoder in the servlet to decode it.
The thing is, that even though the String has the same length on both sides, the decoded byte array is shorter then the original one. I've tried a couple of different implementation on both sides, with the same results.
Dont know how to put this. In my application i had one jsp where i did some modifications in the java script function and increased the maxlength of a field.
Just these two major modifications i did.But strangely everything got screwed up the function is not being called and many other java scripts func are not being called. Many buttons are not behaving strangely. That jsp is a very big one and a part of a major colossal application so i am not pasting it.
i have a javascript function to highlight google search keywords in the page. it works well on IE and mozilla browsers. for the page OnLoad, i call the Highlight() method, and that highlights the words in the page, and inserts a div element with the message: "your search terms have been highlighted..." and a link to remove the highlighting, which has href='javascript:removeHighlight(..)', but that only works in IE, not firefox 1.0. Code: