Tuesday, January 26, 2010

Scripts Java & jQuery

Timers
====================



setInterval("reloj()",1000);

function reloj() {

var fObj = new Date() ;
var horas = fObj.getHours() ;
var minutos = fObj.getMinutes() ;
var segundos = fObj.getSeconds() ;

if (horas <= 9) horas = "0" + horas; if (minutos <= 9) minutos = "0" + minutos; if (segundos <= 9) segundos = "0" + segundos; window.status = horas+":"+minutos+":"+segundos; } setTimeout("document.location.href='http://www.google.es';",5000); //5seg. setInterval("reloj()",1000); setTimeout("clearInterval("+id+")",15000); setTimeout("clearInterval('reloj')",15000); Work with IFrame ============= < id="'iFrame'" onload="'onIFrameLoad();'">
$("iFrame").src = "sumGet.phtml?figure1=5&figure2=1";

function onIFrameLoad()
{
var serverResponse = extractIFrameBody($("iFrame")).innerHTML;
$("response").innerHTML = serverResponse;
}


var iFrameBody = extractIFrameBody($("iFrame"));
iFrameBody.innerHTML =
"<form action="'sumPostForm.phtml'" method="'POST'">" +
"<input name="'figure1'" value="'5'" type="'text'">" +
"<input name="'figure2'" value="'2'" type="'text'">" +
"</form>";



var form = iFrameBody.firstChild;
form.submit();

var iFrameBody = document.getElementById("iFrame").contentWindow.document.body;
iFrameBody.innerHTML = "whatever html code you want";
#iFrame {
display : none;
visibility : hidden;
height : 1px;
}

reset all styles margin & padding
* {
margin: 0;
padding: 0;
}



* { margin:0; padding:0; }
body {
line-height: 1;
color: black;
background: white;
}
p { margin:5px 0 10px 0; }
}
body {
line-height: 1;
color: #996633
background:#ccc url(your-tiled-image.gif) repeat-x top left;
}


referencias:
http://ideamill.synaptrixgroup.com/?p=6
http://www.dyn-web.com/tutorials/iframes/
http://stackoverflow.com/questions/997986/write-elements-into-a-child-iframe-using-javascript-or-jquery

Upload
http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=280
http://www.codeweblog.com/upload-file-false-ajax/
http://css.dzone.com/news/upload-files-like-gmail-client

No comments:

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com