Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Location
    Sweden
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form1.submit() works in Mozilla but not in Internet Explorer

    Hi!
    I am trying to figure out why this works in Mozilla but not in IE. I have used OverLIB (http://www.bosrup.com/web/overlib/) to generate a calender. This allows the users to click on a date and the scipt will return the date into a textfield in a form. This works fine, but it's not really want I want. After the user has selected a date, I want to post the form to a server. This works fine in Mozilla but not in IE6. What can I do to make it work in IE6? Thanks in advance

    Regards Jonas Karlsson, Sweden.

    Here's the code that works in FireFox but not in IE6:

    alendar.prototype.show = function() {
    var vCode = "";

    // build content into global var ggWinContent
    ggWinContent += ("<FONT FACE='" + fontface + "' ><B>");
    ggWinContent += (this.gMonthName + " " + this.gYear);
    ggWinContent += "</B><BR>";

    // Show navigation buttons
    var prevMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, -1);
    var prevMM = prevMMYYYY[0];
    var prevYYYY = prevMMYYYY[1];

    var nextMMYYYY = Calendar.calc_month_year(this.gMonth, this.gYear, 1);
    var nextMM = nextMMYYYY[0];
    var nextYYYY = nextMMYYYY[1];

    ggWinContent += ("<TABLE WIDTH='100%' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0' style='font-size:" + fontsize + "pt;'><TR><TD ALIGN=center>");
    ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
    "onMouseOver=\"window.status='Go back one year'; return true;\" " +
    "onMouseOut=\"window.status=''; return true;\" " +
    "onClick=\"Build(" +
    "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)-1) + "', '" + this.gFormat + "'" +
    ");" +
    "\"><<Year<\/A>]</TD><TD ALIGN=center>");

    ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
    "onMouseOver=\"window.status='Go back one month'; return true;\" " +
    "onMouseOut=\"window.status=''; return true;\" " +
    "onClick=\"Build(" +
    "'" + this.gReturnItem + "', '" + prevMM + "', '" + prevYYYY + "', '" + this.gFormat + "'" +
    ");" +
    "\"><Mon<\/A>]</TD><TD ALIGN=center>");
    ggWinContent += " </TD><TD ALIGN=center>";
    ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
    "onMouseOver=\"window.status='Go forward one month'; return true;\" " +
    "onMouseOut=\"window.status=''; return true;\" " +
    "onClick=\"Build(" +
    "'" + this.gReturnItem + "', '" + nextMM + "', '" + nextYYYY + "', '" + this.gFormat + "'" +
    ");" +
    "\">Mn><\/A>]</TD><TD ALIGN=center>");
    ggWinContent += ("[<A HREF=\"javascript:void(0);\" " +
    "onMouseOver=\"window.status='Go forward one year'; return true;\" " +
    "onMouseOut=\"window.status=''; return true;\" " +
    "onClick=\"Build(" +
    "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear)+1) + "', '" + this.gFormat + "'" +
    //Here's the problem!
    "); form1.submit();" +

    "\">Year>><\/A>]</TD></TR></TABLE><BR>");

    // Get the complete calendar code for the month, and add it to the
    // content var
    vCode = this.getMonthlyCalendarCode();
    ggWinContent += vCode;

    }

  • #2
    New Coder
    Join Date
    Oct 2004
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not sure if this will help but try using document.form1.submit(); instead of just form1.submit();

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Location
    Sweden
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks, but I have tried that...

    Thanks for the advice, however I have already tried that and it won't crack the case.

    Regards

    Jonas Karlsson, Sweden

  • #4
    dmc
    dmc is offline
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    document.forms[0].submit() is another option.

    Is it showing an error in IE6 or does it nothing.
    If ie coulnd't find the form it would raise an error.

    Can you give the complete source with the form.

  • #5
    Master Coder
    Join Date
    Feb 2003
    Location
    Ume, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Do you have this online somewhere? Preferably with everything that is not relevant for the bug removed?
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •