Object Detection

This is a discussion on "Object Detection" within the JavaScript Forum section. This forum, and the thread "Object Detection are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 10th, 2006, 22:22
New Member
Join Date: Jun 2006
Location: Chicago
Age: 33
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Object Detection

I've built a flash-communication based javascript function which makes use of two horizontal frames (html frames, not flash movie frames).

I only want to allow browsers which can execute the developed script to enter my site.

In the upper frame of my site is a) the flash document which is being "communicated" with and b) the javascript function code, which reads as follows:

<script language="JavaScript">
function reSet(target,frameNumber)
{
navigation.TCallFrame(target,frameNumber);
}
</script>

The actions above are executed via an html link in the lower frame of my website, as follows:

<a href="audio.html?peanutbutterfly" target="hidden" onClick="parent.frames[0].reSet('/',3)">Peanut Butter Fly</a>

If this script won't work in a given browser, I want them to be redirected to another page. I want to use object detection to do this. How should I go about it?

One of my concerns is that many browsers can easily handle "navigation.TCallFrame(target,frameNumber);"

... but ...

because it's being communicated from one frame to another, I've discovered that many browsers CANNOT handle it.

Examples: Netscape for Windows works but Netscape for Mac doesn't. Explorer for Windows works but Explorer for Mac doesn't. Later versions of Safari work but earlier versions do not ... you get the picture.

I'm uncertain as to how to begin testing this and am in need of advice.

Thanks in advance.
Reply With Quote

  #2 (permalink)  
Old Sep 11th, 2006, 06:19
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Object Detection

I would really start by not using frames. The use of a JavaScript really shouldn't be used in this manner, either. It's supposed to enhance a visitors experience if it's available. If not, the site should still function. I strongly advise that you drop the frames, however.

I don't know if there is a way to redirect a visitor if they don't have a JavaScript enabled browser, but you can redirect a visitor depending on if a function is able to execute though. I'm just not sure how well this would work: If a browser can execute the function, just not over frames, then the redirect test would fail.

This might be useful:

http://www.webmasterworld.com/forum91/887.htm
Reply With Quote
  #3 (permalink)  
Old Sep 11th, 2006, 15:57
New Member
Join Date: Jun 2006
Location: Chicago
Age: 33
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Object Detection

So, anyhow, as I was saying.

Does anyone out there know how to convert my original post into an object detection based redirect?
Reply With Quote
  #4 (permalink)  
Old Sep 11th, 2006, 17:28
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Object Detection

Use something like
Code: Select all
if (document.theObjectsName){

}
What your basically asking is does this object exist
Reply With Quote
  #5 (permalink)  
Old Sep 11th, 2006, 18:30
New Member
Join Date: Jun 2006
Location: Chicago
Age: 33
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Object Detection

Understood but I'm really new to this.

Another problem is that I want to post the object detection / compatibility check on a seperate page which then forwards to the content page in question.

This means that the flash doc / frames layout won't exist yet to the object detection.

I might be able to work around this by posting it into the frames template and disabling the "autostart" flash doc function.

I'm uncertain as to what elements of my initial code should be used for the object detection based on the frames.

Last edited by RobinDeanDotCom; Sep 11th, 2006 at 19:00.
Reply With Quote
Reply

Tags
object, detection

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Os Detection simonb PHP Forum 16 Nov 26th, 2007 23:59
Browser detection IE mac jillcary JavaScript Forum 1 Aug 1st, 2007 11:28
javascript detection yvettesio JavaScript Forum 2 Feb 12th, 2007 23:58
ie mac detection jimz JavaScript Forum 2 Jul 27th, 2006 22:07
Field Name Detection accessman Databases 1 Oct 4th, 2005 07:53


All times are GMT. The time now is 22:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43