Help with embedding javascript in Muse

I tried embedding javascript to detect and redirect mobile browsers, using the function "insert HTML", but the script becomes visible on the page. How can I keep that from happening?

This is the script:

(function (a, b) {if (/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|h iptop | iemobile | ip(hone|od) | iris | kindle | lge | maemo | midp: mmp | netfront | Opera m(ob|in) I: palm (os)? |)}) Phone | p(ixi|re)-/ | Plucker. Pocket | PSP | Symbian | Treo | up\. (browser: link) | Vodafone | WAP | Wi ndows (this | phone): xda | xiino/i.test (a) | / 1207 | 6310 | 6590. 3gso | 4thp | 50 [1-6] i | 770 s | 802 s | a wa | ABAC | AC (Re: oo | if-) | ai(ko|rn) | Al (av: ca: co) | Amoi | a (ex: ny: yw) | APTU | ar(ch|go) | as(te|us) | a ttw | AU (di | \-m | r | s) | Avan | be (ck | | nq) | bi(lb|rd) | bl(ac|az) | br(e|v) w | bumb | bw\-(n|u) | c55\ / | CAPI | ccwa | cdm\ | Cel l | chtm | CLDC. cmd\ | co(mp|nd) | craw | da (it: he's: ng). dbte. dc\ - s | Devi | Dica | dmob | do(c|p) o | DS (12: \-d). el(49|ai) | em(l2|ul) | er(ic|k0) | esl8 | EZ ([4-7] 0: os: wa: ze) | ETF | fly (--: _). u|g560|gene|gf\-5|g\-Mo|go(\.w|OD)|GR(ad|UN)|haie|hcit|hd\-(m|p|t)|hei\-|HI(PT|TA)|HP g1 (I: ip) | hs\ - c | HT (c (--| | _ | a | g | p | s | t) | tp) | hu(aw|tc) | jemti-(20 | aller | ma) | i230 | IAC (| \-|\/)|ibro|idea|ig01|ikom|) Im1k | Inno | iPAQ | IRIS | ja(t|v) a | jbro | jemu | jigs | KDDI | Keji | kgt (| \/)|klon|kpt |) kwc\ | kyo(c|k) | le(no|xi) | LG (g |------/ (k | l | u) [| 50 | 54 | e\-| e\ / | \-[AW]) | Libw. Lynx | m1\ - w | m3ga | m50\ / | my (you: ui | xo) | MC (01: 21: ca) | \-CR|me m (di: rc: ri) | MI (o8 | oa | ts) | mmef | mo (01: 02 | bi | of | do | t (-------| | o | v) | zz). MT (50: p1 | v) | mwbp | mywa | N10 [0-2] | N20 [2-3] | n30(0| 2) | n50 (0 | 2 | 5) | N7 (0(0|1): 10) | don't ((c|m) \-|on|tf|wf|wg|wt) | nok(6|i) | nzph | o2im | op(ti|wv) | oran | owg1 | p800 | pan(a|d|t) | pdxg | pg (13 |-------([1-8]|c)) | Phil | worse | pl(ay|uc) | pn\ - 2 | in. (ck | rt | themselves). PROX | PSIO | pt\ - g | qa\ - a | QC ([07: 12: 21: 32 | 60 | \-[2-7] | jemti-) | QTEK | R3 80 | r600 | raks | rim9 | ro(ve|zo) | s55\ / | sa(ge|ma|mm|ms|ny|va) | SC (01 | h\-: oo: p\-) | sdk\ / | is (c (\-|0| 1) | 47 | mc: nd | ri) | sgh\ | Shar | Sie (\-|m) | sk\ - 0 | sl(45|id) | SM (al: ar | b3 | it | t5) | so(ft|ny) | SP (01 | h\-| v-| v) | sy(01|mb) | t2(18|50) | T6 (00: 10: 18). ta(gt|lk) | tcl\ | -tdg\ | tel(i|m) | tim\ | Download - MB | to(pl|sh) | s(70|m\-|M3|M5)|tx\-9|up(\.b|G1|SI)|utst|V400|v750|Veri|VI(RG|TE) t | VK (40: 5 [0-3] | \-v) | vm40 | v oda | vulc | VX (52: 53 | 60: 61 | 70 | 80 | 81: 83 | 85 | 98) | w3c(\-|) | webc | Pentecost | ({(ation window.loc wi (|nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)) g) = b}) (navigator.userAgent |) Navigator.Vendor | Window.Opera,'http://detectmobilebrowser.com/mobile');

