Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. well... your bestbet... would be to grab all the files into an array using glob() and then filtering them down from there...
  2. personally... i see no uses for server sided OOP... in client sided i can see all kinds of uses... autoformatting, timers, spawners(games), etc... but on client side, your always running top to bottom(no timers) and all formatting can be done by flatfile functions...
  3. youd want to use ajax :-) javascript powering a php page...
  4. nope... its still shifting slightly to the right when expanded...
  5. you'd need to use this http://ca3.php.net/function.move-uploaded-file to move the file to a valid location, else it stays in your temp folders and gets deleted...
  6. well ya... twas just a snippit of code...
  7. fair enough... and there was a typo "http://www.divinedesigns.ca/test.php" <table style="border:1px solid #655872;width:100%;"> <tr class=title> <td align=center style="width:30px;" class=title><a href="javascript:hidecell('asdfdasfsdfa','index[emails]');" id="asdfdasfsdfa" class=titlebutton>+</a></td> <td style="padding-left:20px;" class=title><a href="javascript:hidecell('asdfdasfsdfa','index[calendar]');" class=title>New Emails</a></td> </tr> <tr> <td> <span style="display:none;width:100%;" id="asdfdasfsdfa-cb"> <table style="width:100%;"> <tr> <td style="padding-left:30px;white-space:nowrap;"><a href="mail.html?op=view&id=">test</a></td> </tr> </table> </span> </td> </tr> </table> <script> var ie4=false; if(document.all) ie4=true; function getObject(id){ if(ie4) return document.all[id]; else return document.getElementById(id); } function hidecell(key,cookie){ var ele=getObject(key); var el=getObject(key+"-cb"); if(el.style.display=='none'){ setcookie(cookie,"shown"); ele.innerHTML='-'; el.style.display='block'; }else{ setcookie(cookie,"hidden"); ele.innerHTML='+'; el.style.display='none'; } } function setcookie(name, value, expires, path, domain, secure){ document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } </script> <style> table{ border-collapse:collapse; border-spacing:0; border:0; } tr{ vertical-align:top; } td{ font-size:11px; font-family:trebuchet MS; font-weight:500; color:#655872; padding:0; } td.title{ height:40px; background:url(images/titlefade.jpg) repeat-x #a183bd; color:#ffffee; font-size:20px; padding-left:5px; padding-right:5px; } tr.title{ vertical-align:middle; } a.title{ color:#ffffee; } a.titlebutton{ border:1px solid #655872; background:#a183bd; color:#655872; text-align:center; width:20px; display:block; } a.titlebutton:hover{ color:#ffffee; } </style>
  8. because the address bar itself cannot have newline characters it is stripping them out... one vital flaw with GET... if you were to send via post, you probably wouldnt have this issue...
  9. not sure if this is a css problem... or a js problem... and it is minor... on http://www.divindesigns.ca/test.php when you press the +/- it moves the title and +/- over a little bit... any idea why that is?
  10. ohya! i dont get any javascript errors... but when i alert(this.innerHTML); it says its undefined... and the -/+ wont switch...
  11. anyone know why this wont work? (variables come from php) $rk is the identifying key, and $r[id] is an identifying id, $cb is tells us if its hidden or not... <a href="javascript:hidecell('.$rk.','.$r[id].');" style="font-size:20px;font-weight:700;">'.$cp.'</a> <td colspan=2 style="display:'.$cb.';" id="'.$rk.'">test</td> <script> function hidecell(key,id){ var el=getObject(key); if(el.style.display=='none'){ setcookie("forumcategories["+id+"]","shown"); this.innerHTML='-'; el.style.display='block'; }else{ setcookie("forumcategories["+id+"]","hidden"); this.innerHTML='+'; el.style.display='none'; } } </script>
  12. other way would be to target="_new" and then resize() it on the popup... useful in some cases... not all :-)
  13. hate to be a stick in the mud... but... if your looping to output a javascript function... when it repeats...(the second+ time) it'll probably crash on most browsers... fix... make your javascript popups inline should fix your problems...
  14. never mind... after a long and complicated process... i got it working :-)
  15. do-whiles - in my book - are VERY VERY BAD... they are very easy to infinite loop and theres really no need... this should work FAR easier, and faster... <script> var blah=''; while(blah==''){ var blah=prompt('please enter your name'); } </script>
  16. anybody? first time the timer loops it works(prints "1" to the page) but no other time it will... keep getting "invalid argument"
  17. i made this for a select/check box... but i think it'd work the same here... function uncheck(el){ el=getObject(el); if (el.checked==true) el.checked=false; } then... you can... <input type=checkbox name="" id="234" onchange="uncheck('radio')"> ... or whatnot...
  18. inline commands are really only any real use for single functions/operations... and nothing complex... you really do want to use a non inline function for this...
  19. somin like this should do... <script> function toggle(){ var trigger=getObject('trigger'); if(trigger.innerHTML==Show){ trigger.innerHTML='Hide'; getObject('tohide').style.visibility=block; }else{ trigger.innerHTML='Show'; getObject('tohide').style.visibility=hidden; } } </script> <a href="javascript:toggle();" id=trigger>Show</a> <div id=tohide style="visibility:hidden;"></div> not tested... but i think she'll work
  20. then just <a href="javascript:formconfirm('yourmessagehere');"></a>
  21. somin like this'd work for the basis... function formconfirm(message) { var conf=confirm(message); if(conf) document.form.submit(); }
  22. ok... getting there... <script> var counters=new Array(); function spankind(){ var x=document.getElementsByTagName("span"); for(var i=0; i<x.length; i++){ var kind=x[i].getAttribute("kind"); if(!kind) continue; switch(kind){ case "counter": counters[i]=setInterval(counter(x[i]),1000); break; } } } function counter(el){ var val=el.innerHTML; if(isNaN(val)) val=0; val++; el.innerHTML=val; } function init(){ spankind(); } window.onload=init; </script> <span kind=counter></span> sofar... it counts to 1... and not beyond :-( i'm getting "invalid argument"... line 11 char 5
  23. ok thanks!... changed to "counters=setInterval("counter("+x+")",1000); " however... now getting "object undefined"
  24. ajax is javascript running a php file... http://www.phpfreaks.com/forums/index.php/topic,115581.0.html theres really no other viable way of doing it...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.