jonka589
01-29-2005, 08:13 PM
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 + "'" +
");" +
"\">Mån><\/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;
}
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 + "'" +
");" +
"\">Mån><\/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;
}