In fact, takes Muse 1.0 by adding code to thesection. Go to 'Page Properties' and click the metadata Panel. Then paste the JavaScript code (inside a script like Abhishek tag shows above) in thesection edit box. Muse come out then this script code in thesection of the page.

Tags: Adobe Muse

Similar Questions

  • Need help with a JavaScript to generate random number

    Hello

    First things first. I don't know the JavaScript J.

    When I thought about a ready to use solution to generate a random number in Captivate, I found this on a forum of LinkedIn.

    (1) add a user to your project variable, called "NombrAl". Its value can be zero.

    (2) add a text caption with ' $$randomNumber$ $"inside, to check if your script works.

    (3) add a button to the slide. Give him one on success Action to run JavaScript. Clear the check box 'continue playing the Project '.

    (4) add the following text in the button Script_Window:

    var objCP = document. Captivate;

    var rand = 1 + Math.floor (Math.random () * 10);

    onButtonClick() {} function

    objCP.cpEISetValue ('NombrAl', rand);

    }

    onButtonClick();

    However, it is (as the poster in the forum warned) for 7 Captivate does not. Can someone please help?

    I am open to all other methods to achieve the same result.

    Thanks in advance,

    Anthony

    Hi Anthony,.

    During the test, make sure that you are testing from a web server where the web address starts with http or https.  When you set the captivate variable "NombrAl" try this instead:

    objCP.cpEISetValue ('m_VarHandle.randomNumber', rand);

    This will work for the SWF output.  If you want to work for the release of HTML5 and SWF, try this code:

    window.onButtonClick = function(){
              var rand = generateRandomNumber(1, 10);
              setCpVariable('randomNumber', rand);
    
    };
    
    window.generateRandomNumber = function(min, max){
              var randomNum = 0;
    
              if(!isNaN(parseFloat(min)) && !isNaN(parseFloat(max))){
                        min = Number(min);
                        max = Number(max);
                  randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
              }
    
              return randomNum;
    };
    
    window.setCpVariable = function (cpUserVariableName, variableValue) {
              /* Check for HTML5 vs. SWF output */
              if (typeof window.cp === 'undefined') {
                        /* We have SWF output, so Get the Captivate Object */
                        var objCp = document.getElementById('Captivate');
    
                        if (objCp && objCp.cpEISetValue) {
                                  /* Set the Captivate User variable with the JavaScript variable, variableValue */
                                  objCp.cpEISetValue('m_VarHandle.' + cpUserVariableName, variableValue);
                        }
              } else {
                        /* We have HTML5 output */
                        /*If variable does not exist off of the window object, then use the variables manager*/
                        if (typeof window[cpUserVariableName] === 'undefined') {
                                  if (cp.vm && cp.vm.setVariableValue) {
                                            cp.vm.setVariableValue(cpUserVariableName, variableValue);
                                  }
                        } else {
                                  window[cpUserVariableName] = variableValue;
                        }
              }
    };
    
    window.onButtonClick();
    

    Don't forget to test this situation from a web server either local security prevents the javascript code for execution.

    Best,

    Jim Leichliter

  • Help with Adobe Edge and MUSE

    I want to loop continuously animation Adobe Edge, I placed in my file of MUSE - but Adobe Edge animation frame - again at any time a visitor interacts with the site.

    Q: is it possible to have the loop Adobe Edge animate, play without interference from the interaction of the MUSE of the site visitor.

    Hello

    Read the following article, "adding scrolling animations effects."

    Adobe help Muse | Adding content on board animate

    See if it meets your needs.

  • Help with the JavaScript for checkbox

    I am a newbie with Javascript and will have questions, get the selection of a checkbox on my form to change a calculation.

    I have a form that contains two drop-down lists, the result of these two boxes are multiplied together.  I can get it works fine.

    However, I also have a box that, when checked I want the calculation according to the drop-down lists duplicate.  I can't get that part to work!

    Can anyone provide the javascript code to activate this simple event?

    Any help is appreciated.

    Thank you.

    It should look like this:

    Get field values

    var v1 = combo1.value;

    var v2 = combo2.value;

    $ var = + v1 + v2;

    Get the value of the checkbox

    var v3 = getField("checkbox1").value;

    Calculate the value of this field based on the State of the checkbox

    V3 = Event.Value = "Off"? sum: 2 * sum;

    This last line is equivalent to the following five lines:

    If (v3 = 'Off') {}

    Event.Value = sum;

    } else {}

    Event.value = 2 * sum;

    }

  • Help with a javascript - need the name of the document file name when exporting

    When I run this script:

    var myPresets = app.pdfExportPresets.everyItem () .name;

    myPresets.unshift ("- select preset-");

    var myWin = new window ("dialog", "PDF Export Presets'");

    myWin.orientation = "row";

    {with (myWin)}

    myWin.sText = Add ("' statictext ', undefined, ' select PDF Export preset :');)

    myWin.myPDFExport = add('dropdownlist',undefined,undefined,{items:myPresets});)

    myWin.myPDFExport.selection = 10;

    myWin.btnOK = Add ('button', undefined, "OK");

    };

    myWin.center ();

    myWindow var = myWin.show ();

    If (myWindow == true & & myWin.myPDFExport.selection.index! = 0) {}

    var myPreset = app.pdfExportPresets.item (String (myWin.myPDFExport.selection));

    myFile = lead (File.saveDialog ("save the file with preset:" + myPreset.name, "PDF files: *.pdf"));

    If (myFile! = null) {}

    app.activeDocument.exportFile (ExportFormat.PDF_TYPE, myFile, false, myPreset);

    } else {}

    Alert ("no file selected");

    }

    } else {}

    Alert ("no predefined PDF selected");

    }

    I need to place the filname document automatically when the dialog box "Save as" appears:

    Udklip.PNG

    Can someone help me?

    Use this:

    myPath = app.activeDocument.filePath + '/' + app.activeDocument.name.replace (/\.indd$/, '.pdf');
    myFile = File(myPath).saveDlg("Save file with preset: " + myPreset.name,"PDF files: *.pdf");
    

    Peter

  • Need help with parallax effect - Adobe MUSE and Safari

    Hey there,

    I need help.

    I did a parallax effect on my www.bloxmix.depage.

    Firefox, Opera and Chrome are working very well.

    Safari works worst.

    Try and see.

    Can someone help to solve my problem?

    Thank you community

    Hi Karl,

    Given that the site works fine at my end, I guess the problem is with your local browser. Could you please try it on another computer and see if it works fine here or not?

    - Abhishek Maurya

  • Help with embedded fonts

    Hello-

    I use FlashEFF for some text effects in our online advertising banners.  I have five embedded fonts.  Now the problem is that the file size is huge because of the embedded fonts.

    Is it true that if a user doesn't have this font on their computer they will see a default font?

    I use the following fonts:

    Helvetica Neue: 65, 77 Bold Condensed, 95 Black medium

    and

    Futura LT:  "BOLD" and book

    Thank you for any advice on that.

    When you embed a font, you can only embed certain characters

    Select the textfield (dynamic or input) press the 'Embed' deselect all "ranges of characters" and type the characters to use in the section also "include these characters.

    If you use a static text, you don t need to incorporate fonts, everyone see your fonts with static text.

  • Newbie: Receipt happy Flash - need help with embedding - onClick

    Hello

    I received a web banner from one of our suppliers that I need to integrate into our website.  I have it in the web page, but do not know how to configure an action of "onclick".  In my reading I cannot find a setting to specify the action to take if someone clicks on the banner.  Good that now it opens a new window with an error message saying that it cannot find ' / undefined.  How to set the URL?  The salesman who gave us the marketing content was of no help.

    Thank you.

    Steve

    You are / were close enough in your attempt.  I'll be honest and tell you that you are about to have a little less as much experience as I do with FlashVar... which means that I'll show you where to look (where I might look to get the answer for you):

    http://KB.Adobe.com/selfservice/viewContent.do?externalId=tn_16417

    Just be sure to include in the object and to incorporate sections of the code that they show on the page linked above.

  • Need help with the site of muse

    Hello

    I have created a website www.marinoafc.ie

    I started there a couple of weeks now, but his not appearing is not on the search engines. I used the designation and the titles of the pages.

    Can someone let me know what I can fact to avoid this problem. My client wonder why his site is not displayed

    Hi Britmark

    Sent you a private message... Just make sure you get it... Your help would be much appreciated.

    Niamh

  • Help with embedding fonts

    I use Flash MX.

    I've read here on how to embed a font (library > new font...) but I find that the police I incorporated (supposedly) is not correctly appear on any other computer that does not have that font installed. To be precise, it's a pixel font, that I found on the web (from fonts for Flash.com) that can apparently be integrated without any problems. All the text in my film fields are dynamic.

    Can anyone suggest how to fix this? I'm doing something wrong? The police should there be a pixel font because of how small the letters should be.

    Thanks in advance.

    To embed a font for your dynamic/input text field, select the instance of text field on your scene, & click "embed" button in the property inspector.

  • I have customized a widget and want to reuse on another page. How save, copy or reproduce them? With the help of the iMac and Muse 2015

    I have customized a widget and want to reuse on another page. How save, copy or reproduce them? With the help of the iMac and Muse 2015

    You can just copy/paste the enchilada itself on another page, pretty easy!

    If you want to reuse more often, you can open the library or libraries CC , to store and later hanging out once again. Note: for the creation of an article in the 'old' library, you must select the element on the page and click on the new icon in the " library " window To create an element of CC libraries , you can simply drag something in and out of the window libraries CC .

  • Help please! I using Muse (the free trial version) very well since last week, but the last few times I tried to use it, it comes back with ' TypeError: Error #1009 pouvez anyonve tried to use it, it comes back with ' error can all

    Help please! I using Muse (the free trial version) very well since last week, but the last few times I tried to use it, it comes back with ' TypeError: Error #1009 pouvez anyonve tried to use it, it comes back with ' error can someone help me figure out what the problem... I have a few days I really help neee what the problem is... I have a deadline in a few days so I really need! Thank you

    Screen Shot 2015-05-11 at 20.32.34.png

    Restart your Mac. The OSX Drag Manager got in a bad state. The only way to reset it is to restart your computer.

  • How can I get a google font (Capriola) in Muse. I pasted the code in the head of html, but the police will not be displayed. Can anyone help with teamviewer?

    How can I get a google font (Capriola) in Muse. I pasted the code in the head of html, but the police will not be displayed. Can anyone help with teamviewer?

    This is kind of a hack, but it will work.

    1. you will need to download a copy of the Capriola on your computer and install it as a system font. Google Fonts will allow you to install it as a system font in some methods (download a.) (ZIP file, synchronization with SkyFonts or downloadable on the project in Google Code). Edit: the simplest is to add the font to your collection of fonts in Google and then download one. ZIP file of your font collection.

    2. the font squirrel website has a generator of quality web fonts. It may take a font installed on your computer system and generate all the files of web fonts needed him. Place the web font files in the folder of your Muse project where you want to store the web fonts self-hosted. Use the add web fonts in Muse and select the tab fonts self-hosted.

    IMPORTANT: Please read the license terms for any font that you want to use on your website. Fonts Open source as Capriola may seem safe to use at first, but the developer of fonts may have some requirements, such as the display of a link to their web site somewhere in your own site. Other fonts may have monthly limit on number of pages seen.

  • Help with anonymus pl/sql layout using javascript

    Hi people.

    I want to display records on a region (using apex 4.2), this anonymous pl/sql script below shows 3 records in database, but the layout only shows me the first album with its data, the other 2 files, only show me the labels.
    I checked this same query creating a report and it shows the 3 files correctly.
    I guess I'm doing something wrong with this javascript routine or certainly miss something,
    in this link you can see the layout I get. (http://sdrv.ms/Xrv0J8).

    Another is the little help I need to display in a line for each record. in fact, I'm getting a line for each label and a line for each data record. I have read and learned something is/div, but I don't know how to change it to get the desired results, any suggestion is welcome.

    Thanks in advance for any help.



    I am completely new in apex and java script, but I have several years of experience in pl/sql.

    -------


    The Script:

    Begin
    Declare
    Anyth cursor is
    Select the item,
    To_char (delivery, ' month DD, YYYY hh24:mi:ss ") delivery.
    Current_date
    Of pending_items;
    Begin
    For a loop Anyth
    Begin
    Sys.Htp.P ("< script type =" text/javascript"> '");
    Sys.Htp.P ('function cdtd() {'});
    Sys.Htp.P ("var Christmas = new Date (" ' | ') ") a.Delivery | '")');
    Sys.Htp.P ("var now = new Date();'");
    Sys.Htp.P ("var timeDiff = xmas.getTime () - now.getTime ();'");
    Sys.Htp.P (' if (timeDiff < = 0) {'});
    Sys.Htp.P ('clearTimeout() (timer)');
    -Sys.Htp.P ("document.write ("of the text here.")");
    Sys.Htp.P (' / / execute all necessary code to the completion of the countdown here ');
    Sys.Htp.P ('} ');
    Sys.Htp.P (' var seconds = Math.floor(timeDiff / 1000);) ") ;
    Sys.Htp.P ("var minutes = Math.floor(seconds / 60) ;");
    Sys.Htp.P (' varhour = Math.floor(minutes / 60);) ") ;
    Sys.Htp.P ("days var Math.floor(hours / 24) = ;"); ")
    Sys.Htp.P (' hours = 24 ;'); %)
    Sys.Htp.P (' minutes % = 60 ;');)
    Sys.Htp.P (' seconds % = 60 ;');)
    Sys.Htp.P (' document.getElementById("daysBox").innerHTML = days ;');)
    Sys.Htp.P (' document.getElementById("hoursBox").innerHTML = hours;) ") ;
    Sys.Htp.P (' document.getElementById("minsBox").innerHTML = minutes ;');)
    Sys.Htp.P (' ;'); seconds = document.getElementById("secsBox").innerHTML)
    Sys.Htp.P (' timer var = setTimeout ("cdtd ()", 1000);');
    Sys.Htp.P ('} ');
    Sys.Htp.P ("< /script >");
    Sys.Htp.P ("days");
    Sys.Htp.P ("< div id ="daysBox"> < / div > '");
    Sys.Htp.P ("hours");
    Sys.Htp.P ("< div id ="hoursBox"> < / div > '");
    Sys.Htp.P ('minute');
    Sys.Htp.P ("< div id ="minsBox"> < / div > '");
    Sys.Htp.P ("seconds");
    Sys.Htp.P ("< div id ="secsBox"> < / div > '");
    Sys.Htp.P ("< script type =" text/javascript"> '");
    Sys.Htp.P ('cdtd() < /script > ');
    End;
    End loop;
    End;
    End;

    For now, let's focus on delivery dates and the javascript.
    Why you would put your javascript in htp.p called in a plsql region is beyond me. When you edit the page there is a region of javascript where you can put global variables and functions, a great spot for it then and much easier to manage than that.
    Now, it is also clear that your query on pending items will return multiple records. Thus, using a report would serve you well in this case. However, using code like this:

    document.getElementById("daysBox").innerHTML = days;
    document.getElementById("hoursBox").innerHTML = hours;
    document.getElementById("minsBox").innerHTML = minutes;
    document.getElementById("secsBox").innerHTML = seconds;
    

    you won't have to. getElementById is supposed to return an element identified by a code. If you have a report that contains multiple lines and elements on each line with the same ID, you're doing something wrong. You should be the date of delivery by rank, and I suppose that you put your code with htp.p because you don't know how to deal with this and passing the procedure of javascript.
    But would it not more oppurtune for you simply create a report with a sql source when you calculate each part of the date and then refresh this region with a certain interval. If you would be refreshed every 5 minutes, not who is more fast enough to keep track of things? Remember, refreshing a region will execute the SQL again.
    It is not that you cannot make a report multi-record with a countdown by rank, but are you sufficiently comfortable with javascript and jquery to encode and maintain that against leverage plsql and dynamic actions (there is even an action timer plugin supplied by oracle dynamic)?

  • With the help of Embedded javadb

    Hello company
    I created a javafx application that uses javadb incorporated as database engine. It works well for my computer, but when I run it in another pc I can't work in another place.
    Because I know that I just need a java and javafx runtime more 6 update 22 and derby.jar in my class path so I can run my appplication wherever I like, but I can't run somewhere else instead of my pc.

    My preferences:
    OS: Windows 7 64
    NetBeans 6.9.1
    JavaFX 1.3.1
    JDK 6 update 22

    Please guys anyy help, just say
    Best regards

    Published by: Pauline on Jan 3. 2011 12:29

    It is a forum of jdbc.

    If the database code has a problem then he will be one of the following exceptions
    -Driver not found
    -Connection
    -Some sort of sql exception relevant to any statement.

    To help us with the foregoing you must display the exception and the stack trace.

    If you have another problem like no data showing it is a logic problem - you have a bug in your code, and it probably isn't in the database code (if you are not swallowing exceptions.)

    To help us with the foregoing, you must
    1. Locate the problem area in your database code
    2 send the code database.

    Note that the code database does not include business code GUI and certainly not JavaFx code.

    Another is that you don't have a problem that encompass this forum. However, the first step would be to locate where the application is a failure. Logging can help with that. Or debugging.

Maybe you are looking for

  • Cannot backup machine XP Home Server, when others

    I have a Setup whereby I have 1 Windows 7 (Media Center) cable, 2 laptops (a Vista Business & a Windows XP Home Edition - wireless) and 1 desktop Windows XP Pro (by cable) connected to my network to be saved on my new Windows Home Server.  I was able

  • Cancel password remembers

    I hit the password prompt store by accident and cannot find a way to cancel it. Any information would be appreciated.

  • Why not lemutri scopes show levels greater than 100 or less than 0?

    I got a call back of the Department on the airwaves, but the scopes in the first show all levels within 0 to 100, even cut. I have the video limiter effect and the effect of an adjustment layer levels, but when they receive it the video is over 100 a

  • How do I Zoom in on the location of the cursor?

    I want 'ctrl' and '+' to zoom in on the location of the mouse.I know I can do alt and mosuewheel, but I don't want that.Anyone know how?I have reflected on keyboard shortcuts preferences, but cannot see anything about alt mouse wheel +, so don't know

  • record of update of Photoshop Elements 6

    I have SP6 I bought and registered when it was new and I got new computers. I'm trying to configure this product again in my computer later, but it doesn't allow me to do. I bought PS13 he not so long ago as an upgrade, but it is unfortunately NOT co