Posts

Showing posts from 2011

Reserve word in JQuery

I was wondering myself about this the other day when I was trying to resolve an issue where the JQuery AJAX async callback doesn't trigger the session state timeout routine of the .NET properly. I was getting a lot of issues with it particularly because I set a parameter name in the JQuery AJAX call to be "jquery". This actually will cause the JQuery AJAX failed to work. So after I tried to change the parameter to another name, then it works. I was thinking to myself, it could be that the word jquery is a reserved word, so I tried to see if I could find any reference to the reserved keyword in JQuery, but can't find any. So, ought to write it down here to have a reference to remember that I have faced this issue before.

Web Development: Disable, Validate, & Enable Buttons

I bounced into this problem during a Web UI development, of which I'd say it's quite a common issue. Whenever a button is clicked, ideally it would be good to disable it to avoid continuous clicking. Of course, it may not be the case in certain circumstances, i.e. loading of images, of which sometimes clicking the button again would surely making it load faster. However, in the latest development that I involved in, I need to make sure that the button as to be disabled to avoid continuous clicking that would cause some Javascript error that would cause the whole website to stop working. I've no idea why this is happening, and my only explanation should be because the execution time is short & it's AJAX, therefore the continuous clicking would cause some process not able to be executed timely and causing this issue. So after some research on the Internet, I found that in order to disable the button during a button click event that has a postback, the onclick event

Querying Elements Inside iframe & TabPanel

As it's quite fairly new to me because I've never did Javascript extensively, thus it is difficult for me at first to code it. My recent task required me to extract information from a web page displayed within an iframe, and then create an XML to represent it. The approach is pretty straightforward after searching the Internet for solutions. All I need is to get the ID of the iframe, and then create an object inside Javascript to point to that iframe using getElementById, and finally invoke the Javascript function of the web page displayed within the iframe. But then the other task is how to get the list of iframe IDs? There are several iframe elements that will be created dynamically and each of them is going to be an element within an AJAX TabPanel, which in turn will be created dynamically also inside an AJAX TabContainer. If it's just normal HTML element, then it's very straightforward; but with the TabPanel object, I need to find a way to extract only the activ