Contents tagged with Javascript
-
The sexy new web
A nice article about how we are starting to expand and build smarter, richer applications on the web.
-
Wanna use goto? You could break STUFF!
Today while writing a javascript version of a parser I was trying to work out how to implement a
goto
statement so that I could break out of an outer loop from an inner loop. You can either break or continue a labelled statement. The following snippet breaks a labelled statement. -
ContextMenu now supports Mozilla and Opera
I finished-off the changes required to make ContextMenu run in multiple-browsers and will be uploading the latest version of the control to GotDotNet tonight, so it should be available for download in 2-3 days - I'll blog a message when the new code is up and ready for download. So far I've tested it in:
- Internet Explorer 6
- Mozilla 0.7
- Opera 7.11
There's a demo page for ContextMenu which you can use to test the menu on your own browser; I'd appreciate any feedback via my contact form if you encounter bugs, etc.
-
Adding cross-browser support for ContextMenu
This weekend I have to get the ContextMenu working in Opera and Mozilla browsers. This shouldn't be too hard as I've stuck close to the spec. on everything and already have a browser sniffer built in to the js code. I've already taken the precautions of separating the 4 main XBrowser fragile parts out into their own logic units:
-
Webmonkey, RIP: 1996 – 2004
I just needed to blog this so that I have a bookmark reference to it.
-
ContextMenu - exposing and handling events
The ContextMenu is now code complete and I'm running through the code adding the appropriate Xml comment sections for when I produce the .chm file for the assembly. My aim is to have a Comment, Remark and Sample for each public member within the assembly.
-
ContextMenu - now working in browser.
I finally got all of the rendering logic finished and spent this morning working "in the client" on some positional bugs. Basically, I had the menu working fine until the user selected a menu which was at a position greater the 1 window height down the page. In other words, if the page was tall enough to require a scrollbar down the side, the positioning of the menu was screwy when you had to scroll down. I've fixed that though with a nice little hack :-) Basically, I wire-up a delegate to handle the mousedown event on the document like so:
-
(D?)Html + Css : Now it's slants!
It's amazing what some of the creative folk can do with a couple of pieces of string:
-
MarkItUp.WebControls.ContextMenu : Making a start
A couple of days ago I discussed a string buffering technique that I'm using for a client-side context menu widget. In one of the comments on that post I mentioned that I'd blog about my progress in turning it into a useable ASP.NET ContextMenu Server Control. So here goes...
-
Minimize string creation in dhtml widgets
I wrote a component tonight which allows me to easily bind client-side pop-up menu's to objects on a web page. A single menu is basically a Html TABLE with a collection of child menu-items represented by DIV's. Because there is a high liklehood of menu's being created over and over again I decided that I would take steps to minimize the amount of string building by “caching” the html for the menu and each menu-item the first time that it is generated. I liked it so much that I thought I'd blog it :-) Here is the GetHtml method for the menu which caches it's chunk of Html in the array variable named _stringIntern_ the first time that it is generated and pulls it from there on subsequent rendering operations. The same logic is followed for each menu-item.