Welcome To Snipplr
Everyone's Recent Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
<p><div id="calc">
<p><b>VAT rate:</b>
<input type="text" id="vat_rate" placeholder="20" size="10" value>
<p><b>Net price:</b>
<input type="text" id="net_price" size="10" value>
<p><b>Gross price:</b>
<input type="text" id="gross_price" size="1...
0
14115
posted 4 years ago by antonykidless
To display events from The Events Calendar Pro organized by taxonomy
0
11878
posted 4 years ago by reflectiondigital
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...
0
11921
posted 4 years ago by priyagchaudhary
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:
0
10941
posted 5 years ago by xtine777
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...
0
10697
posted 5 years ago by daemondevin
Funktioniert auch in Partials etc...
Z.B.: bootstrap_package/Resources/Private/Partials/Page/Navigation/Main.html
0
1186
posted 5 years ago by xtine777
In typo3conf/ext/extensionname/Configuration/TCA/Overrides/tt_content.php
oder in ext_tables.php
0
1106
posted 5 years ago by xtine777
TYPO3
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...
0
1408
posted 5 years ago by xtine777
Typoscript for multilevel vertical menu, expanding when clicked
0
1016
posted 5 years ago by xtine777
rightColumn = COA
rightColumn.2 < styles.content.get
rightColumn.2.select.where = colPos=2
rightColumn.2.slide = -1
0
1390
posted 5 years ago by xtine777
JavaScript regex for validating IP addresses, has been tested!
0
1101
posted 6 years ago by plasticbottle
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
0
1071
posted 6 years ago by plasticbottle
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)
0
1015
posted 6 years ago by xtine777
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.
0
1160
posted 7 years ago by apphp-snippets
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...
0
1215
posted 7 years ago by heathbo
ResponsiveBootstrapToolkit : https://github.com/maciej-gurban/responsive-bootstrap-toolkit
0
1026
posted 8 years ago by dhjapan
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...
0
1529
posted 8 years ago by heathbo
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...
0
1046
posted 8 years ago by heathbo
When creating a new https://codepad.co/ snippet, the default language will be set to 'JavaScript'.
0
1009
posted 8 years ago by avansare
Regular Expression to find native Javascript console and AngularJS $log log warn or info that are NOT comments / commented out
1
1148
posted 8 years ago by brandonjp
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...
0
1061
posted 9 years ago by apphp-snippets
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:
0
1071
posted 9 years ago by apphp-snippets
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,...
0
1193
posted 9 years ago by BrentS