In earlier versions of the forum, when you changed the screen size via the dropdown box on the Post screen, the change would immediately be changed in the cookie via javascript. While working on v3.4, this behavior was removed because it wasn't working.
redbrad0 was the one who brought this to my attention.
changes will need to be made in 2 files, post.asp & inc_code.js
post.asp
on line #515 find the following:
" <select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea()"">" & vbNewLine & _
and replace it with this: " <select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea('" & strUniqueID & "')"">" & vbNewLine & _
inc_code.js
on line #423 find the following function:
function resizeTextarea()
{
if (document.PostTopic.SelectSize.value == 1)
{
document.PostTopic.Message.cols = 45;
document.PostTopic.Message.rows = 11;
}
if (document.PostTopic.SelectSize.value == 2)
{
document.PostTopic.Message.cols = 70;
document.PostTopic.Message.rows = 12;
}
if (document.PostTopic.SelectSize.value == 3)
{
document.PostTopic.Message.cols = 90;
document.PostTopic.Message.rows = 12;
}
if (document.PostTopic.SelectSize.value == 4)
{
document.PostTopic.Message.cols = 130;
document.PostTopic.Message.rows = 15;
}
}
replace the entire function with the following:function resizeTextarea(tmpCookieURL)
{
var today = new Date();
var expires = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000); // plus 365 days
if (document.PostTopic.SelectSize.value == 1)
{
document.PostTopic.Message.cols = 45;
document.PostTopic.Message.rows = 11;
}
if (document.PostTopic.SelectSize.value == 2)
{
document.PostTopic.Message.cols = 70;
document.PostTopic.Message.rows = 12;
}
if (document.PostTopic.SelectSize.value == 3)
{
document.PostTopic.Message.cols = 90;
document.PostTopic.Message.rows = 12;
}
if (document.PostTopic.SelectSize.value == 4)
{
document.PostTopic.Message.cols = 130;
document.PostTopic.Message.rows = 15;
}
document.cookie = tmpCookieURL + "strSelectSize=" + document.PostTopic.SelectSize.value + "; expires=" + expires.toUTCString()
}
This may affect some MODS that use the Screensize function, if so, they will just need to use the change to post.asp above as an example of what needs to be changed.
Also, since inc_code.js is usually cached, after this change is made, users may see an error when trying to use the Screensize dropdown box. Using <CTRL> <F5> will force your browser to reload the page (including the inc_code.js file) from the server (instead of from cache).