Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-02-2006, 06:02 AM   PM User | #1
DELOCH
Regular Coder

 
DELOCH's Avatar
 
Join Date: Apr 2006
Location: Canada
Posts: 537
Thanks: 4
Thanked 2 Times in 2 Posts
DELOCH is an unknown quantity at this point
Smile Detect Please

okay, i decided to make myself a website for a tiny company which i will then make official when i hit 16...

it would all be okay but i desire to do this with JavaScript in a table

Hello + IP +, Your last visit was on + lastVisit

on the next line i want it to say

Begin Wish

You have came from + lastWebsite + and you are using + navigator.appName + navigator.appVersion

End Wish

can someone help me code it? i have NO idea how to get the last webpage nor the ip adress, or the last visit

thanks
DELOCH is offline   Reply With Quote
Old 05-02-2006, 06:31 AM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
You should deffinitely use a server-side application (php, asp....) not Javascript.
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Old 05-02-2006, 06:42 AM   PM User | #3
boxxer03
Regular Coder

 
Join Date: Sep 2005
Location: Chicago, IL
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
boxxer03 is an unknown quantity at this point
You can't get IP addresses with Javascript and the only way to check when they last visited would be with a cookie (if you were to use Javascript) and they can easily be cleared. But if you wanted to do the rest of the code you could just do this:

Code:
document.write("You have came from "+document.referrer+" and you are using "+navigator.appName+" "+navigator.appVersion)
__________________
I'm only telling you how I would do it, not how its supposed to be done. ;)
boxxer03 is offline   Reply With Quote
Old 05-02-2006, 07:03 AM   PM User | #4
boxxer03
Regular Coder

 
Join Date: Sep 2005
Location: Chicago, IL
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
boxxer03 is an unknown quantity at this point
oh yeah, forgot to tell ya that if you get a direct hit (meaning the visitor types the url directly into the window themselevs) then it will be blank space from where they came from. so you prolly better off with something like this:

Code:
var referred_from=(document.referrer=="")?referred_from="a new window":referred_from=document.referrer;
document.write("You have came from "+referred_from+" and you are using "+navigator.appName+" "+navigator.appVersion);
the first one that says "a new window" is what will show up if they are a direct hit.
__________________
I'm only telling you how I would do it, not how its supposed to be done. ;)
boxxer03 is offline   Reply With Quote
Old 05-02-2006, 09:55 PM   PM User | #5
DELOCH
Regular Coder

 
DELOCH's Avatar
 
Join Date: Apr 2006
Location: Canada
Posts: 537
Thanks: 4
Thanked 2 Times in 2 Posts
DELOCH is an unknown quantity at this point
i would but i have a MASSIVE problem installing php, it IS SOO CONFUSING

can someone give me a link to a good guide because the best guide they gave me is the one in high detail called: Installing APache+Php5+MySQL but it had a big problem since i installed Apache, i tried PHP but when i downloaded the files, the dll files were NOT there... plus i did not install anything since it did not tell me to

i would happily do it because PHP can do everything JS can but better... but since i can't i well...can't...
DELOCH is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:43 PM.


Advertisement
Log in to turn off these ads.