Simple PLATFORM detect script?

I hope there is a simple solution for that - I operational requirement before Monday.

I built two versions of a simple site: one stupid version for cel phones/blackberrys, etc., a sensitive version for regular ol ' Mac and PC. The version of cel is the default page. One of the computers is in a subfolder.

Rather than enter a complex script that will endeavour to take account of all types of pocket which could hit the site, it seems it should be easy to detect for Mac & PC with javascript simply and deliver them accordingly in the subfolder. Handhelds should ignore just javascript and stay where they are... right?

I'm not a javascript person, though - so if anyone has a simple script that does this, I would be very grateful.

Also, is my hypothesis on the handhelds simply ignoring javascript fix, or will they choke on it and does not make the page?

Thank you very much!

A few responses:

http://www.hand-interactive.com/resources/detect-mobile-JavaScript.htm

Includes a file to include downloadable javascrript. Then, just make a call to DetectMobileLonger() which returns a Boolean value. If it is false, redirect.

Works fine now.

Tags: Dreamweaver

Similar Questions

  • browser flash detection script

    I need to put a flash on my page detection script, as some of my friends cannot view my page.
    Can you advise?

    Thank you
    Kevin

    It's easy, go here http://www.adobe.com/products/flashplayer/download/detection_kit/

  • In ActionScript 2 simple Collision detection?

    I'm doing a simple maze game, but the collision detection doesn't work. I have the player moving with the arrow keys, and I'm doing so that when the player collides with the wall, it goes to a certain range. I have this code in the wall clip:

    onClipEvent (enterFrame) {}

    If (_root.player.hitTest (this))

    {

    gotoAndStop ("death");

    }

    }

    Name of the instance of the player's 'player' and the wall instance name is "walls1". When the player hits the wall, the player goes right through it. I'm sure it's something with the collision, not the 'gotoAndStop ("death")"; because I've tested it with "gotoAndStop (5);" and the player is still through the wall.

    If someone could help me, I would really appreciate it. Thanks in advance!

    What object expect you goto frame 5 ("death")?

    You should move your code to the main timeline and target objects.

  • Need help with simple if/then script

    I'm trying to replicate a simple if/then statement excel in a PDF form. Have tried several things, but am just not a scripter Java.  The hope that I could get help from the community.

    I have three boxes that contain information on costs. They are labeled LaborCost, MaterialCost & EquipmentCost. Later, in the form, I have two boxes of different output for the sum out of my first three boxes.  If it's a positive number and the other is a negative number.  In Excel forumla language, that's what each of the boxes would read as:

    For the 1st result if it is a positive number: @if (+ LaborCost + MaterialCost + EquipmentCost > 0, + LaborCost + MaterialCost + EquipmentCost, 0)

    For the 2nd result if it is a negative number: @if (+ LaborCost + MaterialCost + EquipmentCost < 0, + LaborCost + MaterialCost + EquipmentCost, 0)

    I think that this should be a simple thing to write, but I'm not familiar with the games of the appropriate language.

    Your colletive help is VERY appreciated.

    Steven

    Try following the calculation script customized:

    // Sum the field values, as numbers
    var sum = +getField("LaborCost").value;
    sum += +getField("MaterialCost").value;
    sum += +getField("EquipmentCost").value;
    
    // Set this field value
    event.value = sum > 0 ? sum : 0;
    

    For others, change the last line:

    Event.Value = sum< 0="" sum="" :="">

  • simple ' show / hide ' script using option buttons, need a bit of help

    Hello;

    I have a place in my form I need to swap out what type of form you need to fill in an area. If I don't do it, it makes the page look over crowded, and if I go off to a process 2 or 3 steps, it doesn't have enough information in each section to be worth. It is one or the other.

    At the present time, this code works well. Click on a radio button, and the form section appears and disappears. What I'm trying to do when the page loads, one of the radio buttons is selected and one of the sections of the form is visible. Then if you click the other radio button, it inverts the.

    can someone help me tweek this code if one of the buttons is selected all the time?

    Here is my script.

    < style type = "text/css" >
    {.showHide}
    position: absolute;
    background-color: #f1f1f1;
    Width: 350px;
    padding: 1px;
    color: black;
    border: 2px #999999 wiped out;
    display: none;
    }
    < / style >


    < script language = "JavaScript" >
    function setVisibility (id, visibility) {}
    document.getElementById (id).style.display = visibility;
    }

    < /script >

    < form >

    < input name = type type = radio onclick = "setVisibility ('sub3', 'inline'); setVisibility('sub4','none');" value "male" = checked > selection 1 "

    < input type = radio type value = 'female' onclick = name = "setVisibility ('sub3', 'none'); setVisibility ('sub4', 'inline');"; > selection 2

    < div id = "sub3" class = "showHide" > selection 1 content < / div >

    < div id = "sub4" class = "showHide" > selection 2 content < / div >

    < / make >

    That's the short of it with tons of other codes on anyone of dumping.

    Thank you

    You took the class attributes of option buttons that corresponding with the functions of jquery... very simple fix. I have re-uploaded the sample page with your code and the class number fixed. Seems to work well. If you have other questions give me a shout. New page updated.

  • Platform detection

    Hello
    Is it possible to detect which runs under Mac OS, a projector? 'the platform' returns "PowerPC Macintosh" or "Windows, 32 '', but I need to determine if the user is running, its OSX or classic.»

    Thanks for your help
    Jason

    Don't worry, I solved it by using buddy API

    On a MAC baVersion ("os") returns "Mac10" or "Mac9.

    Thank you
    Jason

  • HP Simple pass - detects not fingerprint reader

    Hello

    This is my first post so I apologize if it appears in the wrong place. I'll have a problem with the fingerprint reader and HP simple pass identity protection software that came with my Dv6-3121nr. For some reason any all of a sudden since this morning it will not work. There is no light on the sensor, and it fails every time and movement. When I run the single pass software and go to the fingerprint section, it shows the fingerprint reader is not connected. Interestingly, when I go to Device Manager I see no biometric devices listed under there. I read on another thread that some options below biometic devices in Device Manager solves the problem.

    I already tried pass Simple uninstall/reinstall the Recovery Manager and also uninstalled and updated validity sensor but still no go.  Here are some other details:

    Laptop model: Dv6-3121nr

    Operating system: Windows 7 premium 64-bit

    Paleoclimatology sensor DDK version: 4.1.139.0

    I can't find any other information on how to solve it. Can anyone help?

    Thanks a bunch!

    Hello SM1251,

    I looked at your laptop and there is no Windows 8 drivers for it.  Have you tried to install the driver of Windows 7 in compatibility mode?

    1. Visit the HP Support and download the Windows 7 drivers for the hardware that you want to try.
    2. Download the driver to your desktop.
    3. Allow extraction until the complete but close the installation process, when it comes to the top.
    4. Navigate to the C:\swsetup\ folder.  You will see your driver listed here.  They usually have a name such as "sp48918".  Navigate to this folder.
    5. In the folder of your driver, you will see a file "setup.exe".  Right-click on this file and select Properties.
    6. Go to the tab "compatibility".
    7. Click on the box that says "Run this program in compatibility mode dethrone" and also select Windows 7 in the menu dropdown.
    8. Check the box that says "Run this program as an administrator", below.
    9. Save these changes, and then double-click the "setup.exe" to start the installation.
    10. Once installation is complete, restart your PC and check the functionality of the hardware.

    Please let me know if this helps solve your problem.

    Good luck!

  • Simple skin a script layer need help

    Hello

    This will be an easy one for someone. I'm new to scripting so please be patient. All I have to do is to have a script that hide a layer named "L2_NonTranslatedParts". I tried to restore a code but I failed. Can anyone help? I'm not sure why we defineing "watermark" as a var. It's in the code, I cut upwards.

    var myDoc = app.documents.item(0);
    var L2_NonTranslatedParts = "Watermark";
    try{app.activeDocument.layers.item(L2_NonTranslatedParts).visible = false;}
    catch(_){alert("Can't find layer: " + L2_NonTranslatedParts);exit();};
    

    Yes, that is a good question. Really

    app.activeDocument.layers.item("L2_NonTranslatedParts").visible = false;
    

    should be enough.

  • Simple coding rotation script

    I have a script to move an object in my flash already:

    var speed: Number = 4;
    plane_mc.onEnterFrame = function() {}
    If (Key.isDown (Key.RIGHT)) {}
    This.Ang = ang + 0.01;
    } Else if (Key.isDown (Key.LEFT)) {}
    This ._x = this ._x-speed;
    }
    If (Key.isDown (Key.UP)) {}
    This ._y = this ._y-speed;
    } Else if (Key.isDown (Key.DOWN)) {}
    This ._y = this ._y + speed;
    }
    };

    This makes it move but now I want to raise objection to turn then instead of the left and right arrows that actually move that I need them to rotate the retrospectively. For example, arrow right turns object counterclockwise.

    Thanks for any help.

    The code you showed would not indicate that your new... it's actually semi advanced.    Try the following instead of what you now to the section of code to RIGHT or LEFT. He did what you asked - CCW to the right arrow, if this can be behind what you really want.

    If (Key.isDown (Key.RIGHT)) {}
    This ._rotation-= 1;         subtracts 1 degree of rotation

    } Else if (Key.isDown (Key.LEFT)) {}
    This ._rotation += 1;        Add 1 degree of rotation
    }

  • The platform - detect Vista?

    Hello world. Can Vista users, you tell me what 'the platform' returns under Vista D11? Docs don't say anything about Vista at all. Thank you.

    OK great,

    So the answer is "Windows 32", but the solution to my problem is the environmentPropList.osVersion. Thank you, Mike!

  • Flash detection script

    I use the following code on my index.html page - if flash exists, it redirects in main.html, and if not, it redirects to poop.html. How would change the script for - rather than redirect to a page of my choice - load the page that was originally for?

    < SCRIPT LANGUAGE = JavaScript1.1 >
    <!--
    var MM_contentVersion = 8;
    plugin var = (navigator.mimeTypes & & navigator.mimeTypes [' application/x-shockwave-flash'])? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin: 0;
    If {(plugin)
    Var words = navigator.plugins ["Shockwave Flash"].description.split ("");
    for (var i = 0; i < words.length; ++ I)
    {
    If (isNaN (parseInt (words )))
    continue;
    var words = MM_PluginVersion
    ;
    }
    var MM_FlashCanPlay = MM_PluginVersion > = MM_contentVersion;
    }
    Else if (navigator.userAgent & & navigator.userAgent.indexOf ("MSIE") > = 0)
    (& & (navigator.appVersion.indexOf ("Win")! = - 1)) {}
    document. Write (' < SCR' + ' IPT LANGUAGE = VBScript\ > \n ""); FS hide this Mac IE4.5 by splitting the tag
    document. Write ('on error resume next \n');
    document. Write ('MM_FlashCanPlay = (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion))) \n "");
    document. Write (' < /SCR ' + ' IPT\ > \n "");
    }
    If {(MM_FlashCanPlay)
    Window.Location.Replace (" http://www.leoandsabrina.com/main.html");
    } else {}
    Window.Location.Replace (" http://www.leoandsabrina.com/poop.html");
    }
    ->

    < /script >

    On Fri, September 14, 2007 13:38:47 + 0000 (UTC), "joeq".
    wrote:

    > the way I do it is by disabling plug-in in the browser opera... is
    > how you do?

    That's exactly what I did using Opera 9.23 and Flash 9,0,16,0. When
    plug-ins have been activated, he showed the video. When plug-ins have been disabled,
    He re-directed.

  • Making existing EEM applets simple scripts Tcl or python.

    Hi all

    I would like to make the existing simple EEM of scripts Tcl or python applets.

    For monitoring the nodes in ITD service, I set up an EEM applet with a knot.

    But the nodes keep adding EEM applets are also added as many nodes.

    That's why EEM configuration get more complex so I should find a solution.

    I think it might be Tcl or Python scripts.

    Could check you if it of possible or not?

    -Monitor the model track or syslog on the nodes of the ITD downwards or upwards.

    -When the ITD nodes get downwards or upwards, the associated script the event trigger to add or delete a device group.

    Order to reduce EEM applets I want variable allows you to exactly identify node under status change of situation.

    Here are the current configurations of EEM.

    Event Manager applet remove_inside_node1
    event track State 101
    order cli action 1 'enable '.
    Action 2 cli command "conf t".
    Action 3, command cli "itd session device-group ips_inside.
    Action4 'no node ip 1.1.121.1' cli command
    Action 5 cli command "commit".
    action 6 cli command 'end '.
    Action 7 "INFO: removed the 1.1.121.1 node.

    Event Manager applet add_inside_node1
    101 State event track upward
    order cli action 1 'enable '.
    Action 2 cli command "conf t".
    Action 3, command cli "itd session device-group ips_inside.
    Action 4 cli command "node ip 1.1.121.1.
    Action 5 cli command "commit".
    action 6 cli command 'end '.
    Action 7 "INFO: inserted node 1.1.121.1.

    OMIS...

    Event Manager applet remove_inside_node199
    event track State 199
    order cli action 1 'enable '.
    Action 2 cli command "conf t".
    Action 3, command cli "itd session device-group ips_inside.
    Action4 'no node ip 1.1.121.199' cli command
    Action 5 cli command "commit".
    action 6 cli command 'end '.
    Action 7 "INFO: removed the 1.1.121.199 node.

    Event Manager applet add_inside_node199

    199 State event track upward
    order cli action 1 'enable '.
    Action 2 cli command "conf t".
    Action 3, command cli "itd session device-group ips_inside.
    Action 4 cli command "node ip 1.1.121.199.
    Action 5 cli command "commit".
    action 6 cli command 'end '.
    Action 7 "INFO: inserted node 1.1.121.199.

    Using track, can you cannot match on a circuit racetrack pattern.  But, using track syslogs, it would be possible to consolidate these cmdlets to one.  For example:

    Event Manager applet add_inside_node

    event model syslog "TRACK-6-STATE :.*-> to top"

    Action 1.0 regexp ' STATE: ([0-9] +) "" $_syslog_msg "corresponds to the track

    command cli 2.0 action 'enable '.

    Action 3.0, «config t» cli command

    Action 4.0, command cli "itd session device-group ips_inside.

    Action 5.0, command cli "node ip 1.1.121.$track.

    action 6.0 cli command "commit".

    Action 7.0 cli command "end".

    message from syslog to action 8.0 "INFO: inserted node 1.1.121.$track.

  • How to detect if a call has been answered from a script

    I need detect script RONA form when a call has been answered by an agent and try this to transfer to another agent that no answer the call, then the call was rerouted to the script of RONA.

    It's: EAC 7.5 + IP IVR

    can someone help me

    Thanks in advance

    Hello

    they transfer to another Department and you manage RONA by target requery or they transfer directly on the extension and redirect you to a RONA script?

    you need this information in real time (in the script running, are not related), right? There is a certain way, you can try. Agents call this range of services outside transfer? You can do a query of database for this call in the RONA script and check if ANI is a connected agent. If they do not call the service normally line you might conclude that there must be a transfer. But there would be a cleaner way...

    ... Since there is no standard information of this type available in real-time, you will need to use variables of the call. But normally the second call (transfer) is a new call to the system if you do not have your previous call variables (unles the system is set up to keep this information, or set you it to the new call for transfer).

    Because you can set things in a CIM script when the call is to the agent, this information can come from your Agent's office. This means 2 things:

    -Transfer must be made through the Office of the Agent of this scenario

    -Put a PeripheralVariable at the initiation of the new calls but you would need to make a custom button to do this, I guess.

    .. .These are things you might try. Personally, I use both methods, a first for this calsl a higher priority in the queue and secondary method to identify transfers (made by an agent custom frontend and variable ECC tho).

    ~ Fabian

  • Animate simple Collision in edge detection

    I'm new to lively edge and I created a game in which a player moves their character left and right on the screen, trying to avoid colliding with the other characters. I searched for a good and simple collision detection function/algorithm/plug-ins use to detect these collisions.

    The characters are all simple rectangles (convex?) and the other characters move vertically along the y-axis while the character of the hero can move left, right, upwards or downwards. I have 2 two questions that I can't solve right now:

    1. how to keep my character of heroes within the scene (I don't want him to go off the stage when the Player tries to move it left/right/etc... too far;)

    2. how to I detects collisions between hero and 20 characters or other character that drive up and down along the y axis?

    My thoughts are that inclusive would be all that is necessary for this game pretty simple because I don't have a lot of characters to check collisions and my characters are all rectangles. I stripped down so that two objects on the stage (a blue and red rectangle) and I overlap right now (should indicate a collision) and tried to implement the following code to detect the collision. I put this function in the action of compositionReady:

    var Object1 is sym. $l ("BlueRectangle");

    var object2 = sym.$("RedRectangle");

    If (object1.x < object2.x + object2.width & & object1.x + object1.width > object2.x & &)

    Object1.y < object2.y + object2.height & & object1.y + object1.height > object2.y) {}

    The objects are in contact with

    Alert ("Oops! You crashed! ») ;

    setInterval (sym (e), 35);

    }

    But it nothing happens when I test the project hosted in a browser. No alert occurs. What I am doing wrong?

    Once I understood how to apply the code to run the detection of collision for several rectangles that could collide with my hero character?

    How to set the interval to periodically check the collisions and what is refresh rate?

    Any help would be greatly appreciated!

    Here is another resource that can help you to understand this: http://paultrani.com/2013/02/drag-drop-in-edge-animate/

  • Layout another phone is not detected by the phone

    I created a site with a desk and a telephone of substitution. Aid is said that when you publish (I edited to Business catalyst to listen to extracts), the browser on the device automatically displays the correct version. :

    "When you publish a site with two or three different configurations, Muse generates the code for the site which includes detection scripts to identify what kind of computer or device and what type of browser, the visitor is using the access of the page.

    The detection code determines the version of the platform and browser and displays then automatically layout correct. »

    So when I checked the phone (iphone 5 and a samsung galaxy), it displays the desktop version. I know because the menu on the layout of the phone is an accordion of vertical menu items, while the desktop version has an accordion with horizontal menu items. There are other differences that tell me that displayed on the phone is not correct.

    What have I done wrong?

    Thanks for the heads up John.

    What happens is sometimes due to frequent download files, there might be a chance of any element HTML get corrupted, which can result in various types of questions.

    I am happy that it worked.

    Best regards

    Ankush

Maybe you are looking for