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 .

View 3 Replies


ADVERTISEMENT

Resolved Js Animation Function Half Works, Cant Understand Why Other Half Doesnt?

Jun 21, 2009

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">

[code]....

View 2 Replies View Related

Works Sometimes And Doesnt Work Sometimes?

Jun 8, 2011

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

View 5 Replies View Related

Script Works But Doesnt Tally?

May 4, 2011

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

[code]....

View 5 Replies View Related

Error On Page - Sometimes Works Sometimes Doesnt?

Apr 20, 2010

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")

[code]....

View 14 Replies View Related

Onclick Link Without Hd Works But The With Doesnt Work?

Jul 5, 2011

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

Code:
<a title="Testimonial One" href="#" onclick="loadNplay('http://www.1st4film.biz/homepagefilms/looknorthlunchtime2.mp4')"><img src="images/24hrs.jpg" border="0"

[code]....

View 2 Replies View Related

JQuery :: Method Append In IE - Works Perfectly In Firefox And Chrome But In IE 7/8 It Doesnt Do Anything

Sep 9, 2011

$(document).ready(function(){

I do an Alert of Data and its the next:

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.

View 1 Replies View Related

Works In A Html Page But Doesnt Work In Aspx Page?

Apr 7, 2010

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...

View 9 Replies View Related

Function Doesnt Work Without An Alert()

Apr 25, 2006

I have this code in actionscript that calls javascript:

actionscript:

zoom_in = function () {
var tw1:Tween = new Tween(mc_1, "_width", Regular.easeOut,
mc_1._width, 0, 1, false); //OK
var tw2:Tween = new Tween(mc_1, "_height", Regular.easeOut,
mc_1._height, 0, 1, false); //OK
ExternalInterface.call("zoom");
}

javascript:

function zoom()
{
top.resizeTo(1024, 768);
self.moveTo(0,0);
}

Everything works perfectly on Firefox 1.5 but not on IE 6+

in IE the "zoom" function doesn't work, but if I add an alert it DOES work:

function zoom()
{
alert('this works');
top.resizeTo(1024, 768);
self.moveTo(0,0);
}

View 1 Replies View Related

Dynamically Created Element Doesnt Call The Function?

Feb 16, 2009

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">

[Code]...

View 9 Replies View Related

Loop A Text Hiding Function?

Feb 17, 2011

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) {

[code]....

View 2 Replies View Related

JQuery :: Hiding Empty Span - Ui-widget-header Class Appears To Be Stopping It From Hiding

Jan 30, 2010

I'm using the following css code which wrapped around a dynamically populated field;<span class="ui-widget-header platform ui-corner-all"></span>

When the span is empty I want to hide it, and I've used this jquery to do this.

However, the ui-widget-header class appears to be stopping it from hiding - if I remove this class it hides fine.

View 5 Replies View Related

My Function Works Only If Alert Function Exists Inside It?

Jan 17, 2011

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

View 6 Replies View Related

Function Works In IE But Not In FF And Chrome?

Jun 30, 2011

i got this javascript function which run perfectly in IE but does not work in Mozilla.

function Changed() {
var theGridView = document.getElementById('MainContent_GridViewRDR1_Hidden');
var sum = 0;
var total = 0;

[Code]....

View 3 Replies View Related

Function Works On IE But Not On Mozilla FF

Nov 28, 2005

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)+"...*";
} } } }}

View 2 Replies View Related

Why This Javascript Function Does Not Work On IE5, But Works On IE6?

Jul 20, 2005

function CheckImageBtn(eleName,sortfield)
{
document.forms[0].sortby.value=sortfield;
document.forms[0].txtIsHrefClick.value = 'Y'

var objElem;
objElem=eval("document.all."+eleName);
objElem.focus();
objElem.click();
return true;
}

View 1 Replies View Related

JQuery :: Function Works In IE 6 But Not In Firefox Or IE 7&8

May 10, 2010

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=[];

[Code].....

View 2 Replies View Related

JQuery :: Load Function Works Once Only

Mar 6, 2011

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.

View 6 Replies View Related

Function Is Undefined In Firefox But Works In IE?

Mar 24, 2010

I have searched and tried to fix this no idea. it keeps saying my funtion is undefined in firefox here is the function:

Code:
<script type="text/javascript">
function getFlashMovieObject(movieName)

[code]....

View 3 Replies View Related

Why This Custom Open.window( ) Function Works On Some PCs Only

Jul 23, 2005

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:

View 3 Replies View Related

JQuery :: Load Function Dont Works?

Jul 18, 2011

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:

javascript:
var x;
x=$(document);

[code]....

View 2 Replies View Related

Function Works Fine On Local, But Not Online?

Aug 19, 2010

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()

[code]....

View 1 Replies View Related

OVERLAY Function Works On Firefox And Not In IE And Chrome

May 21, 2011

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.

View 1 Replies View Related

Function Works When User Selects Value, But Not In Value Preloaded?

Mar 30, 2011

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.

View 1 Replies View Related

JQuery :: Addclass Function Only Works With First Of Matched DIVs

Jul 16, 2009

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]

View 3 Replies View Related

JQuery :: Recursive Function Works Only One (and A Half) Time

Dec 2, 2010

I've got following function:

[Code]....

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.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved