473,395 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

JS for Mozilla

Hi guys!!!
Some problem with Mozilla
For example:

function changeLinksProperties( containerId ) {

var buttonsPlace = Global.getObject('adminButtonsPlace');
var confirmMessage = "('Do you want to delete this item?');"
var confirmFunction = "onclick="+"""+"return
confirm"+confirmMessage+"""
var imgSize = "width='12' height='13'";
var imgOnError =
"onerror='this.style.visibility=\"hidden\";this.pa rentNode.innerHTML=this.alt'";
var myArray = [
{
className: "comAddURL",
title: BaseMessages.addLinkTitle,
innerHTML: "&nbsp;<img src='/images/beheer_nieuw.gif'
alt='"+BaseMessages.addLinkTitle+"' " + imgSize + imgOnError + " />"
},{
className: "comDeleteURL",
title: BaseMessages.deleteLinkTitle,
innerHTML: "&nbsp;<img src='/images/beheer_verwijder.gif'
alt='"+BaseMessages.deleteLinkTitle+"' " + imgSize + imgOnError + "
/>",

onclick: function() {

// return false;
alert("!!!!!!!!!!!!!!");
if(!window.confirm( "Do you want to delete this item?" ) ) {
return false;
}
}
....
************************************************** ***********************************************

onclick: function() {

// return false;
alert("!!!!!!!!!!!!!!");
if(!window.confirm( "Do you want to delete this item?" ) ) {
return false;
}
this parameter working in IE
But in Mozilla doesn't work.

Pls write me some your idea for it...

Jan 31 '06 #1
3 1366
sn*****@gmail.com wrote:
Hi guys!!!
Some problem with Mozilla
For example:

function changeLinksProperties( containerId ) {

var buttonsPlace = Global.getObject('adminButtonsPlace');
Where is 'Global' defined? Where is its getObject method defined?

var confirmMessage = "('Do you want to delete this item?');"
var confirmFunction = "onclick="+"&quot;"+"return
confirm"+confirmMessage+"&quot;"
Allowing auto-wrapping nearly always introduces errors and makes helping
you that much more difficult.

Post a minimal example that works in IE but not in Mozilla. Posting
incomplete snippets without any of the supporting HTML, description of
what it should do or the error or error messages makes helping you
nearly impossible.
[...]
onclick: function() {

// return false;
alert("!!!!!!!!!!!!!!");
if(!window.confirm( "Do you want to delete this item?" ) ) {
return false;
}
this parameter working in IE
What parameter?

But in Mozilla doesn't work.


Here is a test that works in IE and Firefox of something like what you
are attempting. Expand it to include whatever is going wrong, don't
include anything that is not directly related to the issue:
<div id="div01">div 01 - click on me</div>
<div id="div02">div 02 - click on me</div>

<script type="text/javascript">

var qTest = [
{
parm : 'I am parm 1',
onclick : function(){
alert(qTest[0].parm);
}
},
{
parm : 'I am parm 2',
onclick : function(){
alert(qTest[1].parm);
}
}
]

document.getElementById('div01').onclick = qTest[0].onclick;
document.getElementById('div02').onclick = qTest[1].onclick;

</script>

--
Rob
Feb 1 '06 #2
Basic problem:
for Mozilla js construction :
******************************
var myArray = [
{
className: "comDeleteURL",
title: BaseMessages.deleteLinkTitle,
innerHTML: "&nbsp;<img src='/images/beheer_verwijder.gif'
alt='"+BaseMessages.deleteLinkTitle+"' " + imgSize + imgOnError + "
/>",
onclick: function() {
if(!window.confirm( "Do you want to delete this item?" ) ) {
return false;
}
}
**************************

doesn't work (in IE normally)

in html template it calling : <a href="{deleteURL}"
class="comDeleteURL">

so, I tried your variant
var qTest = [
{
parm : 'I am parm 1',
onclick : function(){
alert(qTest[0].parm);
}
}
]

But this is also incorrect for Mozilla

your comment?

Feb 1 '06 #3
sn*****@gmail.com wrote:
Basic problem:
for Mozilla js construction :
"js construction"?
******************************
var myArray = [ ^ { ^ className: "comDeleteURL",
title: BaseMessages.deleteLinkTitle,
innerHTML: "&nbsp;<img src='/images/beheer_verwijder.gif'
alt='"+BaseMessages.deleteLinkTitle+"' " + imgSize + imgOnError + "
/>",
onclick: function() { ^ if(!window.confirm( "Do you want to delete this item?" ) ) { ^ return false;
} ^ } ^ **************************

doesn't work (in IE normally)
The outer Array literal and inner Object literal were not closed properly
with `]' and `}', respectively; it cannot work. Whatever "to work" refers
to here.
in html template it calling : <a href="{deleteURL}"
class="comDeleteURL">
Templates are not relevant. When it is about client-side programming, post
the output that is generated, not what is used to generate that output.
so, I tried your variant
var qTest = [
{
parm : 'I am parm 1',
onclick : function(){
alert(qTest[0].parm);
}
}
]

But this is also incorrect for Mozilla
It is syntactically correct, but it does not make much sense. There is
an Object object initialized with literal notation being the first and
only element of an Array object initialized with literal notation.
your comment?


"Does not work" is a useless error description. [psf 4.11]

<URL:http://jibbering.com/faq/#FAQ4_43>
PointedEars
Feb 16 '06 #4

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

Similar topics

0
by: Neil Zanella | last post by:
Hello, I just ran into an interesting problem with cookies while using PHP 4 and Mozilla 1.6. Basically, I have been using PHP on a site called: foo.bar.net?script.php Within that script I...
4
by: Jakub Fast | last post by:
Hi, Does anybody know how far you can get nowadays with trying to use Python as the script language for XUL instead of JS? Is it possible (even theoretically) to write full-fledged applications...
0
by: melledge | last post by:
Mozilla Foundation Co-Hosts Europe's Leading XML and Web Developer Conference XTech 2005 Conference to Bring Together XML and Web Technology Thought Leaders
2
by: Peter | last post by:
Hello, First of all, sorry for all the code. I don't know how to explain my problem without it. I have a javascript function which can build a webpage dynamically. A striped down version of...
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
3
by: Jim Ley | last post by:
Hi, It seems the mozilla guys have chosen another (almost certainly poor choice in my initial thoughts) of having document.all evaluate to false, but document.all catch the chicken event - also...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
20
by: Thorsten Kampe | last post by:
Hi, I've already sent this to the Komodo mailing list (which seemed to me the more appropriate place) but unfortunately I got no response. I'd like to build a Python GUI app. Neither Tkinter...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.