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.
|
|
|
|
|
![]() |
||
Object Detection
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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. |
|
|
|
||||
|
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 |
|
|||
|
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? |
|
|||
|
Re: Object Detection
Use something like
|
|
|||
|
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. |
![]() |
| Tags |
| object, detection |
| Thread Tools | |
|
|
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 |