Skip to main content

Posts

Showing posts with the label html

SQL Replace

A colleague recently asked me if it was possible to replace a string in SQL. After a bit of questioning, this is because entities like & in HTML would be encoded to & in his database. Since it was the case of outputting information from a SQL statement, this can be simply done by using the REPLACE function in the SELECT . For example: SELECT REPLACE(CompanyName, '&', '&') FROM Company The same concept applies in Crystal Reports.

CSS Rollover Buttons

My work place tasked me with trying to be as purist as possible with HTML and CSS for an interface their web application. Without any formal web development background, I have always been one of those who intermingle the code and have presentation within the HTML. I think it came out pretty well. I separated design from content in addition to separating the dynamics. Mind you, I even separated out all the server talk and taught myself some XML/XSL in the process. After all that I learnt Ajax, without realising it. One little nugget from all this is creating a pure CSS rollover button for the menu, without Javascript. There's alot of websites that help out in this, but they are not "pure" as they involve you including the image in the HTML and to perform some shifting with the image. Hell no to that. My way leaves out the usual ul tag and dives straight into the anchor ( a ) tag as it should be: a href ="links.htm" id ="linksButton" title ="Lin...