Paul123
10-23-2009, 04:35 AM
Hi all, Help!! I coudn't figure out after a week trying all methods. My head is hurt!
I'm trying to insert a javascript into the file in Themes/Default directory: post.template.php (the below red line).
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo ' <script language="Javascript" type="text/javascript" src="http://mydomain/forum/file.js"></script>';
if ($context['show_spellchecking'])
echo '
......
The problem: Everytime I tried to post, the webpage turn out all the text LARGER even though the font size is still not changed. But, if I get out from the post page, everything is getting back to normal.
I have no problem with Firefox, but internet explore keep having this problem.
I doubt about couple javascript lines of the "file.js" below. Any input would be very appreciated! Thanks very much
-----------
if(AVIMGlobalConfig.showControl) {
this.css = document.createElement('link');
this.css.rel = 'stylesheet';
this.css.type = 'text/css';
this.css.href = AVIMGlobalConfig.controlCSS;
document.getElementsByTagName('head')[0].appendChild(this.css);
document.write('<span id="AVIMControl">');
document.write('<p class="AVIMControl"><input id="avim_auto" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(0);" />Tự động ');
document.write('<input id="avim_telex" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(1);" />TELEX ');
document.write('<input id="avim_vni" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(2);" />VNI ');
document.write('<input id="avim_viqr" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(3);" />VIQR ');
document.write('<input id="avim_viqr2" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(4);" />VIQR* ');
document.write('<input type="checkbox" id="avim_ckspell" onclick="AVIMObj.setSpell(this);" />Chính tả ');
document.write('<input type="checkbox" id="avim_daucu" onclick="AVIMObj.setDauCu(this);" />Kiểu cũ ');
document.write('<input id="avim_off" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(-1);" />Tắt ');
}
I'm trying to insert a javascript into the file in Themes/Default directory: post.template.php (the below red line).
function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
echo ' <script language="Javascript" type="text/javascript" src="http://mydomain/forum/file.js"></script>';
if ($context['show_spellchecking'])
echo '
......
The problem: Everytime I tried to post, the webpage turn out all the text LARGER even though the font size is still not changed. But, if I get out from the post page, everything is getting back to normal.
I have no problem with Firefox, but internet explore keep having this problem.
I doubt about couple javascript lines of the "file.js" below. Any input would be very appreciated! Thanks very much
-----------
if(AVIMGlobalConfig.showControl) {
this.css = document.createElement('link');
this.css.rel = 'stylesheet';
this.css.type = 'text/css';
this.css.href = AVIMGlobalConfig.controlCSS;
document.getElementsByTagName('head')[0].appendChild(this.css);
document.write('<span id="AVIMControl">');
document.write('<p class="AVIMControl"><input id="avim_auto" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(0);" />Tự động ');
document.write('<input id="avim_telex" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(1);" />TELEX ');
document.write('<input id="avim_vni" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(2);" />VNI ');
document.write('<input id="avim_viqr" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(3);" />VIQR ');
document.write('<input id="avim_viqr2" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(4);" />VIQR* ');
document.write('<input type="checkbox" id="avim_ckspell" onclick="AVIMObj.setSpell(this);" />Chính tả ');
document.write('<input type="checkbox" id="avim_daucu" onclick="AVIMObj.setDauCu(this);" />Kiểu cũ ');
document.write('<input id="avim_off" type="radio" name="AVIMMethod" onclick="AVIMObj.setMethod(-1);" />Tắt ');
}