cvs: presentations / hackday06.xml /slides/intro ajax_upload2.xml
| From: | Rasmus Lerdorf | Date: | Fri, 29 Sep 2006 21:44:56 +0000 |
| Subject: | cvs: presentations / hackday06.xml /slides/intro ajax_upload2.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1345@lists.php.net to get a copy of this message | ||
rasmus Fri Sep 29 21:44:56 2006 UTC
Added files:
/presentations hackday06.xml
Modified files:
/presentations/slides/intro ajax_upload2.xml
Log:
Y! Hack Day slides
http://cvs.php.net/viewvc.cgi/presentations/slides/intro/ajax_upload2.xml?r1=1.2&r2=1.3&diff_format=u
Index: presentations/slides/intro/ajax_upload2.xml
diff -u presentations/slides/intro/ajax_upload2.xml:1.2
presentations/slides/intro/ajax_upload2.xml:1.3
--- presentations/slides/intro/ajax_upload2.xml:1.2 Thu Sep 14 06:17:28 2006
+++ presentations/slides/intro/ajax_upload2.xml Fri Sep 29 21:44:56 2006
@@ -10,7 +10,8 @@
<script type="text/javascript" src="/yui/connection.js"></script>
<script type="text/javascript">
var fN = function callBack(o) {
-
document.getElementById('result').innerHTML='<pre>'+o.responseText+'</pre>';
+ var result = document.getElementById('result');
+ result.innerHTML='<pre>'+o.responseText+'</pre>';
}
var callback = { success:fN, upload:fN }
function postForm(target,formName,up) {
@@ -21,7 +22,8 @@
</head>
<body>
<form enctype="multipart/form-data" id="upload_form" action=""
- onsubmit="postForm('/up.php','upload_form',1); return false;"
method="POST">
+ onsubmit="postForm('/up.php','upload_form',1); return false;"
+ method="POST">
<input type="hidden" name="APC_UPLOAD_PROGRESS"
id="progress_key"
value="<?php echo uniqid()?>"/>
<input type="file" name="file1"/><br/>
@@ -50,38 +52,38 @@
}
?>]]></example>
-<example hide="0" result="0" title="Client-side"
fontsize="1.2em"><![CDATA[<script>
+<example hide="0" result="0" title="Client-side"
fontsize="1.2em" width="94%"><![CDATA[<script>
var fP = function callBack(o) {
- var resp = eval('(' + o.responseText + ')');
- if(!resp['done']) {
- if(resp['total']) {
- var pct = parseInt(100*(resp['current']/resp['total']));
- document.getElementById('pbar').style.width = ''+pct+'%';
- document.getElementById('ppct').innerHTML = " "+pct+"%";
- document.getElementById('ptxt').innerHTML = resp['current']+" of
"+resp['total']+" bytes";
- }
- setTimeout("update_progress()",500);
- } else if(resp['cancel_upload']) {
- txt="Cancelled after "+resp['current']+" bytes!";
- document.getElementById('ptxt').innerHTML = txt;
- setTimeout("progress_win.hide();window.location.reload(true);",2000);
+ var resp = eval('(' + o.responseText + ')');
+ if(!resp['done']) {
+ if(resp['total']) {
+ var pct = parseInt(100*(resp['current']/resp['total']));
+ document.getElementById('pbar').style.width = ''+pct+'%';
+ document.getElementById('ppct').innerHTML = " "+pct+"%";
+ document.getElementById('ptxt').innerHTML = resp['current']+" of
"+resp['total']+" bytes";
}
+ setTimeout("update_progress()",500);
+ } else if(resp['cancel_upload']) {
+ txt="Cancelled after "+resp['current']+" bytes!";
+ document.getElementById('ptxt').innerHTML = txt;
+ setTimeout("progress_win.hide();window.location.reload(true);",2000);
+ }
}
var pcallback = { success:fP }
function update_progress() {
- progress_key = document.getElementById('progress_key').value;
- YAHOO.util.Connect.asyncRequest('GET','up.php?progress_key='+progress_key,
pcallback);
+ progress_key = document.getElementById('progress_key').value;
+ YAHOO.util.Connect.asyncRequest('GET','up.php?progress_key='+progress_key,
pcallback);
}
var progress_win;
function postForm(target,formName) {
- YAHOO.util.Connect.setForm(formName,true);
- YAHOO.util.Connect.asyncRequest('POST',target,callback);
- progress_win = new YAHOO.widget.Panel(...);
- update_progress();
+ YAHOO.util.Connect.setForm(formName,true);
+ YAHOO.util.Connect.asyncRequest('POST',target,callback);
+ progress_win = new YAHOO.widget.Panel(...);
+ update_progress();
}
</script>
<div id="progress_win">
http://cvs.php.net/viewvc.cgi/presentations/hackday06.xml?view=markup&rev=1.1
Index: presentations/hackday06.xml
+++ presentations/hackday06.xml
<presentation
template="php2"
navmode="html"
titlecolor="#1111aa"
navbarbackground="url(images/trans-ffffff.png)"
logo1="images/php-med-trans-light.gif"
titlesize="2em"
navbarheight="4.1em"
>
<topic>PHP</topic>
<title>Getting Rich with PHP 5</title>
<event>Yahoo! Hack Day</event>
<location>Sunnyvale</location>
<date>September 29, 2006</date>
<url>http://talks.php.net/show/hackday06</url>
<speaker>Rasmus Lerdorf</speaker>
<email>rasmus@php.net</email>
<slide>slides/intro/titlepage.xml</slide>
<slide>slides/intro/rich.xml</slide>
<slide>slides/intro/rich2.xml</slide>
<slide>slides/bm06/profit.xml</slide>
<slide>slides/bm06/initial.xml</slide>
<slide>slides/bm06/pg.xml</slide>
<slide>slides/bm06/pg_persist.xml</slide>
<slide>slides/bm06/mysql.xml</slide>
<slide>slides/bm06/apc.xml</slide>
<slide>slides/bm06/apc2.xml</slide>
<slide>slides/intro/php5.xml</slide>
<slide>slides/intro/xml_eg.xml</slide>
<slide>slides/intro/rss_flickr.xml</slide>
<slide>slides/intro/ws1.xml</slide>
<slide>slides/intro/ws2.xml</slide>
<slide>slides/intro/ws6.xml</slide>
<slide>slides/intro/geoflickr.xml</slide>
<slide>slides/intro/ws7.xml</slide>
<slide>slides/intro/ajax_upload1.xml</slide>
<slide>slides/intro/ajax_upload2.xml</slide>
<slide>slides/intro/yui.xml</slide>
<slide>slides/intro/web2_ref.xml</slide>
</presentation>