• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 18:29
CET 00:29
KST 08:29
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
ByuL: The Forgotten Master of ZvT28Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0258LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2
StarCraft 2
General
Terran AddOns placement How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Nexon's StarCraft game could be FPS, led by UMS maker ByuL: The Forgotten Master of ZvT Oliveira Would Have Returned If EWC Continued
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) SEL Doubles (SC Evo Bimonthly) WardiTV Team League Season 10 RSL Season 4 announced for March-April The Dave Testa Open #11
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
Mutation # 514 Ulnar New Year The PondCast: SC2 News & Results Mutation # 513 Attrition Warfare Mutation # 512 Overclocked
Brood War
General
TvZ is the most complete match up BGH Auto Balance -> http://bghmmr.eu/ Soma Explains: JD's Unrelenting Aggro vs FlaSh ACS replaced by "ASL Season Open" - Starts 21/02 BW General Discussion
Tourneys
[Megathread] Daily Proleagues [LIVE] [S:21] ASL Season Open Day 1 ASL Season 21 Qualifiers March 7-8 Small VOD Thread 2.0
Strategy
Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular?
Other Games
General Games
Nintendo Switch Thread Battle Aces/David Kim RTS Megathread Path of Exile Beyond All Reason New broswer game : STG-World
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread UK Politics Mega-thread YouTube Thread Mexico's Drug War
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
YOUTUBE VIDEO
XenOsky
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Inside the Communication of …
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2342 users

The Big Programming Thread - Page 200

Forum Index > General Forum
Post a Reply
Prev 1 198 199 200 201 202 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
ninjamyst
Profile Joined September 2010
United States1903 Posts
Last Edited: 2012-11-22 05:54:00
November 22 2012 05:53 GMT
#3981
On November 22 2012 10:09 Craton wrote:
I'm having issues with deserializing some json with C#.

Suppose this is a snippet of the json I'm being sent (repeated many times, but nothing else other than id/name):
[
{
"id":0,
"name":"N/A"
},
{
"id":1,
"name":"Annie"
},
{
"id":2,
"name":"Olaf"
}
]


If the top level was named, I'd do something like
    [DataContract]
public class ChampList
{
[DataMember(Name = "SOMENAME")]
public ElophantChamp[] ElophantChamps { get; set; }
}

[DataContract]
public class ElophantChamp
{
[DataMember(Name = "id")]
public int ID { get; set; }

[DataMember(Name = "name")]
public string Name { get; set; }

}


and then deserialize it by calling this:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();

DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(ChampList));
object objResponse = jsonSerializer.ReadObject(response.GetResponseStream());
ChampList jsonResults = objResponse as ChampList;


But in the case where there is no top level container object and I can't have blank datamember name, what do I do? I just get a null value if I leave the DataMember unnamed (i.e. leave it as [DataMember])


Why do you need ChampList? Just deserialize straight into List<ElophantChamp> . It's better to use List instead of Arrays so you get all the features of IList and Linq.
Craton
Profile Blog Joined December 2009
United States17278 Posts
Last Edited: 2012-11-22 07:12:42
November 22 2012 05:55 GMT
#3982
Couldn't figure out a way to do that.

[Edit]
I got help elsewhere.

The only change needed was:

DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(ElophantChamp[]));
object objResponse = jsonSerializer.ReadObject(response.GetResponseStream());
ElophantChamp[] jsonResults = objResponse as ElophantChamp[];


Basically all that was needed was to use the underlying class (ElophantChamp) and then declare the type used in the serializer as an array of that underlying class.

Thank you to ninjamyst for attempting to help.
twitch.tv/cratonz
Datz2Ez
Profile Joined May 2011
Canada76 Posts
November 22 2012 06:08 GMT
#3983
Hi TL programmers.

I have a big project in mind and I didn't know who I should turn to to ask questions about "where to start". Here is a short intro of me.

I am a 22 years old man that finish CEGEP in web programming / design (CEGEP is between university and high school). I just started university in computer engineer. I have a good project in mind however I need a low level language to achieve my goal.

After some research, I found out that C++ was the way to go. So I took a 10h tutorial on Lynda.com but that didn't really help me. It was more about what are types, how to declare a functions, and what a statement is. So i kept reading tutorials doing quiz here and there. The more I get into C++ the more loss i get. I feel like there is so much to know at the same time. So many way to acheive an objective and I'm never sure about what is the most effective way to handle my problem.

So basically i need some help about either a great book or so clever example to help me master all the native method that C++ offers.
Action is the real measure of intelligence.
tec27
Profile Blog Joined June 2004
United States3702 Posts
November 22 2012 06:10 GMT
#3984
On November 22 2012 14:53 Craton wrote:
I wouldn't have to grumble over non-answers if they were actual answers.

It took three posts just to force an angry reply out of you that what I'm using MIGHT not be able to do what I want. Instead, you got up on your "look at how great this thing I prefer is, change all your code to suit my personal preference" why? "because I personally feel the thing you're using is shit, but I'm not going to bother actually trying to help you"

If you don't want people getting "uppity," then provide actual answers. Exponentially so when I came out and explicitly said all I want to know is what I have to tweak and then got the exact same kind of non-answer.

I said nothing about my personal opinion. I specifically said that the library was shit, and recommended you use Json.NET. I think you'd find it easier and more accurate to simply click the 'Quote' link above my post next time instead of completely misquoting me and misrepresenting what my post said.

Its not anyone's fault here but your own that you continually make horrible development choices, and you shouldn't be so pissy when someone points them out. You should notice that out of all the people that ask questions in here, you're the only one who consistently gets responded to with the sorts of answers you're bitching about (and you're also certainly the only one who bitches about people helping you in their free time when they could be off not assisting morons). You should think about that for a bit, and realize that you're the problem here, not anyone who has tried to help you. I would appreciate it if you would stop visiting this thread.
Can you jam with the console cowboys in cyberspace?
Craton
Profile Blog Joined December 2009
United States17278 Posts
Last Edited: 2012-11-22 06:44:15
November 22 2012 06:22 GMT
#3985
It's your own lack of comprehension that's getting you so angsty. You're welcome to leave at any time.

You told me to change all my code to support something else. I told you no, that I merely needed assistance finding what EXTREMELY MINOR mistake I had and have no interest in changing everything to support a new library at the last minute. That you think this is a "horrible development choice" is hilarious in and of itself, especially since you know absolutely jack shit about the size or scope of this project, but you assumed with tinted lenses nonetheless. At no point did you ever try to answer my actual question nor provide any backing whatsoever to your claims of how "bad" what this library is.

Someone else then came not 10 minutes later and repeated the exact same call to use a THIRD library, when I'd already expressly said that's not my question nor something I want, which is what I replied to. It's extraordinarily frustrating to have people continually ignore your actual question and respond with information you've said you don't want. But you were already off making assumptions and beginning your tirade.

You then got up on your high horse and went to ego-town and have continued to do so.

Despite all your ramblings and claims of how terrible this library is and how it can't even do what I want, it took not 5 seconds to make the adjustment I needed (read: what I had asked for multiple times). If I was looking for a "better" library or way to rewrite something, I would ask. My project is an extremely small personal one used only by myself and one other person; I have absolutely no need to rewrite swaths of code for trivial performance gains. Perhaps next time you should consider getting less inflamed over having a non-answer refused and spare us your childish ad hominems.
twitch.tv/cratonz
Fyodor
Profile Blog Joined September 2010
Canada971 Posts
November 22 2012 06:40 GMT
#3986
On November 22 2012 15:08 Datz2Ez wrote:
Hi TL programmers.

I have a big project in mind and I didn't know who I should turn to to ask questions about "where to start". Here is a short intro of me.

I am a 22 years old man that finish CEGEP in web programming / design (CEGEP is between university and high school). I just started university in computer engineer. I have a good project in mind however I need a low level language to achieve my goal.

After some research, I found out that C++ was the way to go. So I took a 10h tutorial on Lynda.com but that didn't really help me. It was more about what are types, how to declare a functions, and what a statement is. So i kept reading tutorials doing quiz here and there. The more I get into C++ the more loss i get. I feel like there is so much to know at the same time. So many way to acheive an objective and I'm never sure about what is the most effective way to handle my problem.

So basically i need some help about either a great book or so clever example to help me master all the native method that C++ offers.

http://www.amazon.com/Primer-5th-Edition-Stanley-Lippman/dp/0321714113/ref=sr_1_5?ie=UTF8&qid=1353566261&sr=8-5&keywords=C++

Best book out right now IMO. Using it right now and I'm learning really fast and thoroughly. Blasting through it and I'm learning the more advanced stuff right now.

It's even updated for the latest C++11 stuff. Just brilliant.
llllllllllllllllllllllllllllllllllllllllllll
Craton
Profile Blog Joined December 2009
United States17278 Posts
November 22 2012 06:42 GMT
#3987
Remind me on Monday and I'll be able to get the name of another good book.
twitch.tv/cratonz
phar
Profile Joined August 2011
United States1080 Posts
November 22 2012 06:47 GMT
#3988
Learning to assume that other people are right and working back through their logic instead of assuming that I'm right and trying to go from there has been the most valuable thing I've learned so far working in software development. Time and time again it has gotten me to quicker, cleaner, and easier to extend solutions, simply by taking the effort to figure out exactly why what someone was recommending is a good idea (or if it turns out to be a shitty idea, making absolutely sure it is). Even if that means re-writing something I just spent 60+ hours on. Really does suck when it comes down to that, but it's almost always just my fault for not fully figuring out the design and not enough talking with other people before I dove into coding.

The sooner you start coding, the longer it takes to write a program that works. (- Nell Dale)

Which is an excellent segue to:

On November 22 2012 15:08 Datz2Ez wrote:
Hi TL programmers.

+ Show Spoiler [rest of post] +
I have a big project in mind and I didn't know who I should turn to to ask questions about "where to start". Here is a short intro of me.

I am a 22 years old man that finish CEGEP in web programming / design (CEGEP is between university and high school). I just started university in computer engineer. I have a good project in mind however I need a low level language to achieve my goal.

After some research, I found out that C++ was the way to go. So I took a 10h tutorial on Lynda.com but that didn't really help me. It was more about what are types, how to declare a functions, and what a statement is. So i kept reading tutorials doing quiz here and there. The more I get into C++ the more loss i get. I feel like there is so much to know at the same time. So many way to acheive an objective and I'm never sure about what is the most effective way to handle my problem.

So basically i need some help about either a great book or so clever example to help me master all the native method that C++ offers.

Do you have lots of previous programming experience, and just need a solid c++ reference? If so there's a few links in the OP of this thread that could probably help you. If you need a text, something like this is probably a good buy:

http://www.amazon.com/dp/0201700735

If you've never really used C or C++ at all, something like Learn <X> the Hard Way may help you out more than a straight text: http://c.learncodethehardway.org/book/ or maybe this, if you know the basics already: http://www.amazon.com/dp/0763771562

In the end, the only way you're going to learn C++ is by writing a crap ton of C++.
Who after all is today speaking about the destruction of the Armenians?
Craton
Profile Blog Joined December 2009
United States17278 Posts
Last Edited: 2012-11-22 07:11:00
November 22 2012 07:09 GMT
#3989
On November 22 2012 15:47 phar wrote:
Learning to assume that other people are right and working back through their logic instead of assuming that I'm right and trying to go from there has been the most valuable thing I've learned so far working in software development. Time and time again it has gotten me to quicker, cleaner, and easier to extend solutions, simply by taking the effort to figure out exactly why what someone was recommending is a good idea (or if it turns out to be a shitty idea, making absolutely sure it is). Even if that means re-writing something I just spent 60+ hours on. Really does suck when it comes down to that, but it's almost always just my fault for not fully figuring out the design and not enough talking with other people before I dove into coding.

I agree. As an example, I've rewritten my current program twice for the sake of learning and improving and have plans to do it again in the future. I think new developers find that just about everyone has spent time writing and rewriting large amounts of code, if not entire programs from scratch just for the sake of figuring things out and getting better.

I would definitely never assume others are right, though. That's always a disaster waiting to happen. You should take what anyone says with a many grains of salt and do more research on it.

Connecting to the earlier conversation, though, I'll point out that using one library vs another doesn't really teach you much, even though it can take significant amounts of time to recode. I certainly agree that it's worth being familiar with the different solutions, just budget your time on areas where you actually need improvements (be it for performance, maintainability, shoring up ignorance, etc.)
twitch.tv/cratonz
Fyodor
Profile Blog Joined September 2010
Canada971 Posts
November 22 2012 07:10 GMT
#3990
Stroustrup's book is really outdated right now I think. Covers only C++98 which means you're learning some obsolete/deprecated things, missing important features. New edition in feb. though.
llllllllllllllllllllllllllllllllllllllllllll
Bigpet
Profile Joined July 2010
Germany533 Posts
November 22 2012 07:32 GMT
#3991
On November 22 2012 16:10 Fyodor wrote:
Stroustrup's book is really outdated right now I think. Covers only C++98 which means you're learning some obsolete/deprecated things, missing important features. New edition in feb. though.


The C++ Programming Language, 4th Edition is about to be released, which would be the quasi-official C++11 reference.

Programming: Principles and Practice Using C++ will probably be updated after the reference book is released. If you are looking for official recommendations then you could look at http://isocpp.org/ which is a fairly new website by the standards body.
I'm NOT the caster with a similar nick
tec27
Profile Blog Joined June 2004
United States3702 Posts
November 22 2012 07:34 GMT
#3992
On November 22 2012 16:09 Craton wrote:
Show nested quote +
On November 22 2012 15:47 phar wrote:
Learning to assume that other people are right and working back through their logic instead of assuming that I'm right and trying to go from there has been the most valuable thing I've learned so far working in software development. Time and time again it has gotten me to quicker, cleaner, and easier to extend solutions, simply by taking the effort to figure out exactly why what someone was recommending is a good idea (or if it turns out to be a shitty idea, making absolutely sure it is). Even if that means re-writing something I just spent 60+ hours on. Really does suck when it comes down to that, but it's almost always just my fault for not fully figuring out the design and not enough talking with other people before I dove into coding.

I agree. As an example, I've rewritten my current program twice for the sake of learning and improving and have plans to do it again in the future. I think new developers find that just about everyone has spent time writing and rewriting large amounts of code, if not entire programs from scratch just for the sake of figuring things out and getting better.

I would definitely never assume others are right, though. That's always a disaster waiting to happen. You should take what anyone says with a many grains of salt and do more research on it.

Connecting to the earlier conversation, though, I'll point out that using one library vs another doesn't really teach you much, even though it can take significant amounts of time to recode. I certainly agree that it's worth being familiar with the different solutions, just budget your time on areas where you actually need improvements (be it for performance, maintainability, shoring up ignorance, etc.)

You certainly *don't* get it, or you wouldn't have ever responded in the way you did. Its quite clear from all of your posts here that you would rather have crappy code that inexplicably works than something clean, succinct, and maintainable. Learning and improving isn't about continually rewriting the same piece of code over and over again, its about giving a fuck and looking for ways you can improve it while you're doing it. Its about being completely willing to get halfway through a project and say, "Hey, this part really sucks. I'm gonna throw that out and write something better."

You shouldn't assume people are 100% right, but you should learn to find value in things people tell you instead of just floccinaucinihilipilificating them away. You're acting like an arrogant, entitled prick in this thread, as if you own everyone else's time and efforts. No one owes you shit. The fact that your previous fix took you "five seconds" just means that you value your five seconds higher than everyone else's five minutes, because you decided to ask here and waste our time before trying out a simple fix. Doesn't that seem a tad entitled to you?

I never told you to rewrite your entire application, I told you to use a different serializer library. Your application code shouldn't be coupled to that anyway, and it would have seriously been a matter of adding a new import and replacing the already non-working deserialization code with the Json.NET equivalents. If you had actually considered my suggestion, you might have realized that, but of course your time is worth infinitely more than mine so you just dismissed it out of hand.

Now, I'll ask you again, please leave this thread and never come back. You provide no value here. No one should want to take your suggestions or advice because you clearly take no pride in your craft, and don't seek to improve it; and when you ask questions? Well we've all seen how that turns out.
Can you jam with the console cowboys in cyberspace?
zatic
Profile Blog Joined September 2007
Zurich15362 Posts
November 22 2012 09:38 GMT
#3993
Hey guys, maybe you can give me some ideas how to approach this:

I have a black box backend system that dynamically generates HTML forms. As far as I can tell it's J2EE with Struts 1. I have access to the JSP files, but I am asked to change as little as possible.

The generated forms have an auto-save functionality (all in Javascript) that basically just invokes a struts action to save the form in regular intervals. The change they want is to only trigger the auto-save when there has actually been a change since the last auto-save.

Ideally I would do this all in newly introduced Javascript, with only a few lines changed in the existing auto-save Javascript functionality.

My current approach is to dynamically add event listeners to all generated form elements. They would change a global variable on the change event. The autosave function would check if that variable has been changed before submitting.

Does this sound good? I vaguely remember that "change" doesn't capture all changes for all form elements. I might be wrong (or maybe it's only in IE?). Does it fire for changes on the value that are done by Javascript and not user interaction? Also needs IE < 9 compatibility so I am aware I need to write some of the code twice.
ModeratorI know Teamliquid is known as a massive building
topfpflanze
Profile Joined November 2011
Germany7 Posts
November 22 2012 09:52 GMT
#3994
On November 22 2012 18:38 zatic wrote:
My current approach is to dynamically add event listeners to all generated form elements. They would change a global variable on the change event. The autosave function would check if that variable has been changed before submitting.

Does this sound good? I vaguely remember that "change" doesn't capture all changes for all form elements. I might be wrong (or maybe it's only in IE?). Does it fire for changes on the value that are done by Javascript and not user interaction? Also needs IE < 9 compatibility so I am aware I need to write some of the code twice.


Will you be able to use 3rd party libraries like jquery? This would solve you compatibility problems. Also with it's selectors it will be quite easy to install your event-handler on all relevant elements. See:
- http://api.jquery.com/change/
- http://api.jquery.com/category/selectors/

Depending on your specification "change" might be the right solution. Change is only fired on text-input-elements, when they lose focus. So if you need to save "unfinished" text-elements, change might not be what you are looking for.


Tobberoth
Profile Joined August 2010
Sweden6375 Posts
November 22 2012 09:53 GMT
#3995
On November 22 2012 18:38 zatic wrote:
Hey guys, maybe you can give me some ideas how to approach this:

I have a black box backend system that dynamically generates HTML forms. As far as I can tell it's J2EE with Struts 1. I have access to the JSP files, but I am asked to change as little as possible.

The generated forms have an auto-save functionality (all in Javascript) that basically just invokes a struts action to save the form in regular intervals. The change they want is to only trigger the auto-save when there has actually been a change since the last auto-save.

Ideally I would do this all in newly introduced Javascript, with only a few lines changed in the existing auto-save Javascript functionality.

My current approach is to dynamically add event listeners to all generated form elements. They would change a global variable on the change event. The autosave function would check if that variable has been changed before submitting.

Does this sound good? I vaguely remember that "change" doesn't capture all changes for all form elements. I might be wrong (or maybe it's only in IE?). Does it fire for changes on the value that are done by Javascript and not user interaction? Also needs IE < 9 compatibility so I am aware I need to write some of the code twice.

Would you be allowed to use jQuery? Because from my experience, jQuery tends to standardize actions like that, so it's possible that the jQuery "change" event includes more actions than the "default" one.
tec27
Profile Blog Joined June 2004
United States3702 Posts
November 22 2012 10:11 GMT
#3996
On November 22 2012 18:38 zatic wrote:
Hey guys, maybe you can give me some ideas how to approach this:

I have a black box backend system that dynamically generates HTML forms. As far as I can tell it's J2EE with Struts 1. I have access to the JSP files, but I am asked to change as little as possible.

The generated forms have an auto-save functionality (all in Javascript) that basically just invokes a struts action to save the form in regular intervals. The change they want is to only trigger the auto-save when there has actually been a change since the last auto-save.

Ideally I would do this all in newly introduced Javascript, with only a few lines changed in the existing auto-save Javascript functionality.

My current approach is to dynamically add event listeners to all generated form elements. They would change a global variable on the change event. The autosave function would check if that variable has been changed before submitting.

Does this sound good? I vaguely remember that "change" doesn't capture all changes for all form elements. I might be wrong (or maybe it's only in IE?). Does it fire for changes on the value that are done by Javascript and not user interaction? Also needs IE < 9 compatibility so I am aware I need to write some of the code twice.

Change will fire only on user-made changes, not stuff done through JavaScript (if you want them to fire from JavaScript changes, you have to trigger the event yourself). You shouldn't need to add an event handler on every form element, a single event handler at the form level should work fine since all the events on the inputs will bubble up. Also keep in mind that a change event on a text box will only fire *after* the textbox has lost focus. So this can cause some problems if they can manually submit the form and you want to auto-save, because their submission will happen as you try to send the auto-save data and most browsers will cancel the AJAX request.

jQuery might make the compatibility for IE<9 easier, but other than that I think it would be straightforward without it.
Can you jam with the console cowboys in cyberspace?
AmericanUmlaut
Profile Blog Joined November 2010
Germany2592 Posts
Last Edited: 2012-11-22 10:43:40
November 22 2012 10:36 GMT
#3997
@zatic

It's hard to know exactly what handlers would be necessary without knowing what sorts of "changes" are possible, and when exactly your global variable needs to be set (IE, if I'm in the process of typing in a field, should the text I'm typing be auto-saved?).

