Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   [TS SE 4.3] problem with AJAX + IE (http://www.bvlist.com/showthread.php?t=1252)

Phi 24th October 2008 04:56

[TS SE 4.3] problem with AJAX + IE
 
hi everyone

this is my problem
i have a fresh install TS SE 4.3 and when i want comment a torrent (i have AJAX functions activaded) with Internet Explorer i got an unknown error (when i press the submit button). it says something like "error on line 225 in preview.js". even with this error, the comment is posted but no display it in the same moment. i have to refresh (F5) the page to see the message.

this is the line 225 in previer.js

HTML Code:

document.getElementById('ajax_comment_preview').innerHTML = result;
well i would thank any help or suggest.

:)

pd: this happens in v5.1 too

Sebitas 28th October 2008 22:02

anyone can fix this i have the same problem with my tracker :nosepick:

Dragan3591 29th October 2008 16:11

I don't know about you two but there is something written on the bottom of every TS
"This site is best viewed with Firefox and with 1280*1024 in resolution."
IE sucks, it has bugs like that!

johnake 29th October 2008 16:20

Phi, that is a bug specific to Internet Explorer, when you set the innerHTML property of the Select object, the changes do not take effect correctly.
If you must use innerHTML, a workaround is to use a Div object to wrap the SELECT element and then set the innerHTML property for the Div object.
Don't know XAM's code, not really interested either but I can give you an example:
HTML Code:

<html>
<head>
<title>My Example</title>
<script language="Javascript">
var origDivHTML;

function init()
{
  origDivHTML = myDiv.innerHTML;
}

function setValues()
{
  var oldinnerHTML = "your original innerHTML: " + yourDiv.innerHTML ;   
  alert(oldinnerHTML);
  yourDiv.innerHTML = origDivHTML;
   
  var curinnerHTML = "your current innerHTML: " + yourDiv.innerHTML ;
  alert(curinnerHTML);
}
</script>
</head>

<body onload="init()">

<div id="myDiv">
  <select name="firstSelect" size="1" >
    <option>11111</option>
    <option>22222</option>
    <option>33333</option>
  </select>
</div>

<div id="yourDiv">
  <select name="secondSelect" size="1" >
    <option>aaaa</option>
    <option>bbbb</option>
    <option>cccc</option>
  </select>
</div>
<button onclick = "setValues();">click me to set the values</button>
</body>
</html>

Or you could follow this guide: http://domscripting.com/blog/display/99
The use of innerHTML isn't recommended by W3C either.
Cheers!

Phi 29th October 2008 22:01

Quote:

Originally Posted by johnake (Post 6035)
Phi, that is a bug specific to Internet Explorer, when you set the innerHTML property of the Select object, the changes do not take effect correctly.
If you must use innerHTML, a workaround is to use a Div object to wrap the SELECT element and then set the innerHTML property for the Div object.
Don't know XAM's code, not really interested either but I can give you an example:
Or you could follow this guide: DOM Scripting: Fixing innerHTML
The use of innerHTML isn't recommended by W3C either.
Cheers!

thank you very much.. i'll try to fix it with this..


All times are GMT +2. The time now is 01:53.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.