Re: JS for Mozilla
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: JS for Mozilla

From: RobG <rgqld@iinet.net.au>
Date: Wed Feb 01 2006 - 03:05:15 CET

sni.ukr@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
Received on Tue Feb 7 21:29:30 2006