By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

JS for Mozilla

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.