Mostrando entradas con la etiqueta javascript. Mostrar todas las entradas
Mostrando entradas con la etiqueta javascript. Mostrar todas las entradas

miércoles, 21 de febrero de 2018

jueves, 5 de marzo de 2015

viernes, 10 de octubre de 2014

miércoles, 8 de octubre de 2014

TEXTO TODO EN MAYUSCULA LADO DEL CLIENTE CS JQUERY

MI SOLUCION: OJO QUE MEJOR NO HAY QUE GENERALIZAR MUCHO EN EL INPUT  DE TIPO TEXT YA QUE POR EJEMPLO EL LOGIN NECESITA DIFERENCIAR MAYUSCULAS Y  MINUSCULAS MEJOR SERIA CON UNA CLASE  por ejemplo una clase .uppercase

CSS
<style type="text/css">
input[type=text] {
    text-transform:uppercase;
}
</style>

JQUERY
<script type="text/javascript">
    $(function () {
        $("input[type=text]").keyup(function () {
            $(this).val($(this).val().toUpperCase());
        });

        $("#Button1").click(function () {
            alert($("#Text1").val());
        }
        );
       
    });
</script>

//PRUEBA
<body>
    <input id="Text1" type="text" />
    <input id="Button1" type="button" value="button" />
</body>

REFERENCIAS
http://stackoverflow.com/questions/9587542/how-to-control-or-change-all-the-text-to-upper-case
http://devhints.wordpress.com/2006/11/01/css-make-it-all-uppercaselowercase/

jueves, 2 de octubre de 2014

QUERYSTRING PARAMETROS JAVASCRIPT Y C#

JAVASCRIPT
http://stackoverflow.com/questions/19491336/get-url-parameter-jquery
http://www.jquerybyexample.net/2012/06/get-url-parameters-using-jquery.html
http://www.w3schools.com/jsref/prop_loc_search.asp
http://w3lessons.info/2013/02/25/how-to-get-url-parameters-values-using-jquery/
C#
http://msdn.microsoft.com/es-es/library/system.web.httprequest.querystring%28v=vs.110%29.aspx
____

miércoles, 1 de octubre de 2014

martes, 30 de septiembre de 2014

Diferencia operator == vs === I use in JavaScript comparisons

http://stackoverflow.com/questions/359494/does-it-matter-which-equals-operator-vs-i-use-in-javascript-comparisons

jueves, 25 de septiembre de 2014

El OBJETO JSON DE LOS NAVEGADORES

All modern browsers support native JSON encoding/decoding (Internet Explorer 8+, Firefox 3.1+, Safari 4+, and Chrome 3+). Basically, JSON.parse(str) will parse the JSON string (aunque puede parsear directamente null,true,false, numeros)  in str and return an object, andJSON.stringify(obj) will return the JSON representation of the object obj
http://stackoverflow.com/questions/891299/browser-native-json-support-window-json
----------------------
This article covers the ECMAScript 5 compliant native JSON object added in Gecko 1.9.1.  For basic information on using JSON in previous versions of Firefox, see JSON.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON
-----------------------
JSON (JavaScript Object Notation) is a data-interchange format.  It closely resembles a subset of JavaScript syntax, although it is not a strict subset. (See JSON in the JavaScript Reference for full details.)  It is useful when writing any kind of JavaScript-based application, including websites and browser extensions.  For example, you might store user information in JSON format in a cookie, or you might store extension preferences in JSON in a string-valued browser preference.
JSON is capable of representing numbers, booleans, strings, null, and arrays (ordered sequences of values) and objects (string-value mappings) composed of these values (or of other arrays and objects).  It doesn't natively represent more complex data types like functions, regular expressions, dates, and so on.  (Date objects by default serialize as a string containing the date in ISO format, so while they don't round-trip, the information isn't completely lost.)  If you need to preserve such values, you can transform values as they are serialized, or prior to deserialization, to enable JSON to represent additional data types.

domingo, 14 de septiembre de 2014

viernes, 12 de septiembre de 2014

martes, 9 de septiembre de 2014

chosen combos

http://harvesthq.github.io/chosen/

objeto window en java script

JavaScript Window - The Browser Object Model


The Browser Object Model (BOM) allows JavaScript to "talk to" the browser.

The Browser Object Model (BOM)

There are no official standards for the Browser Object Model (BOM).
Since modern browsers have implemented (almost) the same methods and properties for JavaScript interactivity, it is often referred to, as methods and properties of the BOM.

The Window Object

The window object is supported by all browsers. It represent the browser's window.
All global JavaScript objects, functions, and variables automatically become members of the window object.
Global variables are properties of the window object.
Global functions are methods of the window object.
Even the document object (of the HTML DOM) is a property of the window object:
window.document.getElementById("header");
is the same as:
document.getElementById("header");



Window Size

