Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
JavaScript
Accessing javascript variable from code behind and accessing code behind variable from javascript
Many times we face situation like when we need to access the code behind variables from javascript as well as accessing javascript variable from code behind.
I can remember a practical scenario in my previous project.
The requirement was to dra...
0
944
posted 14 years ago by streamt
default.aspx?id=5
queryString('id') will return 5
Also this will convert to lower case. IIS / ASP.net is not case sensitive so my function isn't either.
0
574
posted 14 years ago by derekholmes
Run in the FireBug console, and copy the output. An odd class is included for row striping, and the number of items can be controlled via the for loop.
1
798
posted 14 years ago by Jamie
Looked for a simple, efficient cross-fading script that does it properly without fading to the background color. This script uses z-indexes to prevent the background from ever showing, creating a smooth fade.
0
647
posted 14 years ago by relaxasaurus
Easily grabs email addresses from a bulk text (CSV and/or some other email address-filled list/db).
Example #2 takes the input (bulk text) from textarea #input and puts the clean emails in the textarea #extractedemails.
1
2951
posted 14 years ago by world_eggplant
If you wish to set an ASyncPostBackTrigger in ScriptManager for AJAX.NET, using ASyncPostBackTrigger="xxx" causes Firefox, Chrome, Safari, etc. to timeout on partial page postback, using this javascript to set the ASyncPostBackTrigger (instead of the...
0
943
posted 14 years ago by cardiffblogger
A browser friendly way to trigger an event on an element. This is just a simple snippet which doesn\'t really explain the detailed contents of an event object, but it gives an idea of the differences between specific browsers. This function will fire...
0
1111
posted 14 years ago by bryanlyman
This function calculates distance with the Haversine formula, this formula assumes that our Earth is spherical, but it isn’t since it’s more like a big orange fruit also compresses at poles. I’ve read that this function has an error about + o â...
3
5915
posted 14 years ago by ginoplusio
When you show the coordinates of a point, it’s sometimes better to show them as degrees and not as deciaml (even if decimal is simpler). Each of the two coordinates can be converted with the same function. In the function call the “tipo†is the...
1
933
posted 14 years ago by ginoplusio
This script displays the current date inside a form via 3 prefilled drop down menus (day, month, year). The visitor can then specify a different date if he/she wants. You can have multiple drop down dates within the same form as well.
0
843
posted 14 years ago by kanampo