473,581 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript code not running in FIREFOX

Hi I have the following code in java script, it is not giving proper
output in FIREFOX but running fine in IE... can anybody help me out to
make this run in FIREFOX .
<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){
alert ("hi");
var eleSource = event.srcElemen t;

if (event.srcEleme nt) {
//for IE
var eleSource = event.srcElemen t;
}
else {
//for Firefox
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}

for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
else
cntlName.m_oFor m[j].addEventListen er('onchange',
showOrHide,fals e);
}
}
else {
cntlName.m_oFor m.focus();
cntlName.m_oFor m.click();
if (cntlName.m_oFo rm.value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
}
}
</script>

Jun 6 '06 #1
7 9592
i don't know what error u r encountering
did u install FireBug to debug ur js in FF?

i think u will have better feedback with that tool
Coder wrote:
Hi I have the following code in java script, it is not giving proper
output in FIREFOX but running fine in IE... can anybody help me out to
make this run in FIREFOX .
<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){
alert ("hi");
var eleSource = event.srcElemen t;

if (event.srcEleme nt) {
//for IE
var eleSource = event.srcElemen t;
}
else {
//for Firefox
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}

for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
else
cntlName.m_oFor m[j].addEventListen er('onchange',
showOrHide,fals e);
}
}
else {
cntlName.m_oFor m.focus();
cntlName.m_oFor m.click();
if (cntlName.m_oFo rm.value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
}
}
</script>


Jun 6 '06 #2

I am using this java script code to show and hide a prompt box in
Cognos reportnet , it is working fine in IE , but when it comes to
Firefox then it does not becomes activated . Even if I click any button
in same prompt , the next prompt does not show up.

It is not returning any error to me but its simply not working.So if
the code can be modified so that it works fine with Firefox.

so*********@gma il.com wrote:
i don't know what error u r encountering
did u install FireBug to debug ur js in FF?

i think u will have better feedback with that tool
Coder wrote:
Hi I have the following code in java script, it is not giving proper
output in FIREFOX but running fine in IE... can anybody help me out to
make this run in FIREFOX .
<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){
alert ("hi");
var eleSource = event.srcElemen t;

if (event.srcEleme nt) {
//for IE
var eleSource = event.srcElemen t;
}
else {
//for Firefox
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}

for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
else
cntlName.m_oFor m[j].addEventListen er('onchange',
showOrHide,fals e);
}
}
else {
cntlName.m_oFor m.focus();
cntlName.m_oFor m.click();
if (cntlName.m_oFo rm.value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
}
}
</script>


Jun 6 '06 #3
Coder wrote:
Hi I have the following code in java script, it is not giving
proper output in FIREFOX but running fine in IE... can anybody
help me out to make this run in FIREFOX .

<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){
alert ("hi");
var eleSource = event.srcElemen t; ^^^^^
Firefox/Mozilla/Gecko browsers do not use an global - event - property,
instead passing event objects as the argument to the event handling
function. Because the - event - Identifier does not refer to a defined
property of the global object it evaluates as the undefined value, and
the subsequent attempt to read the - srcElement - property of an
undefined value will have firefox error-out.Firefox/Mozilla/Gecko
browsers do not use an global - event - property, instead passing event
objects as the argument to the event handling function. Because the -
event - Identifier does not refer to a defined property of the global
object it evaluates as the undefined value, and the subsequent attempt
to read the - srcElement - property of an undefined value will have
firefox error-out.
if (event.srcEleme nt) {
//for IE
var eleSource = event.srcElemen t;
}
else {
//for Firefox
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';
If - eleSource - is an input element, as the use of its value property
may imply, then its default CSS display style is 'inline' not 'block'.
}
else {
eleTarget.style .display = 'none';
}
}
function showOrHide(ev){
var eleSource;
ev = ev || window.event;
if(eleSource = (ev.srcElement| |ev.target)){
if(eleSource.va lue == 'MGRPAY'){
eleTarget.style .display = '';
}else{
eleTarget.style .display = 'none';
}
}
}
for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);
The contents of - preProcessContr olArray - are not shown here so what
this code does, or may be intended to do, is unknown. Though generally
any use of - eval - is indicative of failing to do something else what
would be objectively better.

However, if this array contains control names in the form of string
then - eval -ing them will be equivalent to resolving Identifiers as
properties on the scope chain, or more likely the global object. IE
makes (at least some) named elements into properties of the global
object that refer to the elements. Firefox/Mozilla/Gecko browsers do not
tend to do this.
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
else
cntlName.m_oFor m[j].addEventListen er('onchange',

<snip> ^^^^^^^^
The addEventListene r method takes the event name as its argument not the
name of the intrinsic event property, so here it would be 'change'
rather than 'onchange'.

The onchange hander is not triggered under equivalent conditions to the
onpropertychang e even in IE, and IE does support onchange.

Richard.
Jun 6 '06 #4
I have changed that part to 'change' but it is still not working there
is some issue with the showOrHide part which I am unable to figure out
....because in Firefox the alert ("hi 2"); is not coming up and that is
the code for showOrHide

<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){

var eleSource = event.srcElemen t;
if (event.srcEleme nt) {
//for IE
alert ("hi 1");
var eleSource = event.srcElemen t;
}
else {
//for Firefox
alert ("hi 2");
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}

for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
cntlName.m_oFor m[j].addEventListen er('change',sho wOrHide,false);
}
}
else {
cntlName.m_oFor m.focus();
cntlName.m_oFor m.click();
if (cntlName.m_oFo rm.value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
}
}
</script>

Richard Cornford wrote:
Coder wrote:
Hi I have the following code in java script, it is not giving
proper output in FIREFOX but running fine in IE... can anybody
help me out to make this run in FIREFOX .

<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){
alert ("hi");
var eleSource = event.srcElemen t;

^^^^^
Firefox/Mozilla/Gecko browsers do not use an global - event - property,
instead passing event objects as the argument to the event handling
function. Because the - event - Identifier does not refer to a defined
property of the global object it evaluates as the undefined value, and
the subsequent attempt to read the - srcElement - property of an
undefined value will have firefox error-out.Firefox/Mozilla/Gecko
browsers do not use an global - event - property, instead passing event
objects as the argument to the event handling function. Because the -
event - Identifier does not refer to a defined property of the global
object it evaluates as the undefined value, and the subsequent attempt
to read the - srcElement - property of an undefined value will have
firefox error-out.
if (event.srcEleme nt) {
//for IE
var eleSource = event.srcElemen t;
}
else {
//for Firefox
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';


If - eleSource - is an input element, as the use of its value property
may imply, then its default CSS display style is 'inline' not 'block'.
}
else {
eleTarget.style .display = 'none';
}
}


function showOrHide(ev){
var eleSource;
ev = ev || window.event;
if(eleSource = (ev.srcElement| |ev.target)){
if(eleSource.va lue == 'MGRPAY'){
eleTarget.style .display = '';
}else{
eleTarget.style .display = 'none';
}
}
}
for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);


The contents of - preProcessContr olArray - are not shown here so what
this code does, or may be intended to do, is unknown. Though generally
any use of - eval - is indicative of failing to do something else what
would be objectively better.

However, if this array contains control names in the form of string
then - eval -ing them will be equivalent to resolving Identifiers as
properties on the scope chain, or more likely the global object. IE
makes (at least some) named elements into properties of the global
object that refer to the elements. Firefox/Mozilla/Gecko browsers do not
tend to do this.
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
else
cntlName.m_oFor m[j].addEventListen er('onchange',

<snip> ^^^^^^^^
The addEventListene r method takes the event name as its argument not the
name of the intrinsic event property, so here it would be 'change'
rather than 'onchange'.

The onchange hander is not triggered under equivalent conditions to the
onpropertychang e even in IE, and IE does support onchange.

Richard.


Jun 6 '06 #5
I have changed that part to 'change' but it is still not working there
is some issue with the showOrHide part which I am unable to figure out
....because in Firefox the alert ("hi 2"); is not coming up and that is
the code for showOrHide

<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){

var eleSource = event.srcElemen t;
if (event.srcEleme nt) {
//for IE
alert ("hi 1");
var eleSource = event.srcElemen t;
}
else {
//for Firefox
alert ("hi 2");
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}

for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
cntlName.m_oFor m[j].addEventListen er('change',sho wOrHide,false);
}
}
else {
cntlName.m_oFor m.focus();
cntlName.m_oFor m.click();
if (cntlName.m_oFo rm.value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
}
}
</script>

Richard Cornford wrote:
Coder wrote:
Hi I have the following code in java script, it is not giving
proper output in FIREFOX but running fine in IE... can anybody
help me out to make this run in FIREFOX .

