Let’s say you have an awesome social network, a dating platform for cars, and you want to share your cars profile on Facebook. It should look like this. How do you do that? First of all you should load Facebooks JavaScript SDK. Insert this code below the “body” tag in your page. Replace 99999999999999 with yourContinue reading “Facebook Share Link”
Category Archives: JavaScript
Comparison of Application Level Package Managers
I have to work with a lot (9) of different package managers at my daily work at VersionEye. Part of our mission is it to make manual updating of dependencies extinct, because it’s a manual and time consuming task which nobody enjoys. That’s why we are building a notification system for open source software libraries to make ContinuousContinue reading “Comparison of Application Level Package Managers”
How to track page views in a SinglePage App
The google analytics snippet tracks regular page views every time the page gets reloaded. That happens if you navigate to another page or your reload the current page. But if you have a AJAX heavy SinglePage Application, for example build with Backbone.JS or ember.js, than the default code snippet from Google is not enough. AnotherContinue reading “How to track page views in a SinglePage App”
Improving the Dependency Wheel at the GitMerge Hackathon
Last week I attended to the GitMerge Conference in Berlin. It was sponsored by GitHub and Google. On Saturday their was the hackathon day. I found somebody who want to contribute to the dependency wheel project. Many Thanks to Coding46 for his contributions! The dependency wheel project is a JavaScript Library which enables you toContinue reading “Improving the Dependency Wheel at the GitMerge Hackathon”
Fetching URL Parameter with JavaScript
With this code you can fetch all parameters from the URL. The function will return a map with all key & value pairs.
jQuery textbox hinter in IE8
Maybe you know the jQuery textbox hinter. That is a JavaScript lib. that adds an text and a css class to input textbox in a HTML page. The idea behind this technic is to show a hint in a textbox. That can look like this here: And as soon you click into the textbox theContinue reading “jQuery textbox hinter in IE8”
.gitignore
If you want that git is ignoring some files for you you just have to create the “.gitignore” file in your project root. Here you can add all the files you don’t want have in your git repository. For example some meta files from IntelliJ IDEA. *.iml *.ipr *.iws .idea/
jQuery Conference
I was the whole weekend on the jQuery conference in Mountain View by Microsoft. It was a nerdy weekend 🙂 I was suprised that Microsoft is hosting a conference like jQuery. But they do! Thank you! The Microsoft conference center is pretty cool. In the guarden there is beach volleyball place and a basketball place. TheContinue reading “jQuery Conference”
Create a GIT Repository
Just go into the directory you want to have version control for and type in: git init This will create an empty git repository on your hard disk. With this command git add . you can add all files in the directory to the git repository. And with git commit -a -m “init” you canContinue reading “Create a GIT Repository”
validateMonth
Das folgende JavaScript prüft beim verlassen eines Textfeldes, ob die Eingabe größer als 12 ist. Wenn das der Fall ist, dann wird das Textfeld auf 12 gesetzt. aufgerufen wird das ganze wie folgt:
Avoid none number-keys
Das folgende JavaScript verhindert die Eingabe von Buchstaben und Sonderzahlen. Es lässt nur natürliche Zahlen als gültige Eingabe zu. Es muss im onkeypress Attribut eines Textfeldes wie folgt aufgerufen werden: Wenn es richtig eingebunden ist, dann nimmt das Textfeld nur natürliche Zahlen als Eingabe an. Andere Eingaben werden einfach ignoriert.
Uncheck all checkboxes
Das folgende JavaScript iteriert über alle checkboxen in einem Formular und deselektiert jedes einzelne von ihnen. Das entsprechende Formular in dem die Checkboxen liegen, sollte mit der ID “FormName” markiert sein. Wenn das Formular eine andere ID hat, dann muss dementsprechend die Funktion angepasst werden. Das folgende Script iteriert über alle Formulare eines Dokumentes undContinue reading “Uncheck all checkboxes”
getCookieValue in JavaScript
Here is my version of “getCookieValue” in JavaScript:
AJAX
Note for me. AJAX Code.