Results 1 to 10 of 16
-
22nd Sep 2010, 02:56 PM #1OPMemberWebsite's:
maxneeds.infophp Pause/Wait until ..
As i don't like to explain a lot i just give example first...
PHP Code:<iframe src=http://yahoo.com/></iframe>
<?php
file_get_contents('something.txt');
?>
How can i pause file_get_contents until the iframe load ?
Alternative (worse) solution is 'executing' the iframe 5 sec before file_get_contents.
sleep() function pauses all the pagePorsche_maniak Reviewed by Porsche_maniak on . php Pause/Wait until .. As i don't like to explain a lot i just give example first... <iframe src=http://yahoo.com/></iframe> <?php file_get_contents('something.txt'); ?> The questions is: Rating: 5
-
22nd Sep 2010, 03:31 PM #2Respected Developer
Sleep() in a language like PHP is generally a bad idea. What you need here is client <=> server communication. Thus, you'll need to implement this in JavaScript trough AJAX. IE call a PHP script from JavaScript once the iframe is loaded. I'm sure Google can assist you with the rest of it.
-
22nd Sep 2010, 03:35 PM #3You can call me G
^ that is awesome! Hyperz stole my words!
My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz
-
22nd Sep 2010, 05:06 PM #4OPMemberWebsite's:
maxneeds.infoTnx ..
With jquiry done simply
-
22nd Sep 2010, 05:47 PM #5MemberWebsite's:
litewarez.net litewarez.com triniwarez.comYou can do it, dont wast your time tying.
You can mix PHP with Client Side.
What you need to do is like so:
Code:<iframe id="iframeID" src="http://google.com"></iframe> <div id="some_content"></div> <script> $('#iframeID').bind('load',function(){ //Do an ajax call $.get('data.php',function(data){ $('#some_content').html(data); }); }) </script>
Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
-
23rd Sep 2010, 01:10 PM #6OPMemberWebsite's:
maxneeds.infoTnx litewarez ..
btw can you tell me where's the problem of this jquery :
Code:$("#img").each(function(){ $('#img').ready(function () { $('#img').css('margin-left','auto'); $('#img').css('margin-right','auto'); $(window).load(function () { $('#img').toggle("slow");}); }); });
-
23rd Sep 2010, 01:45 PM #7Banned
^First of all u need to know that multiple elements cant have the same ID
-
23rd Sep 2010, 01:52 PM #8OPMemberWebsite's:
maxneeds.info@Ornlu they can if you use php foreach function ... <img id=img src='.$valuefromforeach.'>
-
23rd Sep 2010, 02:30 PM #9Banned
eh??
Why do u confuse JavascriptJust Remove IDs and add CLASSes.
Or Instead use a selector like. $('div#parent img')
-
23rd Sep 2010, 02:53 PM #10OPMemberWebsite's:
maxneeds.infoOrnlu tnx 1000x
just forgot about the class
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Legend (Wait for it...)
By The Legend in forum IntroductionsReplies: 6Last Post: 30th Jun 2012, 06:15 PM -
1, 2, 3,...wait! WTF?
By upnorth in forum General DiscussionReplies: 3Last Post: 12th Jan 2011, 08:42 PM -
Oh, got to wait for 2 days :(
By mightyb in forum IntroductionsReplies: 2Last Post: 28th Jan 2010, 11:46 PM -
How to Pause MSDN downloads
By sairam123 in forum General DiscussionReplies: 6Last Post: 6th Jan 2010, 12:59 PM -
How much time i have to wait
By waqararif in forum General DiscussionReplies: 6Last Post: 21st Aug 2009, 12:15 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...