Jump to content

es131245

Members
  • Posts

    209
  • Joined

  • Last visited

Everything posted by es131245

  1. You really should take care of owner,group and permissions on server. Well organized access on server will not allow to create anything or rewrite scripts. Only very few functions need this kind of permissions (php write perms for online editors for php scripts, create files for archiving and uploading).
  2. foreach($array as $unit){ print( '<input type="text" value="' .$unit. '"/>' );}
  3. es131245

    PHP text & images

    Is it posible for php to return html page with text and GD pictures at once?
  4. I'm geting array of page urls from ul list. Then i'll have to check variables on those pages. Maybe send few other ajax requests. This should be done on JS. Ajax "success" isnt good idea becaue ajax functions are used from other libraries. So easiest solution is setTimeout.
  5. I'm trying add a delay for 2 second. Ajax doent load that fast.
  6. The same old story. $('li').each(function(){ setTimeout(function() { // ajaxCall(..... },2000);}); Is it posible at all? I dont what to heat up my room with at empty loop with Date=Date argument
  7. Yes, you can modify code for you exact situation. Or sometimes its easier to write your own.
  8. es131245

    iframe as a page

    I'm using it at the moment function page(url,link){$('html').append('<img src="/source/images/progress.gif" />'); $('img[src="/source/images/progress.gif"]').css({borderRadius:'15px',boxShadow:'0 0 15px blue',height:'48px',left:'50%',marginLeft:'-150px',marginTop:'-24px',opacity:0,position:'fixed',top:'50%',width:'300px'}); $('html').animate({scrollTop:$('body').offset().top},350); $('img[src="/source/images/progress.gif"]').fadeTo(500,1); $('body').fadeTo(500,.15,function() {$.ajax(((url.indexOf('?')==-1)?(url+'?ajax'):(url+'&ajax'))) .done(function(data) {var html=$('body').html().substr(0,$('body').html().indexOf('n </ul>')+8)+"n"+data+' <a>'+$('body>a:last-of-type').html()+'</a>'; $('body').empty().append(html);}) .fail(function() {var html=$('body').html().substr(0,$('body').html().indexOf('n </ul>')+8)+"n"+'<h2>Error 404</h2>n <h3>File not found</h3>'+"n"+' <a>'+$('body>a:last-of-type').html()+'</a>'; $('body').empty().append(html);}) .always(function() {tools(); links(link); $('body').fadeTo(300,1); $('img[src="/images/progress.gif"]').fadeTo(300,0,function() {$('img[src="/images/progress.gif"]').remove();}); $('body>ul:first-of-type>li:last-of-type>ul>li').stop().slideUp(200,function(){$('body>ul:first-of-type>li:last-of-type>ul').css({marginTop:'-10px'});});});});}function links(from){$('a').each(function() {if(typeof($(this).attr('href'))!='undefined'&&$(this).attr('href').substr(0,1)=='#') {$(this).unbind('click').click(function() {$('html,body').animate({scrollTop: $($(this).attr('href')).offset().top},'slow'); return false;});} else if(typeof($(this).attr('href'))!='undefined'&&$(this).attr('href').indexOf(':')==-1&&$(this).attr('href').indexOf('.')==-1) {$(this).unbind('click').click(function() {$(this).css({'textDecoration':'underline'}); page($(this).attr('href'),$(this)); return false;});}});}$(document).ready(function(){links();}); It has a problem. Then I serfing site the content if fine but url path does not change at all.
  9. What does this do? ALL = (data.d).toString(); Maybe you can tey with something simple. Like alert(data);
  10. es131245

    iframe as a page

    The only solution that i could think of. <!DOCTYPE html><html lang="en"> <head> // HEADINGS </head> <body> // HEADER // NAVIGATION <div></div> <iframe src="pages.html" style="display:none;" onload="copyContentFromIframeToDiv();"></iframe> // FOOTER </body></html>
  11. Try this $("p#t1").css({"color","#ffffff"});
  12. es131245

    iframe as a page

    The idea is to load "full" page only once. As a full page I meen title bar, navigation, content and footer. After loading jquery will update links to adding get parameter that will tell php to load "content" only. <?php if(isset($_GET)&&isset($_GET['ajax']))getContent('pages.html');?><!DOCTYPE html><html lang="en"> <head> // HEADINGS </head> <body> // HEADER // NAVIGATION <iframe src="pages.html"></iframe> // FOOTER </body></html> The question is how to evade scrollbar of a iframe? Scrollbar of a body is the only allowed.
  13. Slideshow are made on JS and Jquery. I think all data is in Jquery module.
  14. JS can focus other element, but not CSS.
  15. First of all, i dont know anything about flash =( W3schools dont teach flash and I'm loyal to w3s. There is a flash game in internet. The game is good but its contols are terrible. It makes person to click rows of objects thousands of times. Is there a way in flash like "GreasyMonkey" for JS using which i can modify controls without editing the game swf file? I got an idea to do a highligthing to controls.
  16. JS load throught HTTP server which can handle much more that 2 users. That exacly do you want? Limit access or a load page?
  17. Or php can print mtime while page loads. Can't check exact file size (if changed) and base64 doent seem to too.
  18. Yes it is. Images are updated by shell script on a separate machine! There aren't any timers here. All i can do is to get mtime by php then page loads for synchronization. But i don't care much about synchronization. All i want is a part of javascript/jquery code that checks if there is an newer image at all (if there is a point of loading large image at all). Script might be turned off and i need to check that. On web cam example. Javascript should check if camera works for saving watcher from loading the same image tons of times.
  19. I alway do such stuff with jquery next() parent() previous() and remove() empty() functions
  20. I'm getting corrupted images in that situation, but i dont have solution for that so i going to leave it as it is. The situation is that script doent work all the time. So I just need to let js in browser know when its useless to update picture every 3 seconds. How could timer help here? There are no time dependance here.
  21. You will need any language to do this. It could be any of php, asp, cgi.
  22. I'm editing my web pages using php. All you need is read/write permissions to editable files for web server user and editor script.
  23. Server runs shell script that updates image on the site every 3 seconds. Its makes "framed image" for the site. Browser part is: setInterval(function(){$('#picID').attr('src','/images/URL.jpg?'+new Date().getTime());},3000); It works fine but update script doent work all the time. So i want to find a way for javascript to check if image on the site differ from downloaded one. Is it posible to check if it differ without downloading whole image? Like check if file size have changed? Moreover is there a "better" method of forcing image to download instead of "+new Date().getTime()"?
  24. <!DOCTYPE html><html><body><input type="text" id="first" value="0" /><input type="text" id="second" value="2" /><input type="button" onclick="check()" /><script>function check(){if( parseInt(document.getElementById('first').value) > parseInt(document.getElementById('second').value) ) alert('1>2');else alert('2>1');}</script></body></html>
  25. Part of other code :Happy: // corrected
×
×
  • Create New...