Welcome To Snipplr


Everyone's Recent Snippets Tagged javascript



« Prev 1 2 3 4 5 ... 48
  1. FAV

    List Posts By Terms

    To display events from The Events Calendar Pro organized by taxonomy
    PHP 45 views posted 2 weeks ago by reflectiondigital
  2. FAV

    Read Javascript questions for interview with example

    JavaScript is a client-side as well as server side scripting language that can be inserted into HTML pages and is understood by web browsers. JavaScript is also an Object based Programming language. Example Note: This is an example, you can change...
    JavaScript 20 views posted 1 month ago by priyagchaudhary
  3. FAV

    Powermail export field type "Typoscript"

    Typoscript fields are not exported by default in Powermail. If you want them to be exported you need to add this line in the Page TSConfig of your root page or form page:
    TYPO3 20 views posted 2 months ago by xtine777
  4. FAV

    TYPOSCRIPT: Use SUM() in SQL query

    Add values from a given field in your database
    TYPO3 21 views posted 3 months ago by xtine777
  5. FAV

    lastModified.func.php

    With this snippet you will have the ability to deliver the most recent version of any file. When dealing with a browser's cache you can't be certain your viewers are getting the most recent copy. By appending a GET value (the UNIX timestamp) to, f...
    PHP 20 views posted 4 months ago by daemondevin
  6. FAV

    Aktuelle Seiten ID in Fluid Template auslesen

    Funktioniert auch in Partials etc... Z.B.: bootstrap_package/Resources/Private/Partials/Page/Navigation/Main.html
    TYPO3 0 views posted 6 months ago by xtine777
  7. FAV

    Debugging in TYPO3 7.6

    Debugging in Controller and Fluid Template
    TYPO3 0 views posted 11 months ago by xtine777
  8. FAV

    ETYPO3 Extension development: Hide Field "Plugin Modus" in Plugin form

    In typo3conf/ext/extensionname/Configuration/TCA/Overrides/tt_content.php oder in ext_tables.php
    TYPO3 0 views posted 11 months ago by xtine777
  9. FAV

    Extensionentwicklung: storagePid soll Datensatzsammlung nicht überschreiben (in TYPO3 Version 7)

    Bei der Entwicklung einer eigenen Extension muss folgendes bedacht werden: ab TYPO3 Version 7 überschreibt die Deklaration von plugin.tx_extensionname.persistence.storagePid den Wert im Feld "Datensatzsammlung". Dazu muss nicht einmal ein Wert für st...
    TYPO3 1 views posted 11 months ago by xtine777
  10. FAV

    Left vertical menu 2 levels

    Typoscript for multilevel vertical menu, expanding when clicked
    TYPO3 0 views posted 11 months ago by xtine777
  11. FAV

    Show meaningful error messages

    Show meaningful error messages in frontend
    TYPO3 0 views posted 11 months ago by xtine777
  12. FAV

    Inherit content from parent page

    rightColumn = COA rightColumn.2 < styles.content.get rightColumn.2.select.where = colPos=2 rightColumn.2.slide = -1
    TYPO3 3 views posted 11 months ago by xtine777
  13. FAV

    JavaScript IP validation

    JavaScript regex for validating IP addresses, has been tested!
    JavaScript 2 views posted 1 year ago by plasticbottle
  14. FAV

    PHP regex e-mail validation

    It should work for domains like @something.co.uk note that regex will never really be able to match 100% of e-mail addresses without allowing some false positives
    PHP 1 views posted 1 year ago by plasticbottle
  15. FAV

    Java Credit Limit Calculator

    This was an assignment given to me in my Java course.
    Java 2 views posted 1 year ago by EthanEC94
  16. FAV

    Hide header, when news are empty

    Hide parent element, when child element has a specific class. In this case: child element = .no-news-found parent element = .csc-default (= content element containing the news plugin with header)
    jQuery 2 views posted 1 year ago by xtine777
  17. FAV

    Display Random Quotes with JavaScript

    This snippet code allows you to prevent the viewer from being able to right-click on your page. This can discourage the average user from borrow images or code from your site.
    JavaScript 3 views posted 2 years ago by apphp-snippets
  18. FAV

    Add IE interenet explorer class name to body

    Use it to detect old browser, when your client still use an old browser!
    jQuery 6 views posted 2 years ago by ginoplusio
  19. FAV

    Decimal to binary converter

    A one-liner that converts a decimal number to a binary number
    JavaScript 3 views posted 3 years ago by rm1984
  20. FAV

    React: Pass value to method from onClick

    How to pass a parameter into a method from an onClick method found in the render method. Majority of the times when you need to do this, your adding it through a loop. In this case, call a function where the item in the loop will automatically be...
    JavaScript 2 views posted 3 years ago by heathbo
  21. FAV

    Bootstrap javascript breakpoint utils

    ResponsiveBootstrapToolkit : https://github.com/maciej-gurban/responsive-bootstrap-toolkit
    JavaScript 5 views posted 3 years ago by dhjapan
  22. FAV

    React: Get width, height, and coordinates of a react object

    Use ref with getDOMNode() to get the actual html. Using getBoundingClientRect() on the actual html will give you the width, height, etc. Below: specs = ClientRect {} bottom: 269 height: 18 left: 797.546875 right: 1062.609375 top: 251 width: 2...
    JavaScript 3 views posted 4 years ago by heathbo
  23. FAV

    React: How to access returned HTML within a React Component

    Within a react component. How to gain access to the HTML that was just rendered. Any returned html element that is tagged with a ref, can easily be accessed by it's ref after it's been rendered. In the below case, use this.refs["domainModal"] to...
    JavaScript 3 views posted 4 years ago by heathbo
  24. FAV

    Codepad.co - Set Default Language to JavaScript.js Last active 11 minutes ago

    When creating a new https://codepad.co/ snippet, the default language will be set to 'JavaScript'.
    JavaScript 4 views posted 4 years ago by avansare
  25. FAV

    RegExp to find JS & Angular non-comment logs

    Regular Expression to find native Javascript console and AngularJS $log log warn or info that are NOT comments / commented out
    Regular Expression saved by 5 people 8 views posted 4 years ago by brandonjp
  26. FAV

    Anti iFrame Buster in JavaScript

    You know that iFrames are a necessary evil for many of us. When yuo put a third party site in an iframe is always a risk because they can break out of that iframe and redirect the visitor to another location. This code acts as a defense for such case...
    JavaScript 2 views posted 4 years ago by apphp-snippets
  27. FAV

    Getting IP Address

    Sometimes you may want to show the visitor that you are aware of their IP address. You can do so by using few lines of code as shown here. Place the code in any place of your page, where you want the IP address to appear:
    JavaScript 2 views posted 4 years ago by apphp-snippets
  28. FAV

    Copy object by value instead of by reference

    To do this for any object in JavaScript will not be simple or straightforward. You will run into the problem of erroneously picking up attributes from the object's prototype that should be left in the prototype and not copied to the new instance. If,...
    JavaScript 5 views posted 4 years ago by BrentS
  29. FAV

    Shorthand for Ternary Operator in PHP

    Shorthand for Ternary Operator in PHP
    PHP saved by 3 people 2 views posted 4 years ago by ursdeep
  30. FAV

    delete Operator don’t impact the length of Array in JavaScript

    delete Operator don’t impact the length of Array in JavaScript
    JavaScript saved by 3 people 2 views posted 4 years ago by ursdeep
« Prev 1 2 3 4 5 ... 48