Hiding Function Works On IE, But It Doesn't On Moziila
Jul 20, 2005
i'm wondering why this hiding and showing function works on IE (6) but
it doesn't work in Mozilla Firebird (0.7)
function fnc_show(num){
for(i=1;i<7;i++){
eval("t_" + i + ".style.display = "none"");
}
eval("t_" + num + ".style.display = "inline"");
}
t_1, t_2 ...t_7 are the ids for TR elements in a table, i.e. with
fnc_show(3), it will show only t_3. This works without a problem on IE, but
it seems to do nothing in Mozilla, i only get an error telling that t_1 is
not defined.
I'm wondering too, if there is a better way to do it, cause i read that eval
function is inefficient .
iam either being really dumb or something is way wrong with the code. i am trying to create a fade in / fade out effect. i know there are tons of scripts out there that do this, but i like to do it myself. my script is only working in firefox at the mo (when it works il cater for other browsers). basically i can get the fade out part to work, but when i want to fade back in it does nothing. now logically id of thought that fading in would be the same as fade out but reversed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
im working on my online portfolio and I have an external javascript file that has functions to add a piece to the collection...here is the link to my pageillustratorthe javascript file is herehttp://www.freewebs.com/harrisonengl...ngleweb/add.jsas you see some of the pieces will show up, and some wont. they are all going off the same function, and all work when i run the html off my computer harddrive rather than the freewebs server.Also, i understand that formatting of the site will get all messed up when it is ran in different browsers... for instance it works in firefox and safari now, but not IE and Chrome
This script is supposed to tally the score of the questions. It shows up fine but it does not tally the score :confused:
<p>You are on a business journey beyond traditional small business style <input type="checkbox" value="1" name="Q1">yes <input type="checkbox" value="0" name="Q1">no</p> <p>You don t want to be the glue holding everyday operations together <input
sort of made a thread about this earlier but I dont feel I explained the problem very well, if you go to http://love2-create.com and click on the orange "view profile" link about halfway down the left hand column a tab opens showing a profile with a small picture gallery at the bottom, this gallery works fine in firefox and google chrome, however in safari it works sometimes but not always and in IE it usually works on the first time the page is loaded but then when the page is refreshed and the profile link is clicked I get an Error: 'document.getElementById(...)' is null or not an object on line 60,the lines in question look like this:
HTML Code: buildcontentdivs:function(setting){ var alldivs=document.getElementById(setting.id).getElementsByTagName("div")
have the follow jwplayer i've got a link that loads the video into the player fine but now i am trying to add another one that load with the hd optionhere the single one works fine
It works perfectly in Firefox and Chrome, but in IE 7/8 it doesnt do anything. In fact, in IE the inputs that I insert dinamically when I press the button " agregar" doesnt appear in the page, but they are there, because when then when i do the Insert I have all of that dinamyc inputs that I put. The problem is that they are not shown in the page.
I have a html document when i run in Internet explorer i am getting the desired output(j query working fine). But i copy pasted the same code in aspx page...the same code is not working properly...
I found this script that hides text and would like to add a loop to the function code. I have given it my best shot but I'm afraid to say my Javascript ability is a little ordinary.with this.PHP Code:
<body> <script language="JavaScript" type="text/javascript"> function sizeTbl(h) {
I have what I think is a strange issue but others may see something I am missing.I am using AJAX functionality to process a php script on a server and then place the output of the script into a div element.Here is the code snippet
Code: function doWork13(typeCode,colorBlockName,objectCategory,imgID){ httpObject = getHTTPObject(); if (httpObject != null) {[code]....
This code shown here works perfectly BUT....I do not want the alert message to be there. When I remove that line of code the script fails to function. There is no error just nothing happens.The function is to replace one image with another and the variable in question is simply the ID tag of the particular image being modified.As I said it works with the alert but does not with out, could it be a timing issue in that the alert gives enough time for the if statement in the setOutput13 function become TRUE
Following function works for IE, but not for Mozilla FF. I am truncating the string to size =20. Also I am using custom attribute att as I have too many tags inside a <td>.
function trunc_dest() { var x = document.getElementById('chtbl');
var t = x.getElementsByTagName('tr'); for (var i = 0; i < t.length; i++) { var d = t[i].getElementsByTagName('td'); for (var j = 0; j < d.length; j++) { if (d[j].att == 'dest') { // var e = d[j].innerHTML; var w_str = unescape(d[j].innerHTML).split('<'); // alert(w_str[0]); if (parseInt(w_str[0].length) > 20) { d[j].innerHTML = w_str[0].substring(0,19)+"...*"; } } } }}
I am not really sure where to start with this as my function works perfect in IE 6. However when I select one of my categories and hit submit in Firefox or IE7 or 8 nothing happens. No error message. Just nothing. How can I get this working for firefox and IE7/8?
[CODE] <script language="JavaScript"> var categories=[]; var categorieslist=[];
I've got this code to work the first time that the user changes the select option: $('select.third, select.fourth').change(function(event){ var id = $(this).siblings('.hidden').text(), token = $('#token').val(); param = $(this).hasClass('third') ? 'isSold' : 'isActive'; value = $(this).val(); $('div#allSheepDisplay').contents().remove().end().load( 'db-interaction/animals.php',{ action: 'update', id: id, token: token, param: param, value: value }, function() { $('select.third').filter(function(){return $(this).val() == '1'; }).css({backgroundColor: 'yellow'}); $('select.fourth').filter(function(){return $(this).val() == '0'; }).css({backgroundColor: 'red'}); }); }); Everything works as I expect - the POST request is made correctly, the database is updated and the display updates correctly. However, if I repeat the same action, selecting a different value, nothing happens until I refresh the page, at which time I can then make the change.
I am studying Javascript to custom my yahoo estore, I need to open a custom sized window in a new browser , I tried the following script on 3 different PCs running XP pro. IE 6, it worked on one and did not work on the other two. Code:
im trying to make a application, im trying to comunicate with the server with the function load, but it doesnt work, also i try with $.ajax, $.get, but nothing works, i have 3 files, html file, php file and javascript with jquery file,here are the php and javascript files:
I've a Javascript function that has to verify if a form field is empty or not. My function works fine on my local server (Vertrigo), but when I upload it on server (online), the function doesn't verify if form fields are empty or not.I'm not good in Javascript
<head> <script type="text/javascript" language="JavaScript"> function empty()
i have used <param name="wmode" valur="transparent" /> and in <embed> tag inserted wmode="transparent" for overlaying the menu over flash player in my web site... it worked in firefox but not in chrome and IE.
I have a script one of my pages which is designed to prevent a user from selecting the same option from a drop down more than once. Here is the script:
Code: function changeSelect(sel) { option = sel.selctedIndex; var sels=document.getElementsByTagName("select");
[Code]....
Here is the basis: A user is greeted with a page of blank fields. On the right is a drop down menu which has the select options you see. The user enters the address of a few DNS servers, then selects their main and least favorite DNS of the group. If there is a "Main DNS" already selected, it will blank the originally selected drop down, and fill in the newly selected drop down.
The problem I'm having, is when the user calls their settings back, the PHP will load the proper "main" and "last" options, but I have to select two more to get it to blank. I know this is because the script is called with an "onchange" function, but I've tried using "onLoads" and I've also tried making a quick function to "select" the option, but to no avail.
I'm having an annoying issue with addClass(). I'm trying to find all divs with id name '#moldura_slides' and add the class '.horizontal' to each one of them. The problem is that only the first div matched gets the class. The others are just ignored and don't get it. $(document).ready(function(){ $("#moldura_slides").addClass("horizontal"); }); This is the page: [URL]
I would like to run this in recursive mode, and I'm starting the function with:
$(function(){ $.bubbles(); }
The problem is, that function works only one (and a half) time. Console shows: start callback start I have not idea what is a problem. Function needs to be run constantly.