halk


Member since 10/02/2012

Name: Hal Kitts

Location: Upstate New York

Website: not yet just a sandbox

I like to code:)

9 snippets

3781 profile views

0 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

halk's Recent Snippets



« Prev 1 Next »
This is a static session wrapper that handles single variables and arrays. It allows setting, resetting, and deleting session variables (without destroying the session). It regenerates the session id every time a session is started to prevent sessi...
0 955 posted 12 years ago by halk
/** * THIS FUNCTION WILL RENDER A CONTAINER OR SELF-CLOSING HTML ELEMENT. * IT AUTO DETECTS WHAT TYPE YOU WANT * BASED ON RATHER OR NOT YOU SET A _data KEY IN THE ARRAY OF * ATTRIBUTES PASSED TO THE FUNCTION * * USING AN ASSOCIATIVE ARRA...
0 990 posted 12 years ago by halk
https://gist.github.com/4098493 (examples of use below the class code) This class allows you to load a file of snippets that are really mini-templates copy them from your repository fill the token slots in them the with your data and render them as...
0 1024 posted 12 years ago by halk
Does not require http in the text to link. It must start with www however. Optionaly make the links popup in a new window.
0 1319 posted 12 years ago by halk
This is a public jsonp api. I use it with jQuery Like This: $.getJSON("http://yourdomain/yourpath/jsonp_api.php?method=getSchema&params=your_db_name&jsoncallback=?", function(data){ //DO SOMETHING WITH THE DATA HERE }...
1 1119 posted 12 years ago by halk
This function dosen't use curl, or any other libraries. Just include it in your function library and use it like this: $Post_result = _post('http://www.yourdomain.com/your_path/post_api.php',"method=fetchJson&params=select * from user");
0 1030 posted 12 years ago by halk
Any valid json object will be recursively traversed building a nested unordered list of its properties and their values. This example parses the json entered in the text area into an object that is passed to the json_tree() function. I use the twit...
0 1143 posted 12 years ago by halk
For some reason setting a default value for select elements does not work. This one line of jquery solves that problem. Assign a value (value="something") to the select tag that is to be the default value. With jquery get all select elements with a...
0 1481 posted 12 years ago by halk
This will monitor the status of all ajax calls on the page. When ajax starts i show an animated spinner gif and display a message that ajax has been requested. On completion of a call the status returned is displayed and the spinner is hidden to in...
1 938 posted 12 years ago by halk
« Prev 1 Next »