Hi there,
could you give a js-newbie a hint..

I wrote a custom js modal file.. and this gives me an error in ie8 -> 'undefined' is Null or no Object

...
var url = $(this).attr('longdesc');

    var modalOptions = {
      url: url + (url.indexOf('?') == -1 ? '?' : '&') +'modalframe=1',
      
    //  onLoad: onLoadAction,
      width: 800, 
      height: 600,
      onSubmit: onSubmitCallback
    };

Comments

Apfel007’s picture

ok .. this the whole script. Are there any known issues if I call jquery in IE ?

...
// $Id: modal_gallery_comment.js,v 1.1.2.7 2009/12/28 02:21:20 K Exp $
(function ($) {
Drupal.behaviors.modalGalleryComment = function() {
  $('.imagefield-field_gallery_image').addClass('modalframe-gallery-comment-processed').livequery('click', function(event) { 
    var element = this;
    function onSubmitCallback(args, statusMessages) {
      // Display status messages generated during submit processing.
      if (statusMessages) {
        $('.modalframe-gallery-comment-messages').hide().html(statusMessages).show('slow');
      }
      if (args && args.message) {
        // Provide a simple feedback alert deferred a little.
        setTimeout(function() { alert(args.message); }, 500);
      }
    }
    // Hide the messages are before opening a new dialog.
    $('.modalframe-example-messages').hide('fast');
    // Build modal frame options.
    var url = $(this).attr('longdesc'); // problem im IE ??
    var modalOptions = {
      url: url + (url.indexOf('?') == -1 ? '?' : '&') +'modalframe=1',
      width: 800, 
      height: 600,
      onSubmit: onSubmitCallback
    };
    // Open the modal frame dialog.
    Drupal.modalFrame.open(modalOptions);
    // Prevent default action of the link click event.
    return false;
  });
};
})(jQuery);

seems not to work in ie8 .. could that be?

markus_petrux’s picture

Status: Active » Closed (won't fix)

This issue is related to jQuery itself, so it is out of the scope of the Modal Frame API.

I'm very sorry, but this issues queue cannot be used for this kind of problems. Try asking in the development forums or in the javascript group at groups.drupal.org.

Apfel007’s picture

Status: Closed (won't fix) » Closed (fixed)

thanx