<script src='<%= ResolveClientUrl("~/Scripts/jquery-1.8.3.js") %>' type="text/javascript"></script>
ResolveClientUrl -> kako zalinkati ‘static content’ u ASPu
<script src='<%= ResolveClientUrl("~/Scripts/jquery-1.8.3.js") %>' type="text/javascript"></script>
ResolveClientUrl -> kako zalinkati ‘static content’ u ASPu
dz42.isNumber = function(n) { return !isNaN(parseFloat(n)) && isFinite(n); }
Trenutno provjereno radi u Chrome i Firefox preglednicima.
1. u js-u kreiraj Blob objekt koji sadrži podatke koje šalješ klijentu
var data = ['Vrijeme;ChargeCurrent;LoadCurrent;Voltage2013.01.178:34:28;0.24;0.28;13.152013.01.17 09:50:48;0.36;0.22;13.452013.01.17 11:15:54;0.39;0.33;13.69']; var blob = new Blob([data], {type : 'text/csv'});
2. Kreiraj data uri do Blob objekta
var url = URL.createObjectURL(blob);
3. Kreiraj ili modificiraj anchor
var anchor = document.getElementById('a'); anchor.href = url; anchor.download = '1.csv'; // Naziv i ekstenzija datoteke
Ovako izgleda finalni element
<a id="a" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==" download="red_dot.png">Download red dot</a>
//hook loading of new page and edit page screens add_action('load-page-new.php','add_custom_help_page'); add_action('load-page.php','add_custom_help_page'); function add_custom_help_page() { //the contextual help filter add_filter('contextual_help','custom_page_help'); } function custom_page_help($help) { //keep the existing help copy echo $help; //add some new copy echo "<h5>Custom Features</h5>"; echo "<p>Content placed above the more divider will appear in column 1. Content placed below the divider will appear in column 2.</p>"; }
function hide_update_notice_to_all_but_admin_users() { if (!current_user_can('update_core')) { remove_action( 'admin_notices', 'update_nag', 3 ); } } add_action( 'admin_notices', 'hide_update_notice_to_all_but_admin_users', 1 );
wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip