JavaScript - Display Time Since Last Visit To Webpage
Hi! First post here!
Would really appreciate some help on a javascript that would display the time elapsed since a particular visitor last visited my webpage, using cookies. So basically it should show something like: "You last visited my page 2 days & 12 mins ago!" I've a little background in java but none in javascript... Thanks so much! Similar TutorialsI was trying to display time of last visit along with login name.. can someone help me on this pls? Hi everyone. New to javascript here.... I have a problem here. I know how to store a cookie and check a cookie... but i don't know how to calculate the time between current visit and previous visit... Example. I logged in @ 1pm and logged in again @ 3pm... It should a msg like "your last visit was 2 hours ago" Can any one enlighten me ? Thank you! Hi Guys, I'm embarking on a new project - although I've hit a wall. I require a page to refresh at a scheduled date and time, several times a day. For example, I would like the web page to reload the index at 3:15PM So if anyone has the web page open during that time, it will automatically refresh for them. Timing is quite important so I would need the script to use the server (hosts) time and not the end users time. I am currently deciding on which server language to use, although Javascript is probably a suitable option? or would ajax be more the thing for this? The webpage must execute the refresh at the time 3:15pm, so no matter when someone visits the page, even if its hours before, it must refresh at that time. If anyone has any pointers on the best way to achieve this and what language to start with I am forever greatful I do a lot of image design work and although I have worked with a few coders in the past but I haven't gone too much into coding myself, but its something I'm going to take time to learn and get involved in, so I'm not looking for script hand outs here, mainly just a nudge in the right direction. Thank you guys!! I maintain a website for a small local restaurant. I do this with FrontPage so I know very little coding. I have an upload manager so the owner can remotely upload a txt or doc file of daily specials to a folder on the server. I would like to put a java script into one of the web pages that would open and display this file on page load. Is that possible and can someone help with the code, Thanks I have the ability to remotely upload a text file to a folder on my web server. Periodically during the day I update that file and re-upload it which overwrites the previous file. I am looking for a script to insert in a webpage that will "get" and display the current version of that file on page load. Thanks in advance. Bit of a noob when it comes to js. Hope someone can help me out. I am trying to place text output from a url on another webpage. The output is the status of an alarm system. The URL is: Code: https://www.eye-zon.com/EZMOBILE/index.php?mid=<hash>&action=ssi&did=<mac> hash and mac info remove for security reasons. The URL leads to a webpage that outputs: Code: <update>2011-08-18 21:21:10</update><status> Stay Armed </status><trouble>NO</trouble> I would like to place these three outputs on another page. Any ideas? Hi. Can someone tell me if it is possible to display the duration a webpage is accesssed. For example, if its a form webpage, then the time to be displayed will be = time the webpage was left (press submit button etc. or the time the viewer left the page) - time the webpage was first accessed or loaded. If it is possible with javascript, what are the methods, attributes etc that need to be used. Pretty simple, I just want to display a <div> after say 20 seconds or any predefined value. Ideally with jQuery
hi all, im looking for a script that does the following when the page loads "text1" is displayed. then on the next line 2 seconds later "text2" is displayed and test1 is still displayed. and i need this to go to 5 lines so the final project should look like --- text1 text2 text3 text4 text5 thanks Hi, I want to display my listings like they do he http://www.ticketnetwork.com/performers/concerts/a.aspx The code on my end calling the third party service looks like this: <script language="javascript" type="text/javascript"> document.write('<script language="javascript" src="http://###########.com/?bid='+####+'&sitenumber='+#+'&tid=event_names&pcatid=2&showcats=true&title=Concerts Tickets"></' + 'script>'); </script> How do I make it only display one letter at a time? I believe some variation on the sort method might work... How can I draw a cookie where number of chocolate chips represents the number of seconds and the number of bites represents the number of minutes. I want to show the passage of time on a clock that looks like items are being added to the display according to the number of seconds and minutes. Maybe using a mouse input aswell! Please guide.:confused: I use the Processing Software Hey guys. So I've been learning PHP and MySQLi for the past few weeks and it's going brilliantly! I intend to start learning JS over the Xmas holidays, but right now I only have a very basic knowledge of it. I was just wondering if someone could point me in the right direction on how to do this, as I think i should be pretty easy. After someone changes something in the admin area [e.g. the position of an item] I want to be able to have a small div display at the top of the screen saying something like "Position Updated!" and then have it fade away after 2-3 seconds. Just wondering if there's a fairly easy way to do this, or would I have to go get something like MooTools, etc.? Thanks a lot! I have this code which converts Fahrenheit to Celsius. Now, I have to have a counter that displays the amount of times I have made a conversion. I have no clue how to do this. This is the initial code:
Code: <html> <head> <script type="text/javascript"> /* Converts given centigrade in one text box to farenheit in another */ function convert1 () { document.getElementById("output").value = document.getElementById("input").value*1.8+32; } </script> </head> <body> <p>Then enter the input and view the output</p> <input type="text" size="15" id="input"> <input type="button" value=" ==> " onclick="convert1()"> <input type="text" size="15" id="output"> </body> </html> I don't know how to approach this so I tried different things.... Code: tml> <head> <script type="text/javascript"> /* Converts given centigrade in one text box to farenheit in another */ function convert1 () { document.getElementById("output").value = document.getElementById("input").value*1.8+32; } function counter() { if (function convert1().onclick==true) {count++;} } </script> </head> <body> <p>Then enter the input and view the output</p> <input type="text" size="15" id="input"> <input type="button" value=" ==> " onclick="convert1()"> <input type="text" size="15" id="output"> </body> </html> but then I did some research and it said I couldn't do that.... so I tried this: Code: <html> <head> <script type="text/javascript"> /* Converts given centigrade in one text box to farenheit in another */ var count=0; function documentClick() { document.getElementById('clicked').value = ++clickCount } document.onclick = documentClick; function convert1 () { document.getElementById("output").value = document.getElementById("input").value*1.8+32; } </script> </head> <body> <p>Then enter the input and view the output</p> <input type="text" size="15" id="input"> <input type="button" value=" ==> " onclick="convert1()"> <input type="text" size="15" id="output"> </body> </html> I think this last code is correct, the problem I have now is that I don't know how to call it to just display as text under the buttons and conversions. I'm looking for some way to display it like ("you have made"+ count+ "conversions");. No boxes or buttons, just text and I don't know how to call for this after the </script>, inside the body. I am new at all this and would appreciate any help. Thanks. It should look like this. When the site loads up, invite the user to enter their name and then display a message at the top of the document which will say< good morning, evening, or afternoon >, based on the time they access your site, welcome to <insert the name of your site> This is the question how do i do it?? My question is twofold. First, is there a way to have a javascript file display an externally hosted image when opened with a browser? I mean such a way where the URL of the javascript file can be referenced by an html document and display an image? Furthermore, is there a way to have this be a different image depending on the time of day and timezone of the user, specifically one image in the morning and a different image in the evening? I apologize if I posted this in the wrong section, but I wasn't sure where else this could go. Hello I am trying to do something similar to this post http://www.codingforums.com/showthread.php?t=168903 except I need it to be dependent on the hour and minute. Background: I am trying to create a schedule website, the schedule has say 20 items and I want it to display the current "active" event in the schedule, 1 previous event and 3 future events so a total of 5 items from the schedule. An event can range from 30 minutes to 2 hours long, so simply using the above code will not work. It needs to take the minutes into consideration as well. Let me know if you have additional questions. EDIT: 17-Mar-12 @ 12:37PM I would rather not use a bunch of if statements. (http://www.codingforums.com/showthread.php?t=250358) The schedule could change mid day so having to go through and edit a bunch of if statements would not be ideal Hi, I want to when I open a web page , my program detect all the "digit numbers" and display all of them for me. I don't know exactly what do I do? Thanks. Regards. I have a site using Grey Box pop up ( http://therdkgroup.com/) . It automatically pops up when you go to any of the 5 pages on the site. Is it possible to add a cookie to it so that it only pop up the first time someone comes to any one of the pages? If so, can you point me in the right direction on how to solve this?? Hello all; I am doing a site for a local business that uses radio advertising and has a jingle that they want to play once per visit only (so it does not play over again of they return to the same page later that day). I have tried to use yahoo player, Google player and the infamous wma player and all work well. I especially like the yahoo player but as will all the players I could not find a way to have it only play once per day per visitor. Is there a way to accomplish this? I was thinking using a tracking cookie but have no idea how to implement it. In the end I would like to accomplish the following: mp3 plays automatically on page load audio only playes once per day per visitor hava small player so if the visitorr wants to hear the jingle again they can do so. the player should be compact and cross browser compatible. Should be compatible with HTML 5.0 Transitional or at the very least 4.01 Any help would be appreciated. |