Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 24th, 2004, 06:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Arlington, TX, USA.
Posts: 119
Thanks: 0
Thanked 1 Time in 1 Post
Default Javascript question in my ASP code

I have a .JS file that is an arrays page for a menu system being utilized in my ASP page. The following code is one of the menus and its items:

arMenu3 = new Array(
120, //menu width
320, //left
120, //top
"#000000", //font color
"#000000", //font mouseover color
"#EEEEEE", //background color
"#CCCCCC", //background mouseover color
"#999999", //border color
"#999999", //seperator color

"Lab Test Consent Forms","http://zzzzweb018/Legal/consent.htm#5",0,

"Order Book (LAB 202)","/hmfw7/general/lab202.pdf",0,
"Point of Care Protocols","/hmfw7/poc/index.htm",0,

"Release of Body","http://zzzzweb01/hmfw8/HPolicy/602revdofbody.doc",0,

"Specimen Collection","/hmfw7/collections/index.asp",0,
"Transfusion Services","/hmfw7/bbprotocols/index.asp",0
)

I am needing to check if a user is coming from a particular website in order NOT to show two of the menu items. I tried checking using the document.referrer command however I am not doing something right. What I did is as follows:

if (document.referrer != "http://www.mywebsite.com")
  "Lab Test Consent Forms","http://zzzzweb018/Legal/consent.htm#5",0,

My javascript error showed it was expecting a " ) ". Any direction or help would be appreciated. I do not know what I am doing wrong.

Thanks.
  #2 (permalink)  
Old May 24th, 2004, 03:29 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

    if (document.referrer != "http://www.mywebsite.com")
  "Lab Test Consent Forms","http://zzzzweb018/Legal/consent.htm#5",0,

you would be appreciated if you complete that script, or mean us more about these two lines

Ahmed Ali
Software Developer
  #3 (permalink)  
Old May 24th, 2004, 03:35 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

This post has already been partially answered here:
http://p2p.wrox.com/topic.asp?whichp...ID=13659#31025

Please post replies there. This hardly has to do with ASP anyway.

Snib

<><
  #4 (permalink)  
Old May 24th, 2004, 06:05 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Have you thought of using server variables

Wind is your friend
Matt


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access ASP code inside Javascript deean JSP Basics 1 June 20th, 2008 02:00 PM
Error while running javascript code in ASP.NET Pag fozia_izhar ASP.NET 1.0 and 1.1 Professional 2 December 20th, 2006 03:39 AM
In ASP,Client side javaScript code casimir Classic ASP XML 0 October 24th, 2005 12:24 AM
hiding javascript code using ASP pablohoney Classic ASP Basics 2 March 30th, 2005 10:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.