|
|
“Re: RE: Creating Custom Events with JavaScript: Decoupling” |
|||
| From: | John Hermanson | In Response To: | 5581 RE: Creating Custom Events with JavaScript: Decoupling |
| Date Posted: | Friday, July 14, 2006 4:46:07 PM | Replies: | 1 |
| Enclosures: | None. | ||
I have a fairly large chunk of html and javascript code that I am reusing for a new 'special case' scenario. The problem is that the existing script now needs to update an html tag that only exists in the new (slightly modified) html. Completely decoupling the code from either version of the html by providing a custom event would be a much more elegent solution than other available options (e.g. checking for the existence of the tag before updating it or a try/catch block).
One other comment/question: Is it possible for the form tag to be some other tag type? I work in ASPX and having form tags within the existing uber-form breaks the postback 'magic'.
There are no trackbacks.
|
TruerWords
is Seth Dillingham's personal web site. Read'em and weep, baby. |