JesseToxik Posted March 29, 2013 Share Posted March 29, 2013 (edited) Hey everyone, This is probably an odd request/question. I was recently searching for a website that offers a free SMS bomber so I could spam my girlfriends phone for a few hours.I found one(didn't work) and on their page they have an interesting feature. The webpage is http://www.clamtxt.com/ In the top left there is a message that says "Page Load: Complete" or "Page Load: Loading" depending on if the page is fully loaded or not. Can this be done by PHP? I know they are not doing this via javascript(as far as I can honestly tell) since when I inspect the element(chrome) it shows up as plain HTML <div class="black btn" style="color:gray" align="center">Page load status: <b id="statusc"><font color=green>Complete</font></b></div> Thanks for any replies. Also I'm a bit tired so I may have missed some javascript that changes the innerHTML of the element. I will look at the code again but any replies are thanked. EDIT ::: Upon further inspection(inspecting the element and clicking links) it appears that when it changes from "Complete" to "Loading" the html changes as well. Javascript cannot change source code so this has to be a server side code. Edited March 29, 2013 by JesseToxik Quote Link to comment https://forums.phpfreaks.com/topic/276284-php-page-load-message/ Share on other sites More sharing options...
trq Posted March 29, 2013 Share Posted March 29, 2013 Javascript cannot change source code so this has to be a server side code.You have that backward. Server side processing cannot change what has already been sent to the browser. JavaScript on the other hand is very commonly used to manipulate the DOM. Quote Link to comment https://forums.phpfreaks.com/topic/276284-php-page-load-message/#findComment-1421764 Share on other sites More sharing options...
JesseToxik Posted March 29, 2013 Author Share Posted March 29, 2013 Manipulate yes but anything dynamically created by javascript wouldn't show in source code from what I have seen. I.E: If I used a js code to fill a div with 200 words for filler text, if I viewed the source code I wouldnt see the words inside the div I would only see a div with an id and a javascript code targeting that divs id to fill the text. Quote Link to comment https://forums.phpfreaks.com/topic/276284-php-page-load-message/#findComment-1421771 Share on other sites More sharing options...
PaulRyan Posted March 29, 2013 Share Posted March 29, 2013 The element is preset with the value of "complete". Quote Link to comment https://forums.phpfreaks.com/topic/276284-php-page-load-message/#findComment-1421773 Share on other sites More sharing options...
JesseToxik Posted March 29, 2013 Author Share Posted March 29, 2013 but when you click a link it changes to loading(in red). Quote Link to comment https://forums.phpfreaks.com/topic/276284-php-page-load-message/#findComment-1421870 Share on other sites More sharing options...
PaulRyan Posted March 29, 2013 Share Posted March 29, 2013 (edited) That is because JavaScript is used to change the value to loading when a function is triggered, probably by a button being clicked/pressed. This is the flow: Page loads [Element PRESET to "complete"] Button Click [Element set to "loading"] Content loads [Element set back to "complete"] Not that hard to follow right? Edited March 29, 2013 by PaulRyan Quote Link to comment https://forums.phpfreaks.com/topic/276284-php-page-load-message/#findComment-1421871 Share on other sites More sharing options...
RobertP Posted March 29, 2013 Share Posted March 29, 2013 (edited) Well my browser of choice is chrome, and there is a difference between 'inspect element' and 'view source'. Inspect element will in fact show the modified DOM (html structure), and the view source is the raw response from the web server. Edited March 29, 2013 by RobertP Quote Link to comment https://forums.phpfreaks.com/topic/276284-php-page-load-message/#findComment-1421876 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.