<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){
alert ("hi");
var eleSource = event.srcElemen t;

^^^^^
Firefox/Mozilla/Gecko browsers do not use an global - event - property,
instead passing event objects as the argument to the event handling
function. Because the - event - Identifier does not refer to a defined
property of the global object it evaluates as the undefined value, and
the subsequent attempt to read the - srcElement - property of an
undefined value will have firefox error-out.Firefox/Mozilla/Gecko
browsers do not use an global - event - property, instead passing event
objects as the argument to the event handling function. Because the -
event - Identifier does not refer to a defined property of the global
object it evaluates as the undefined value, and the subsequent attempt
to read the - srcElement - property of an undefined value will have
firefox error-out.
if (event.srcEleme nt) {
//for IE
var eleSource = event.srcElemen t;
}
else {
//for Firefox
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';


If - eleSource - is an input element, as the use of its value property
may imply, then its default CSS display style is 'inline' not 'block'.
}
else {
eleTarget.style .display = 'none';
}
}


function showOrHide(ev){
var eleSource;
ev = ev || window.event;
if(eleSource = (ev.srcElement| |ev.target)){
if(eleSource.va lue == 'MGRPAY'){
eleTarget.style .display = '';
}else{
eleTarget.style .display = 'none';
}
}
}
for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);


The contents of - preProcessContr olArray - are not shown here so what
this code does, or may be intended to do, is unknown. Though generally
any use of - eval - is indicative of failing to do something else what
would be objectively better.

However, if this array contains control names in the form of string
then - eval -ing them will be equivalent to resolving Identifiers as
properties on the scope chain, or more likely the global object. IE
makes (at least some) named elements into properties of the global
object that refer to the elements. Firefox/Mozilla/Gecko browsers do not
tend to do this.
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
else
cntlName.m_oFor m[j].addEventListen er('onchange',

<snip> ^^^^^^^^
The addEventListene r method takes the event name as its argument not the
name of the intrinsic event property, so here it would be 'change'
rather than 'onchange'.

The onchange hander is not triggered under equivalent conditions to the
onpropertychang e even in IE, and IE does support onchange.

Richard.


Jun 6 '06 #6
I have changed that part to 'change' but it is still not working there
is some issue with the showOrHide part which I am unable to figure out
....because in Firefox the alert ("hi 2"); is not coming up and that is
the code for showOrHide

<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){

var eleSource = event.srcElemen t;
if (event.srcEleme nt) {
//for IE
alert ("hi 1");
var eleSource = event.srcElemen t;
}
else {
//for Firefox
alert ("hi 2");
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}

for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
cntlName.m_oFor m[j].addEventListen er('change',sho wOrHide,false);
}
}
else {
cntlName.m_oFor m.focus();
cntlName.m_oFor m.click();
if (cntlName.m_oFo rm.value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
}
}
</script>

Richard Cornford wrote:
Coder wrote:
Hi I have the following code in java script, it is not giving
proper output in FIREFOX but running fine in IE... can anybody
help me out to make this run in FIREFOX .

<script language="JavaS cript">
var cntlName;
var eleTarget = document.getEle mentById('hidin g');

function showOrHide(){
alert ("hi");
var eleSource = event.srcElemen t;

^^^^^
Firefox/Mozilla/Gecko browsers do not use an global - event - property,
instead passing event objects as the argument to the event handling
function. Because the - event - Identifier does not refer to a defined
property of the global object it evaluates as the undefined value, and
the subsequent attempt to read the - srcElement - property of an
undefined value will have firefox error-out.Firefox/Mozilla/Gecko
browsers do not use an global - event - property, instead passing event
objects as the argument to the event handling function. Because the -
event - Identifier does not refer to a defined property of the global
object it evaluates as the undefined value, and the subsequent attempt
to read the - srcElement - property of an undefined value will have
firefox error-out.
if (event.srcEleme nt) {
//for IE
var eleSource = event.srcElemen t;
}
else {
//for Firefox
var eleSource = event.target;
}

if (eleSource.valu e == 'MGRPAY') {
//for IE
eleTarget.style .display = 'block';


If - eleSource - is an input element, as the use of its value property
may imply, then its default CSS display style is 'inline' not 'block'.
}
else {
eleTarget.style .display = 'none';
}
}


