Ticket #23 (closed defect: fixed)

Opened 17 months ago

Last modified 17 months ago

javascript forwardadd_fillform() in IE7 not working

Reported by: sven Owned by: jonas
Priority: minor Milestone:
Component: webinterface Version: SVN
Keywords: Cc:

Description

for new forwards the javascript function forwardadd_fillform() is called. This does not work for the IE 7, firefox has no problems.

Mayby it does not work, because the select box "mail" has no values?

Change History

Changed 17 months ago by jonas

  • status changed from new to assigned

hm. how care's about IE7.0? :)

I have _no_ IE 7.0 or any windows system here. I can't test it.

Changed 17 months ago by sven

we fix it, because there are some clients who loves the IE...

Here is the new code (works for both browser, Firefox and IE7 tested)

function forwardadd_fillform() {

var fwd = document.forms[0].to.value;


if ( fwd == "" ) {

document.forms[0].to.value=document.forms[0].mail.options[document.forms[0].mail.selectedIndex].text;

}

if (fwd.search('@') >= 1) {

reg = new RegExp?(',$');
if (reg.test(fwd)) {

document.forms[0].to.value=fwd + document.forms[0].mail.options[document.forms[0].mail.selectedIndex].text;

}
else {

document.forms[0].to.value=fwd +',\n'+document.forms[0].mail.options[document.forms[0].mail.selectedIndex].text;

}

}

}

Changed 17 months ago by jonas

  • status changed from assigned to closed
  • resolution set to fixed

Thank you very much for the Code. I have included it into the current SVN Version!

Note: See TracTickets for help on using tickets.