Current location: Hot Scripts Forums » Programming Languages » ASP » Redirect based on Mac IE


Redirect based on Mac IE

Reply
  #1 (permalink)  
Old 08-08-03, 03:13 PM
heydasch heydasch is offline
New Member
 
Join Date: Aug 2003
Location: Knoxville, TN
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Redirect based on Mac IE

I'm currently working with a shopping cart and for each page of the shopping cart, there are three sections: header.asp, (main content).asp, and footer.asp. (All three are loaded at once to appear as one single page)

Inside my header.asp is a javascript drop down menu. This doesn't seem to be interacting well with Internet Explorer for Mac. What I'd like to do is have a browser redirect for just the header.asp content. I received help from a source stating that the code would look similar to the following:

if browser=IE MAC then
all mac header crap here
else
all original header crap here
end if

I can take care of the "header crap" but I'm not sure how EXACTLY the code would go. Any help would be greatly appreciated.[SIZE=1][FONT=arial][FONT=century gothic][COLOR=darkred]
__________________
________
Jason Heydasch
Autumn Home Web
Reply With Quote
  #2 (permalink)  
Old 08-08-03, 03:35 PM
MadDog MadDog is offline
Code Master
 
Join Date: Aug 2003
Posts: 935
Thanks: 0
Thanked 0 Times in 0 Posts
try this:

Code:
<%
Dim strUserAgent   'Gets OS and Browser
Dim blnUsingIE       'Will return True/False if user is using IE

blnUsingIE = False
strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") 

If inStr(1, strUserAgent, "MSIE", 1) Then blnUsingIE = True

If strUserAgent = "Macintosh" AND blnUsingIE = True Then
	'Your code here for Macs
Else
	'Your code here for non-Macs
End if
%>
I hope this is what you wanted (and it works, hehe)
__________________
Drew Gauderman
ASP - MSSQL Coder / Buisness Owner / Coder for Hire!
MSN-ICQ-AIM-YIM in Profile

http://www.iportalx.net an easy ASP portal system.
Reply With Quote
  #3 (permalink)  
Old 08-08-03, 04:32 PM
heydasch heydasch is offline
New Member
 
Join Date: Aug 2003
Location: Knoxville, TN
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
In respect of <HTML> <Head> Etc...

Where exactly would other tags fall into place with this code? For example: HTML, Head, Body.
__________________
________
Jason Heydasch
Autumn Home Web
Reply With Quote
  #4 (permalink)  
Old 08-08-03, 04:39 PM
MadDog MadDog is offline
Code Master
 
Join Date: Aug 2003
Posts: 935
Thanks: 0
Thanked 0 Times in 0 Posts
Just put the code at the top of the pages where the header would go, example:

Code:
<html>
<head><title>My Website</title></head>
<body>
<!-- Start Header -->
<%
Dim strUserAgent   'Gets OS and Browser
Dim blnUsingIE       'Will return True/False if user is using IE

blnUsingIE = False
strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") 

If inStr(1, strUserAgent, "MSIE", 1) Then blnUsingIE = True

If strUserAgent = "Macintosh" AND blnUsingIE = True Then
%>
Welcome to my site! You are using a Macintosh with Internet Explorer!
<% Else %>
Welcome! You are not using a Macintosh, you rock!
<% End if %>
<!-- End Header -->

Rest of the page goes here!

</body>
</html>
__________________
Drew Gauderman
ASP - MSSQL Coder / Buisness Owner / Coder for Hire!
MSN-ICQ-AIM-YIM in Profile

http://www.iportalx.net an easy ASP portal system.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Short Command Line Based Item Order Program digioz C/C++ 20 12-27-03 08:17 PM
web based email ashicq2 Script Requests 2 09-29-03 02:26 PM
ip based bandwith qouta fermansokmen PHP 7 09-13-03 09:57 AM
PHP web a based Proxy DeMiNe0 PHP 2 09-05-03 02:41 PM
Php based Guestbook server. mmlug Script Requests 0 07-25-03 08:31 AM


All times are GMT -5. The time now is 03:10 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.