- Iggyhopper
- |
- Exalted Mythic Member
AV=http://avatar.coolclip.ru/albums/Avatars/Avatars%2090x90/A vatars_90x90_022.gif
BG=http://avatar.coolclip.ru/albums/Avatars/Avatars%2090x90/A vatars_90x90_022.gif
Posted by: DavidJCobb
Posted by: dazarobbo
You'll probably have some issues with the reply box when you hit the quote button too. Although I'm not exactly sure on this, I'm fairly sure that when the response comes back from the server, the entire box is re-rendered/re-added to the current DOM, replacing the old one.This is exactly how ASP.NET (Bungie.net's framework) works, yes. Did some research on the subject while trying to crack the quote button.
Posted by: dazarobbo
Meaning, if you had any variables in your script which referenced the original reply box, they are now lost. There's probably a good way to fix that, but I just did it by continually polling the page at regular intervals for the element, then adding the reference back to the script.Polling as in setTimeout/setInterval? Why not just get the element by ID again each time you use it? The ID never changes, so even when the element is replaced, var textbox = document.getElementById("ctl00_mainContent_postForm_skin _body") would return a valid reference.AJAX goes well with ASP.NET, ASP.net is set up for it quite well, which basically means you dont have to reload the whole page to get something changed or something to happen.
When you click quote. You say "I just want quote data." It gives you the quote data, and then you manipulate the textbox and add it in.
However, bungie.net, or ASP.net replaces the whole textarea. via HTML. This removes any references and events attached to it IIRC.
var textbox = get(...);
button.addEventListener(... function ... textbox = get(...); )
[Edited on 05.05.2011 1:38 AM PDT]