Three different properties can be used to determine the size of the browser window (the browser viewport, NOT including toolbars and scrollbars).
For Internet Explorer, Chrome, Firefox, Opera, and Safari:
  • window.innerHeight - the inner height of the browser window
  • window.innerWidth - the inner width of the browser window
For Internet Explorer 8, 7, 6, 5:
  • document.documentElement.clientHeight
  • document.documentElement.clientWidth
  • or
  • document.body.clientHeight
  • document.body.clientWidth
A practical JavaScript solution (covering all browsers):

Example

var w=window.innerWidth
|| document.documentElement.clientWidth
|| document.body.clientWidth;

var h=window.innerHeight
|| document.documentElement.clientHeight
|| document.body.clientHeight;

Try it Yourself »
The example displays the browser window's height and width: (NOT including toolbars/scrollbars)

Other Window Methods

Some other methods:

  • window.open() - open a new window
  • window.close() - close the current window
  • window.moveTo() -move the current window
  • window.resizeTo() -resize the current window

sábado, 6 de septiembre de 2014

el atributo data en JQUERY HTML5

http://api.jquery.com/data/
http://stackoverflow.com/questions/7261619/jquery-data-vs-attr

interesante

If you are passing data to a DOM element from the server, you should set the data on the element:
<a id="foo" data-foo="bar" href="#">foo!</a>
The data can then be accessed using .data() in jQuery:
console.log( $('#foo').data('foo') );
//outputs "bar"
However when you store data on a DOM node in jQuery using data, the variables are stored in on the nodeobject. This is to accommodate complex objects and references as storing the data on the node element as an attribute will only accommodate string values.
Continuing my example from above:
$('#foo').data('foo', 'baz');

console.log( $('#foo').attr('data-foo') );
//outputs "bar" as the attribute was never changed

console.log( $('#foo').data('foo') );
//outputs "baz" as the value has been updated on the object


http://stackoverflow.com/questions/12405874/kendo-ui-grid-display-grid-on-a-link-click

domingo, 31 de agosto de 2014

menu submenu snippe

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="es-es">
<head>
<script>
function mostrarSubmenu(submenu){
    //Referencia: http://www.forosdelweb.com/f13/menu-desplegable-verticalmente-761842/
    document.getElementById(submenu).style.display = 'block';
    document.getElementById(submenu).style.visibility = 'visible';
}
</script>
</head>
<body>
<ul>
    <li><a href="loquesea.html" title="Titulo">Menú 1</a></li>
    <li><a href="javascript:;" onclick="javascript:mostrarSubmenu('submenu1');" title="Titulo">Menú 2</a>
        <ul id="submenu1" style="display:none; visibility:hidden;">
             <li><a href="loquesea.html" title="Titulo">Submenú 1</a></li>
             <li><a href="loquesea.html" title="Titulo">Submenú 2</a></li>
        </ul>
    </li>
    <li><a href="javascript:;" onclick="javascript:mostrarSubmenu('submenu2');" title="Titulo">Menú 3</a>
        <ul id="submenu2" style="display:none; visibility:hidden;">
             <li><a href="loquesea.html" title="Titulo">Submenú 1</a></li>
             <li><a href="loquesea.html" title="Titulo">Submenú 2</a></li>
        </ul>
    </li>
    <li><a href="loquesea.html" title="Titulo">Menú 4</a></li>
</ul>
</body>
</html>

*************
http://www.stunicholls.com/menu/pro_dropdown_2.html#nogo1
http://cssmenumaker.com/blog/flat-dropdown-menu-tutorial
http://javascript-array.com/scripts/jquery_simple_drop_down_menu/#
http://javascript-array.com/scripts/multi_level_drop_down_menu/
http://www.davidrojas.net/demos/menu_desplegable.html
http://www.jose-aguilar.com/blog/menu-desplegable-simple-con-jquery/
http://www.alciro.org/cursos/html-05/estilos/tecnicascssalsa3horizdesplegable.html#

http://web.ontuts.com/tutoriales/creando-un-menu-desplegable-en-jquery/
http://www.ayudadeblogger.com/2013/07/menu-desplegable-para-blogger-nuevo-estilo-css3.html
************
http://www.davidrojas.net/index.php/category/jquery/

miércoles, 20 de agosto de 2014

jueves, 14 de agosto de 2014

domingo, 22 de junio de 2014

Javascript


http://gwydir.demon.co.uk/jo/javascript/numbers.htm

http://en.wikibooks.org/wiki/JavaScript/Variables_and_Types

https://developer.mozilla.org/es/docs/Gu%C3%ADa_JavaScript_1.5/Funciones_predefinidas/Funciones_parseInt_y_parseFloat

InnerHTML

http://www.youtube.com/watch?v=JTiNndhKyz0
http://www.youtube.com/watch?v=F-GXpTe1txU
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide
https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript