Nimble Coder

Adventures in Nimble Coding
posts - 76, comments - 39, trackbacks - 0

javascript

There are 3 entries for the tag javascript
SVG Building Map (Part 2)

building.aspx: SVG Part 2 sample BuildingSample02.zip: source (9KB) Note: Eventually all of the Building Map samples will be converted to Silverlight for comparison. In the last installment, I showed a simple example of a building map with static personnel information that worked with both Internet Explorer and FireFox. In this post I will add dynamic building information by generating JavaScript from SQL Server data. Step 1: Define a SQL table I defined a simple SQL table to store the information for the building occupants. The schema will become more sophisticated as the samples progress, so I...

posted @ Friday, January 11, 2008 9:18 PM | Feedback (0) |

SVG Building Map (Part 1)

Due to blog restrictions, the sample is located on a separate page. building.html: SVG sample BuildingSample01.zip: source (6KB) Note: In my previous blog entry, I stated that SVG is a technology with diminishing support and that ultimately I plan to convert this building map to SilverLight. The first example is a very basic building map. I created a simple SVG file to represent a building and then created occupants for the building (as if you could keep these crazy rascals in a building -- look at the names and you should know what I mean). For simplicity this sample does...

posted @ Thursday, December 06, 2007 11:33 PM | Feedback (0) | Filed Under [ JavaScript SVG ]

Best Practice for Verbatim String Text Block

I was browsing various blogs today and I came across a good example for using a verbatim string instead of a StringBuilder object. The code I came across looked like this (I mean absolutely no disrespect to the author, so I won't include the original link):private void ClientScript() { StringBuilder sb_Script = new StringBuilder(); sb_Script.Append("<script language=\"javascript\">"); sb_Script.Append("\r"); sb_Script.Append("\r"); sb_Script.Append("function cb_verify(sender) {"); sb_Script.Append("\r"); sb_Script.Append("var val = document.getElementById(document.getElementById" +"(sender.id).controltovalidate);"); sb_Script.Append("\r"); sb_Script.Append("var col = val.getElementsByTagName(\"*\");"); sb_Script.Append("\r"); sb_Script.Append("if ( col != null ) {"); ...

posted @ Friday, November 23, 2007 12:05 AM | Feedback (0) | Filed Under [ C# JavaScript ]

Powered by: