473,700 Members | 2,485 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 9608
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
1721
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
2184
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 some setting in Windows XP that is causing this or is there something I can add to the Javascript to...
4
2023
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
3429
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 shows that there are numerous errors occuring. It looks like the web browser does not recognise...
8
1928
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 a Web page that contains some malicious JavaScript code, Mischa Spiegelmock and Andrew Wbeelsoi...
2
9136
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. My js file is as follows function testjs() { alert("test fired");
1
2632
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
1735
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. Also Safari on a Mac and Opera. The tabbed area shows up fine in IE at the demo site for the theme....
1
1310
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
8725
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8644
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9214
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8924
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7807
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5902
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2027
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.