JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 5th, 2006, 02:28 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 473 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 19 m 14 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
Exclamation Document.referrer in IE

what could i use instead because in NN document.referrer works, in IE it doesnt, it returns UNDEFINED, can someone help me??

colton22

Reply With Quote
  #2  
Old July 9th, 2006, 07:33 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 549 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 7 h 3 m
Reputation Power: 4
referer

Referer can not be relied on. Some browsers, like Opera, let the user choose whether or not to send referer headers. And I guess some browsers just don't send them. Maybe you have your IE settings to "no referer header"? Or maybe you are accessing the page directly? If you make a page linking to the referer script page, does it work in IE then?

Reply With Quote
  #3  
Old July 10th, 2006, 12:43 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 473 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 19 m 14 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
every time i try to access and save the document.referrer above into a variable, every time it comes up undefined in an alert therefore telling me that anywhere i go it still does that, ive tried, what im trying to do is see if there is any other operator to give me the same information that the above code would,
why i need this is i have a javascript "secure" login page and in order to access the restricted page you need to go though the page "login.html" in which it will check and if it isnt the same referrer it will link to a different page before any information was even compiled therefore not letting anyone see any of the urls with the information and then being persistant in closing a window with a setTimeout around a function and all the function does is parent.close()

colton22

sorry i didnt reply sooner just i live in chicago, and right now im in erie pa, so i may not have reliable internet connection, if you can will you let other people know so people dont get mad if i dont reply, lol, thanks again

Reply With Quote
  #4  
Old July 11th, 2006, 08:47 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
javascript "secure" login page?? *shudders*

Have you considered server side scripting at all?
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #5  
Old July 13th, 2006, 05:49 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 549 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 7 h 3 m
Reputation Power: 4
referring page

If you want to make sure a page is accessed from one of you other pages the best way would be for the caller page to set a variable that the called page could test for. With PHP you can set a SESSION var and then
if isset && == val
else
location

Reply With Quote
  #6  
Old July 20th, 2006, 03:28 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 473 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 19 m 14 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
well i have a problem, i only know html, javascript and not very much java, i guess i could do a window.open() to open the new browser and then check to see if the locations are correct by changing a variable in the opened window but better yet, checking to make sure opener.location== what i want it.

thanks,

ps is there any good site for learning php or serverside?

also i found anoter tag element for <script>
all my script tags look like this: <SCRIPT TYPE="text/javascript" LANGUAGE="javascript" RUNAT="server">

does the runat let the javascript be complied on the server or by the user?

the only reason i didnt post a new thread is because i am currently on dial-up and dont have that long to waste, i wont be on for a while after this, im not sure

anyway thanks, i try the above,

colton22

Reply With Quote
  #7  
Old July 22nd, 2006, 11:46 AM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 549 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 7 h 3 m
Reputation Power: 4
runat

I hadn't heard of the runat attribute. After a little searching I know why now. It's an IE only attribute. The only way that I can think of to do this using only HTML and javascript would work for non-tech savvy users and honest tech savvy users. But anyone that knows javascript and wanted to get at the page without logging in could do it. I guess if the pages' security isn't critical you could add a variable to be passed from the login page to the "secure" pages to deter some. But anyone could just request eg. www.yourdomain.com/securepage?login=true (or whatever you use) and they would get the page. Javascript is great for enhancing a site visitors experience, but it's no good at giving your site security as it's client side.
I don't know if the runat=server is different, but since it's only IE it still wouldn't be a fool-proof solution.

Last edited by Mittineague : July 23rd, 2006 at 12:00 PM.

Reply With Quote
  #8  
Old July 24th, 2006, 07:42 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 473 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 19 m 14 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
yea, the only way i could do this "securly" is to go and using the username of the client (which isnt listed ANYWHERE on my entire site) creating a number off of it by having a...
var alphabet=" abcdefghijklmnopqrstuvwxyz0123456789";
then, do this...
var numarray=new Array();
var usernameval=((location.search).toString()).substri ng(1,eval((location.search).length));
for (var x=0;x<usernameval.length;x++) {
numarray[numarray.length]=alphabet.indexOf([the substirng of the username]
}
exc.
and then create an object or something like that with that name, then check to see if on the opener, that object is in a position it should be, if it is, then good and it will go, otherwise it wont, (the objects name will be the coded number toString()'ed)

its crazy coding but the safest i have found!

lol

colton22

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Document.referrer in IE


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT