Code solutions to PHP, JS, CSS

Spread your code soluces to the world

Love me

Search results for : function    (10)

Make dir and upload files via FTP (php)

These two functions simplify the creating directory and files upload by FTP in PHP.

Simple function for PHP syntax highlighting (php)

This little function uses the PHP syntax highlighting displaying the result in a table with line numbers. Hard to do simplest. You can add CSS. This function is used by

Scroll div with javascript (javascript)

Very simple method to vertically scroll a DIV content without displaying scrollbars with Javascript. • The container div has overflow:hidden and a fixed height. • Its ID has to be recalled in the scrolldiv() function calls. This allows the multiple use of this function on the same page.

Zoom with CSS3 (css)

CSS3 allows the function of "scaling"(or zoom) on an HTML element. In the example below, the scale is assigned to the pseudo class : hover. Syntax : transition: (transition-property) (transition-duration in secondes) (transition-timing-function) • transition-property : all, css property • transition-duration : timing...

Dynamically add rows to a form. Complete solution (php)

Here is a complete solution for adding rows to a form. This sample script displays a form for insert and update products. When clicking on the link [+], we add a new product line. It also includes the update by sending the "mod" parameter corresponding to the ID of the MySQL table row to edit. Dynamic system for adding rows : Initially, the...

wordwrap without breaking words (php)

A simple function to cut a character string without breaking words. string wrap_word ( string $str [, int $length = 350] )

Move dynamically a DOM objet up (javascript)

When you display elements as list, it is sometimes necessary to provide the classification of the lines. This function can raise an object of a level. Eg. when displaying a list of products. The verification of the nodeType is used to circumvent a problem in some browsers that carriage returns and spaces between two objects as a "objet...

Dynamically resizing height of textarea (javascript)

This code dynamically resize a textarea according to its contents. It can work when the textarea gains focus and during typing.

Show hide DIV content with scrolling (javascript)

Show and hide the contents of a DIV with a single function from a mouse event. The DIV unfolds and folds progressively through the setTimeout. To use this script, run the function deplie() on an event with argument ID of the DIV in question. You can set the DIV position to absolute not to move the below located content.

Close HTML tags function (php)

A simple function to close all open HTML tags from text. To be used for example when you propose an editable field with HTML.