function showOrHide(ev){
var eleSource;
ev = ev || window.event;
if(eleSource = (ev.srcElement| |ev.target)){
if(eleSource.va lue == 'MGRPAY'){
eleTarget.style .display = '';
}else{
eleTarget.style .display = 'none';
}
}
}
for(var i=0; i<preProcessCon trolArray.lengt h; i++){
cntlName = eval(preProcess ControlArray[i]);


The contents of - preProcessContr olArray - are not shown here so what
this code does, or may be intended to do, is unknown. Though generally
any use of - eval - is indicative of failing to do something else what
would be objectively better.

However, if this array contains control names in the form of string
then - eval -ing them will be equivalent to resolving Identifiers as
properties on the scope chain, or more likely the global object. IE
makes (at least some) named elements into properties of the global
object that refer to the elements. Firefox/Mozilla/Gecko browsers do not
tend to do this.
if (cntlName.m_oSu bmit.name.toLow erCase() == 'p_par_rad_role '){
if (cntlName.m_oFo rm.length) {
for( var j=0; j<cntlName.m_oF orm.length; j++ ){
if (j == 0) {
cntlName.m_oFor m[j].focus();
cntlName.m_oFor m[j].click();
if (cntlName.m_oFo rm[j].value == 'MGRPAY') {
eleTarget.style .display = 'block';
}
else {
eleTarget.style .display = 'none';
}
}
//For IE
if(cntlName.m_o Form[j].attachEvent)
cntlName.m_oFor m[j].attachEvent('o npropertychange ',
showOrHide);
//for firefox
else
cntlName.m_oFor m[j].addEventListen er('onchange',

<snip> ^^^^^^^^
The addEventListene r method takes the event name as its argument not the
name of the intrinsic event property, so here it would be 'change'
rather than 'onchange'.

The onchange hander is not triggered under equivalent conditions to the
onpropertychang e even in IE, and IE does support onchange.

Richard.


Jun 6 '06 #7
Coder wrote:
I have changed that part to 'change' but it is still not working there
is some issue with the showOrHide part which I am unable to figure out
....because in Firefox the alert ("hi 2"); is not coming up and that is
the code for showOrHide

Well, part of the problem is that you are still trying to use a global
"event" property which, as was mentioned, Firefox does not have.
Jun 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1717
by: Ryan Gaffuri | last post by:
I know that this works. I just don't get the syntax. I know its checking the OS. just not sure how it works. var v = navigator.appVersion.toUpperCase() if (1+v.indexOf('WIN98') os = 'Win98'; else if (1+v.indexOf('WINNT') os = 'WinnT';
2
2180
by: Keyser | last post by:
On most my pages, I use Javascript to play a sound. It works fine in Netscape 4.7, Netscape 7.2, Firefox 1.0, IE5 and IE6 using Windows98 as the operating system. However, using WindowsXP as the operating system, the entire Netscape 7.2 browser and Firefox 1.0 browser shuts down when I try to use the Back button on these pages. Is there...
4
2016
by: fcurvat | last post by:
Hello, I've got a little problem with <script></script> under firefox 1.0.7 If the script is not placed in the body tag, it isn't automaticaly executed, but it is under Internet Explorer. Here's an example of what i do. Do anybody have any idea?
11
3425
by: minnesotti | last post by:
Hi there, I subscribed to a photographic pictures-hosting website which is heavy on JavaScript. My preferred latest browser Mozilla Firefox does not work with it -- no pictures are displayed and no buttons react to clicking. The website's helpdesk says it should work with Firefox, and could not offer any more advices. The JavaScript Console...
8
1921
by: Matt Kruse | last post by:
http://news.zdnet.com/2100-1009_22-6121608.html Hackers claim zero-day flaw in Firefox 09 / 30 / 06 | By Joris Evers SAN DIEGO--The open-source Firefox Web browser is critically flawed in the way it handles JavaScript, two hackers said Saturday afternoon. An attacker could commandeer a computer running the browser simply by crafting...
2
9132
by: Altman | last post by:
I have created an ascx control and I am calling registerclientscriptblock. The path to the js file is relative to the aspx page and not the ascx file. The function runs fine in IE7 but in Firefox the error console says that the function is not defined. I tried making a very basic js file to get it to work and I am having the same problem. ...
1
2624
by: tgorton | last post by:
I am having a problem running a javascript function as part of an html-el:form onsubmit. The problem seems to exists in IE6 but not in Firefox. html: <html-el:form action="${target}" onsubmit="return testTheForm(this)"> javascript function: <script type="text/javascript"> function testTheForm(theForm){
1
1718
by: Mig | last post by:
I just purchased a Wordpress theme and am customizing it. It uses a javascript tabbed content area with a script called tabber.js. I'd already made dozens or hundreds of changes in various templates before bothering to look at the site in IE7 (always using Firefox 2). The entire tab area simply doesn't appear in IE. Works fine in Firefox....
1
1303
by: Rory Becker | last post by:
Just when I need it, my copy of VS2008 seems incapable of debugging javascript code. I'm really not sure it ever was. Perhaps I saw this before in VS2005 (which I recently uninstalled) could this have been it? I never get a "Script Documents" node in Solution explorer. Breakpoints are never hit.
0
7857
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8163
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6545
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5355
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3813
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1127
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.