My instinct says that you should be able to use a single event handler bound to the keydown (assuming your forms contain text fields and you want to save in-progress changes) and change events. Like tec27 wrote, you shouldn't need to bind the handlers to every form field, just to the form itself, unless you have event handlers already in place that prevent the event from bubbling up.

Edit to add: You're out of luck as far as I know in terms of an event that will fire when content is changed via javascript. You'll either have to fire the events from the functions that make the changes or just set your global variable in those functions.

There is one idea that would let you do everything in a single function: Create a polling function that runs on load and every X ms therafter. It stores the values of every field in the form (conceivably you could just store formObj.innerHTML if it's not obscenely large) and if the values have changed, it sets your global variable.
The frumious Bandersnatch
zatic
Profile Blog Joined September 2007
Zurich15362 Posts
November 22 2012 11:56 GMT
#3998
Thanks guys. "Change" should be enough, I won't need to keep entered but unfinished text elements before they change focus.

AmericanUmlaut: Yeah what I am afraid is that their UI uses tons of Javascript already and might do some of the changes to form elements programmatically. I'll know more when I am onsite.

The polling thing might actually run into performance issues as the forms that are generated are huge (take several hours to complete).
ModeratorI know Teamliquid is known as a massive building
tec27
Profile Blog Joined June 2004
United States3702 Posts
November 22 2012 13:18 GMT
#3999
You shouldn't need to poll. The change event should do everything you need.
Can you jam with the console cowboys in cyberspace?
phar
Profile Joined August 2011
United States1080 Posts
Last Edited: 2012-11-22 21:53:20
November 22 2012 21:51 GMT
#4000
On November 22 2012 16:09 Craton wrote:I would definitely never assume others are right, though. That's always a disaster waiting to happen. You should take what anyone says with a many grains of salt and do more research on it.

Yea, I meant assume other people at my work are right, not in some random online forum. At work I'm surrounded by people who are significantly better than me at programming and smarter in general, so it's a pretty safe bet. Even if they do end up being wrong, I stand by what I initially said. It works more often than not to start from their position and go from there, working through the logic.
Who after all is today speaking about the destruction of the Armenians?
Prev 1 198 199 200 201 202 1032 Next
Please log in or register to reply.
Live Events Refresh
AI Arena Tournament
20:00
RO8
DaveTesta Events
18:15
The Dave Testa Open #11
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Liquid`TLO 143
StarCraft: Brood War
ZZZero.O 53
nyoken 38
NaDa 19
Dota 2
420jenkins364
League of Legends
JimRising 398
Counter-Strike
Fnx 1204
fl0m1029
Stewie2K629
Super Smash Bros
hungrybox1003
Heroes of the Storm
Khaldor222
Other Games
summit1g5534
Grubby3182
tarik_tv2993
crisheroes288
ToD248
ZombieGrub69
ViBE13
Organizations
Other Games
gamesdonequick959
Counter-Strike
PGL227
StarCraft 2
angryscii 54
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Hupsaiya 194
• HeavenSC 167
• musti20045 52
• Kozan
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
StarCraft: Brood War
• Azhi_Dahaki18
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota2814
• Noizen22
League of Legends
• Doublelift3619
Other Games
• imaqtpie972
• Shiphtur234
Upcoming Events
Replay Cast
31m
PiG Sty Festival
9h 31m
Clem vs Serral
Maru vs ShoWTimE
Sparkling Tuna Cup
10h 31m
uThermal 2v2 Circuit
15h 31m
Replay Cast
1d 9h
Wardi Open
1d 12h
Monday Night Weeklies
1d 17h
Replay Cast
2 days
Replay Cast
3 days
Replay Cast
4 days
[ Show More ]
The PondCast
4 days
KCM Race Survival
4 days
Replay Cast
5 days
Replay Cast
6 days
CranKy Ducklings
6 days
Liquipedia Results

Completed

Proleague 2026-02-27
LiuLi Cup: 2025 Grand Finals
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Acropolis #4 - TS5
Jeongseon Sooper Cup
Spring Cup 2026
[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
WardiTV Winter 2026
PiG Sty Festival 7.0
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025

Upcoming

ASL Season 21: Qualifier #1
ASL Season 21: Qualifier #2
ASL Season 21
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
CSLAN 4
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
NationLESS Cup
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Disclosure: This page contains affiliate marketing links that support TLnet.

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.