Posts Tagged ‘JavaScript’

I found TinyLimiter when I needed a character limiter for a textarea, specifically a multiline TextBox ASP.Net component.  Since ASP seems to ignore the maxlength attribute for multiline textbox’s, I took that to mean that TextArea in HTML doesn’t have a maxlength attribute.  It does, I realized, but not after I edited TinyLimiter to my […]



$(“.theSelectBox”).val(‘2’);



function queryString(keyValue) {   var search = window.location.search.substring(1);   var list = search.split(“&”);   for (i = 0; i < list.length; i++) {     item = list[i].split(“=”);     if (item[0] == keyValue) {       return item[1];     }   } } var foo = queryString(“foo”);


I’m sure I’ve had to do this many times in my life, and I thought there was an easier way. This is fairly elegant, just passing the name of the radios. (This is basic of the basics.) function radioSelected(radioGroup){   for (i = 0; i < radioGroup.length; i++){     if (radioGroup[i].checked)         return true;   }   return false; } […]


JS Toggling

29Nov10

/*************************************************************** function toggleField: Set the visibility of a page element. parameter: fieldname: Either ID of an element or reference to an element parameter: visibility: on/off (visible/hidden) parameter: bViaId: True is by ID, false is by reference to the element ***************************************************************/ function toggleField(fieldName, visibility, bViaId){   var oFieldName;   if (bViaId == true)     oFieldName = document.getElementById(fieldName);   else     oFieldName […]


I was lookingfor a way to determine browser type from Flex without having a JavaScript function on the host page.  I came across this: Another (Cool) Way To Call Javascript One clever thing that you can do through the ExternalInterface is to use the “eval()” Javascript function to run an expression that you’ve written inside […]


The one I eventually ended up using: http://www.eggheadcafe.com/articles/20020107.asp.  Although I stripped out half the code because it was unnecessary.  I don’t know why that was done — for tracking maybe… Also there’s the jQuery implementation http://plugins.jquery.com/project/query-object, but I wanted to code it myself parseQueryString.js


remove javascripts: (in acrobat) advanced => PDF optimizer.. => Discard objects => discard all javascript actions + discard user data => discard all comments, discard external crossreference From 97 things every prog, giga.