Add-on FireQuery – simpla integrarea si rularea lui jquery in pagina web in firefox

About this Add-on

FireQuery is a collection of Firebug enhancements for jQuery. Requires Firebug 1.3 or greater.

Features:

jQuery expressions are intelligently presented in Firebug Console and DOM inspector
attached jQuery data are first class citizens
elements in jQuery collections are highlighted on hover
jQuerify: enables you to inject jQuery into any page

Video cum putem sa-l folosim sursa youtube

Sursa Add-on gasiti aici

cum se pot trimite parametrii catre un javascript extern

Presupunem ca avem un fisier extern care executa niste functii de javascript, acesta este inclus in pagina noastra folosing tagurile corespunzatoare

< script type="text/javascript" language="JavaScript" src=".... < /script>

in acest script vrem sa trimitem niste parametrii

?page=general&id=123123

in tagul nostru de javascript extern scriem urmatoarele:

< script type="text/javascript" language="JavaScript" src="do_javascript.php?page=general&id=123123"/>

in fisierul do_javascript.php setam header-ul care seteaza fisierul ca fiind unul de javascript

Initializam parametrii primiti din URL in formatul lui javascript,



In asa fel putem sa folosim parametrii trimisi prin request.

serializarea anumitor campuri din pagina si trimitearea acestoara pe server

Folosind jQuery, se poate face minuni, asta stim cu totii 🙂

o noua minune descoperita de mine este urmatoarea:

am nevoie sa trimit catre server anumite campuri din pagina, o parte dintr-o forma, o parte din afara ei.
ce trebuie sa fac?

1) definesc o clasa pentru acele campuri, ca sa-i pot sa identific
ex:
< input type="text" name="first_name" class=”edit_field” value=”” / >

2) folosind functia .serializeArray() din libraria lui jQuery pentru a serializa rezultate in formatul JSON.

3) folosind ajax tot de la jQuery trimit parametrii serializati catre server, folosind metoda GET/POST

exemplu:

< script >
var fields = $(".edit_field").serializeArray();
// do update via ajax
$.ajax({
    type: "POST",
    url: "/users/update/",
    data:fields,
    success: function(data){}
});
< /script >

Jquery Calendar with time picker and translation of the content

The timepicker addon adds a timepicker to jQuery UI Datepicker, thus the datepicker and slider components (jQueryUI) are required for using any of these.

To create your own regional objects per region, use the setDefaults method to tie these together. Setting datepicker and timepicker regionals separtely will help ensure proper wording when only using datepicker or timepicker. Here is an example:

$.datepicker.regional[‘ru’] = {
closeText: ‘Закрыть’,
prevText: ‘<Пред', nextText: 'След>‘,
currentText: ‘Сегодня’,
monthNames: [‘Январь’,’Февраль’,’Март’,’Апрель’,’Май’,’Июнь’,
‘Июль’,’Август’,’Сентябрь’,’Октябрь’,’Ноябрь’,’Декабрь’],
monthNamesShort: [‘Янв’,’Фев’,’Мар’,’Апр’,’Май’,’Июн’,
‘Июл’,’Авг’,’Сен’,’Окт’,’Ноя’,’Дек’],
dayNames: [‘воскресенье’,’понедельник’,’вторник’,’среда’,’четверг’,’пятница’,’суббота’],
dayNamesShort: [‘вск’,’пнд’,’втр’,’срд’,’чтв’,’птн’,’сбт’],
dayNamesMin: [‘Вс’,’Пн’,’Вт’,’Ср’,’Чт’,’Пт’,’Сб’],
weekHeader: ‘Не’,
dateFormat: ‘dd.mm.yy’,
firstDay: 1,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: ”
};
$.datepicker.setDefaults($.datepicker.regional[‘ru’]);

$.timepicker.regional[‘ru’] = {
timeOnlyTitle: ‘Выберите время’,
timeText: ‘Время’,
hourText: ‘Часы’,
minuteText: ‘Минуты’,
secondText: ‘Секунды’,
millisecText: ‘миллисекунды’,
currentText: ‘Теперь’,
closeText: ‘Закрыть’,
ampm: false
};
$.timepicker.setDefaults($.timepicker.regional[‘ru’]);

$(‘#example4’).datetimepicker({
timeFormat: ‘h:m’,
separator: ‘ ‘
});

documentation here

jqGrid – client-side solution loading data dynamically through Ajax callbacks

jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the web. Since the grid is a client-side solution loading data dynamically through Ajax callbacks, it can be integrated with any server-side technology, including PHP, ASP, Java Servlets, JSP, ColdFusion, and Perl.

jqGrid’s Home page can be found here

How to write a PDF from PHP with a custom font and encoding

TCPDF is an Open Source PHP class for generating PDF documents. It continues where FPDF stopped, and contains all its goodies plus support of UTF-8 Unicode and Right-To-Left languages! Especially the missing UTF-8 Unicode support in FPDF is a problem for everyone living outside the English language only countries.

* Go to www.tcpdf.org and download the latest version of TCPDF.

Main Features:

* no external libraries are required for the basic functions;
* all ISO page formats, custom page formats, custom margins and units of measure;
* UTF-8 Unicode and Right-To-Left languages;
* TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
* methods to publish some XHTML code, Javascript and Forms;
* images, graphic (geometric figures) and transformation methods;
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index – Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code;
* Grayscale, RGB, CMYK, Spot Colors and Transparencies;
* automatic page header and footer management;
* document encryption and digital signature certifications;
* transactions to UNDO commands;
* PDF annotations, including links, text and file attachments;
* text rendering modes (fill, stroke and clipping);
* multiple columns mode;
* bookmarks and table of content;
* text hyphenation;
* automatic page break, line break and text alignments including justification;
* automatic page numbering and page groups;
* move and delete pages;
* page compression.

Check the default TCPDF Examples.

HTML Regex Data Extractor 0.6

HTML Regex Data Extractor

This extension is useful for those who want to test the regular expression on the live HTML content.
They can also use their custom content.

Usage :
– Press Alt-R to test with your custom content
– Press Ctrl-U or right-click and choose “View Page Source” to test with HTML source of current page
– When you are viewing the source code, to show/hide the Regular Expression Bar, on Toolbar, choose View -> RegexHTML

Source : here