[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#31926: javascript error in imp send button
From:       denis () samizdat ! net
Date:       2001-08-31 23:16:26
[Download RAW message or body]

Package: khtml
Version: KDE 2.2.0 
Severity: normal
Installed from:    Mandrake RPMs
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

With  IMP 2.2.5, when I want to send a message (with no attached file), I click on \
the send button and the message is not sent. Instead I've a pop-up Window telling me \
(in French) to press the "attach button" to send an attach file, which doesn't exist \
!

in French, "Il faut appuyer sur le boutton "Attacher" pour joindre le fichier \
sélectionné au message"

Everything is working fine with Konqueror in KDE 2.1.1

Regards

Denis Marchand

Here is the code : 

<body bgcolor="#e9e9e9" text="#000000" link="#0000ff" vlink="#0000aa" \
alink="#0000ff"> <script language="JavaScript">
<!--

function confirmCancel () {
  if (window.confirm("Cliquez sur \\\"OK\\\" si vous voulez vraiment annuler ce \
message.")) {  self.close();
	    return true; // this probably is never reached, but you know, IE is stupid
  } else {
    return false;
  }
}

function attachment_check (n) {
    if (n.attachmentAction.value) {
	if (n.attachmentAction.value == 'add') {
	    if (n.file_upload.value == '') {
		alert('Vous devez indiquer le fichier à attacher.');
		n.file_upload.focus ();
		return false;
	    } else {
		return true;
	    }
	}
	
	if (n.attachmentAction.value == 'delete') {
	    sel = false;
	    
	    var i = 0;
	    
	    for (i = 0; i < n.elements.length; i++) {
		if (n.elements[i].name == 'delattachments[]') {
		    if (n.elements[i].checked) {
			sel = true;
		    }
		}
	    }
	    
	    if (sel == false) {
		alert('Vous devez sélectionner les pièces à supprimer.');
		return false;
	    } else {
		return true;
	    }
	}
    }  
}

function submit_and_sign (n) {
    if (n.file_upload.value.length > 0) {
	alert('Il faut appuyer sur le boutton \"Attacher\" pour joindre le fichier \
sélectionné au message');  n.file_upload.focus();
	return false;
    }

    if (n.to.value == '') {
	alert('Vous devez spécifier un destinataire.');
	n.to.focus();
	return false;
    }

    return true;
}

function bounce_submit_and_sign (n) {
   if (n.to.value == '') {
      alert('Vous devez spécifier un destinataire.');
      n.to.focus();
      return false;
   }

   return true;
}

function spellcheck (num) {
  document.spelling.message.value = document.compose.message.value;
  if (num == 1)
    document.spelling.spell_lang.value = \
document.compose.spell_lang1.options[document.compose.spell_lang1.selectedIndex].value;
  else
    document.spelling.spell_lang.value = \
document.compose.spell_lang2.options[document.compose.spell_lang2.selectedIndex].value;
  document.spelling.submit();
}


var Addresses = new Array (
  );

var Nicknames = new Array (
  );

var Fullnames = new Array (
  );


function append (field) {
  if (field) {
    index = document.compose.to_options.selectedIndex - 1;
    if (Addresses[index]) {
      if (!document.compose.to.value) {
        punctuation = '';
      } else {
        punctuation = ', ';
      }
      document.compose.to.value = document.compose.to.value + punctuation + \
Fullnames[index] + ' <' + Addresses[index] + '>';  }
  
  } else {
    index = document.compose.cc_options.selectedIndex - 1;
    if (Addresses[index]) {
      if (!document.compose.cc.value) {
        punctuation = '';
      } else {
        punctuation = ', ';
      }
      document.compose.cc.value = document.compose.cc.value + punctuation + \
Fullnames[index] + ' <' + Addresses[index] + '>';  } else {
    index = document.compose.bcc_options.selectedIndex - 1;
    if (Addresses[index]) {
      if (!document.compose.bcc.value) {
        punctuation = '';
      } else {
        punctuation = ', ';
      }
      document.compose.bcc.value = document.compose.bcc.value + punctuation + \
Fullnames[index] + ' <' + Addresses[index] + '>';  }
    }
  }
}


function expand_to () {
  document.compose.to.value = expand(quotedSplit(document.compose.to.value, ',', \
'"')).join(', '); }

function expand_cc () {
  document.compose.cc.value = expand(quotedSplit(document.compose.cc.value, ',', \
'"')).join(', '); }

function expand_bcc () {
  document.compose.bcc.value = expand(quotedSplit(document.compose.bcc.value, ',', \
'"')).join(', '); }

function quotedSplit (string, delim, quotechar) {
    pos = 0;
    strings = new Array();
    lastdelim = -1;

(Submitted via bugs.kde.org)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic