Dreamweaver multiscreen preview Javascript error

Hello, I am having trouble with JavaScript in multiscreen and Live View. When I add the following script to my site to redirect to my mobile site
<script type="text/javascript">
<!--
if (screen.width <= 720) {
document.location = "/mysite.html";
//-->
</script>
it works as expected in the in the browser, redirecting only phones, but in Dreamweaver, the redirect is triggered every time I enter live view or multiscreen preview, regardless of the viewport size I have set. Is there something I am doing wrong?

Probably not.
DW's Live View really isn't a true browser, it's "most" of a Webkit browser. Live View really doesn't offer much more than an approximation of a Webkit rendering.
If it acts correctly in the actual browsers when you hit Preview In Browser, you're likely in the clear.

Similar Messages

  • Dreamweaver 6.1 - JavaScript error when switching between open tabs

    When switching between open tabs a sequence of javascript
    errors occurs. I had not used Dreamweaver for about 2 weeks, and
    last time I used it with no problems.
    I have tried uninstalling it, OKing removal of all files when
    asked, re-installing it and updating with dwmx61_updater.exe, but I
    still get the same errors.
    This has rendered the software virtually unuseable, so any
    help would be greatly appreciated, as I'm working to a
    rapidly-approaching deadline.
    "While executing Browse_Back enabled in toolbars.xml, a
    JavaScript error occurred"
    followed by
    "While executing Browse_Forward enabled in toolbars.xml, a
    JavaScript error occurred"
    followed by
    "While executing Browse_Stop enabled in toolbars.xml, a
    JavaScript error occurred"
    The relevant code seems to be :
    <!-- Browser nav toolbar -->
    <toolbar id="Browser_Toolbar" platform="win"
    label="Browser Navigation" container="document"
    initiallyVisible="false">
    <button id="Browse_Back"
    image="Toolbars/images/MM/back.gif"
    disabledImage="Toolbars/images/MM/back_dis.gif"
    tooltip="Back"
    label="Back"
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('back')"
    command="dw.getDocumentDOM().browser.backPage()"
    update="onEveryIdle"/>
    <button id="Browse_Forward"
    image="Toolbars/images/MM/forward.gif"
    disabledImage="Toolbars/images/MM/forward_dis.gif"
    tooltip="Forward"
    label="Forward"
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('forward')"
    command="dw.getDocumentDOM().browser.forwardPage()"
    update="onEveryIdle"/>
    <button id="Browse_Stop"
    image="Toolbars/images/MM/stop.gif"
    disabledImage="Toolbars/images/MM/stop_dis.gif"
    tooltip="Stop"
    label="Stop"
    enabled="dw.getDocumentDOM().browser.getPageBusy()"
    command="dw.getDocumentDOM().browser.stopPage()"
    update="onBrowserPageBusyChange"/>
    <button id="Browse_Refresh"
    image="Toolbars/images/MM/browserRefresh.gif"
    tooltip="Refresh"
    label="Refresh"
    enabled="true"
    command="dw.getDocumentDOM().browser.refreshPage()"/>
    presumably the next error is caused by the previous ones
    failing :
    "While executing getCurrentValue in AddressURL.htm, a
    JavaScript error occurred"
    the relevan tcode :
    function getCurrentValue()
    var dom = dw.getDocumentDOM();
    var value = dom.browser.getURL();
    if (value && value.length)
    //check if is it not a temp file
    //extract the tail of the url
    var filename = value;
    var slashIndex = filename.lastIndexOf("/");
    filename = filename.substring(slashIndex+1);
    var tempIndex = filename.indexOf("TMP");
    if (tempIndex != 0)
    addRecentAddress(value);
    return value;

    You can try this simple fix -
    Quit DW.
    Find this folder -
    C:\Documents and Settings\<username>\Application
    Data\Macromedia\Dreamweaver
    8\Configuration\WinFileCache-*.dat
    (these folders are normally hidden - you may have to use
    Explorer > Tools >
    Folder Options to unhide them)
    and delete it.
    Restart DW. Works better?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "earthdoctor" <[email protected]> wrote in
    message
    news:[email protected]...
    > When switching between open tabs a sequence of
    javascript errors occurs. I
    > had
    > not used Dreamweaver for about 2 weeks, and last time I
    used it with no
    > problems.
    >
    > I have tried uninstalling it, OKing removal of all files
    when asked,
    > re-installing it and updating with dwmx61_updater.exe,
    but I still get the
    > same
    > errors.
    >
    > This has rendered the software virtually unuseable, so
    any help would be
    > greatly appreciated, as I'm working to a
    rapidly-approaching deadline.
    >
    >
    > "While executing Browse_Back enabled in toolbars.xml, a
    JavaScript error
    > occurred"
    > followed by
    > "While executing Browse_Forward enabled in toolbars.xml,
    a JavaScript
    > error
    > occurred"
    > followed by
    > "While executing Browse_Stop enabled in toolbars.xml, a
    JavaScript error
    > occurred"
    >
    > The relevant code seems to be :
    >
    > <!-- Browser nav toolbar -->
    >
    > <toolbar id="Browser_Toolbar" platform="win"
    label="Browser
    > Navigation"
    > container="document" initiallyVisible="false">
    >
    > <button id="Browse_Back"
    > image="Toolbars/images/MM/back.gif"
    > disabledImage="Toolbars/images/MM/back_dis.gif"
    > tooltip="Back"
    > label="Back"
    >
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('back')"
    > command="dw.getDocumentDOM().browser.backPage()"
    > update="onEveryIdle"/>
    >
    > <button id="Browse_Forward"
    > image="Toolbars/images/MM/forward.gif"
    > disabledImage="Toolbars/images/MM/forward_dis.gif"
    > tooltip="Forward"
    > label="Forward"
    >
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('forward')"
    > command="dw.getDocumentDOM().browser.forwardPage()"
    > update="onEveryIdle"/>
    >
    > <button id="Browse_Stop"
    > image="Toolbars/images/MM/stop.gif"
    > disabledImage="Toolbars/images/MM/stop_dis.gif"
    > tooltip="Stop"
    > label="Stop"
    > enabled="dw.getDocumentDOM().browser.getPageBusy()"
    > command="dw.getDocumentDOM().browser.stopPage()"
    > update="onBrowserPageBusyChange"/>
    >
    > <button id="Browse_Refresh"
    > image="Toolbars/images/MM/browserRefresh.gif"
    > tooltip="Refresh"
    > label="Refresh"
    > enabled="true"
    > command="dw.getDocumentDOM().browser.refreshPage()"/>
    >
    >
    >
    > presumably the next error is caused by the previous ones
    failing :
    >
    > "While executing getCurrentValue in AddressURL.htm, a
    JavaScript error
    > occurred"
    > the relevan tcode :
    >
    >
    > function getCurrentValue()
    > {
    > var dom = dw.getDocumentDOM();
    > var value = dom.browser.getURL();
    > if (value && value.length)
    > {
    > //check if is it not a temp file
    > //extract the tail of the url
    > var filename = value;
    > var slashIndex = filename.lastIndexOf("/");
    > filename = filename.substring(slashIndex+1);
    > var tempIndex = filename.indexOf("TMP");
    > if (tempIndex != 0)
    > {
    > addRecentAddress(value);
    > }
    > }
    > return value;
    > }
    >
    >

  • Cs6 dreamweaver - javascript error with Clean up Word HTML . . .

    Very recently upgraded to CS6 from CS5.5. Every now and then, I have to run the Clean up Word HTML Commands function for a client. Never had a problem before. This time, I got this message:
    While executing onClick in Clean Up Word HTML.htm, the following JavaScript error(s) occurred:
    At line 2012 of the "Macintosh HD:Applications:Adobe Dreamweaver CS6:Configuration:commans:Clean Up Word HTML.js"
    The object is not currently contained in a document.
    I searched through the Discussions and found refernce to deleting MacFileCache-###.dat file in the Library Configuration folder for Dreamweaver CS 6. Did that, same thing. It also mentioned deleted the entire Configuration folder. Same result.
    I called tech support and was directed to go through the (count 'em) 14 steps on the Troubleshoot JavaScript page -- http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html. Still no luck.
    Anyone else out there having this problem? What am I missing? Help!
    Thanks, Tim

    Hi SnakEyes02,
    That could be. Let me know when you have grabbed these. They were Word docs that I saved the same way I always have done (Save As, Format: Web Page (.htm)), creating .htm files that work in CS5.5 Dreamweaver and earlier versions.
    http://test.babysneaks.com/WordHTML1.htm
    http://test.babysneaks.com/WordHTML2.htm
    Thanks for your help. Tim

  • Dreamweaver javascript error

    Hellop
    When opening dreamweaver, it says
    javascript error occured : can 't open the script file :"C:\programfiles(x86)...\DesignTime\EditingUtils.js (error2)
    In fact, the file EditingUtils.js si missing
    how can i solve this ?

    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html

  • Dreamweaver CC wont work Javascript Errors

    This just started withing the last few days. It might be due to a restore I did on my Mac from a time capsule. It's the only thing I can think of.
    "Unable to open script file" Macintosh HD:Applications:Adobe Dreamweaver CC:Configuration:Shared:MM:Scripts:CMN:..." and a number of .js files within this folder like string.js, TemplateUtils.js and others because they are missing. the folder is empty...
    I can't use the program because these notices pop up non-stop.
    I looked at this help article "http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html# main_special_char" but it doesn't seem to apply to CC, at least the locations seem to be different.
    How can I get these files?
    Thanks

    It applies to CC, the locations are the same you have to turn on hidden files to see the folder you need to access.
    #4 from that list usually takes care of Javascript errors when opening the program.
    Here's a better page for that info: http://forums.adobe.com/thread/494811
    Turning on hidden files is a bit trickier on a Mac I guess, but one of these should work for you...
    http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/
    http://guides.macrumors.com/Viewing_hidden_files_on_a_Mac

  • Multiple JavaScript errors Dreamweaver CC 2014

    I'm getting multiple JavaScript
    errors Dreamweaver CC 2014 How to fix?@

    https://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Start with #12 & #4 and go through the rest only if necessary.

  • "While executing applyBehavior in Swap image.htm, a JavaScript error occurred."

    What should be a simple web update is turning into a nightmare. I can't select any of my images to apply onMouseOver Swap Image behaviors, and I keep getting the message above.
    Can I just say right now that I hate Dreamweaver CS6 and what it's doing to this project?
    Ugh!

    Is this a plea for help or a rant?
    Javascript Errors in CS4, CS5, CS6 (the whole enchilada of trouble shooting)
    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Start with #4, #10 and #12
    Nancy O.

  • Javascript error occurred when create a dynamic table

    Hi all,
    I try to create a dynamic table using the created recordset,
    but I get the javascript error message "While executing insertObject in DynamicTable.htm, a Javascript error occurred."
    How to fix it? I tried to delete the cache file in Configuration folder but it is not work..
    Any idea? Thanks a lot!

    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Try 12 & 4 and then go through the rest.

  • Delete Record, Javascript error

    Hi everyone
    Just wondering if you can help.  I am getting 2 javascript errors in dreamweaver when I try to enter a delete record using server behaviour.
    They are (in order they appear)
    While executing onblur in DeleteRecord.htm, the following javascript error(s) occured:
    In file "DeleteRecord":
    updateUI is not defined
    Then when I click OK, i get the following
    While executing onblur in DeleteRecord.htm, the following javascript error(s) occured:
    In file "DeleteRecord":
    initializeUI is not defined
    This is happening in all sites and pages.
    I have rebuilt the local configeration files and recreated DAT file etc but am now out of ideas.
    Anyone know of a solution for this??
    Much thanks in advance.

    Here's the full KB article.  Start with 12 & 4 and then go through the rest.  One of those is always the answer:
    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html

  • Javascript error at startup, file open and shutdown

    I am using Dreamweaver CC on Windows 7, 64-bit.  Starting with the last CC update to Dreamweaver, I get a javascript error at DW startup, file open and DW shutdown.  The application seems to work fine, but the errors happen everytime and are always the same.  At startup, it complains that a variable bcinit does not exist in file "BusinessCatalyst."  At file open, the error is in file "_onOpen" onOpen is not defined and at shutdown, in file "TeamAdminTempDelete" delTempFile is not defined.
    I have no idea what is going on.  Any suggestions?
    Thanks

    HAve you tried troubleshooting the Javascript errors :http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-d reamweaver-cs4.html

  • CS6: Edit - Keyboard Shortcuts javascript error

    Does anyone know how to fix this:
    In CS6, when I right-click a new snippet and select Edit Keyboard Shortcuts, I just get a javascript error, the same error I get if I try to create a keyboard shortcut directly from the menu at the top of the screen, Edit -> Keyboard Shortcuts.
    The error is "At line 321 of <path>\Keyboard Shortcuts.js getMenuTree: Argument number 1 is invalid."
    After that, where the list of standard shortcuts should appear, the list is blank. All the other built-in shortcuts also are blank, and trying to duplicate the standard set  just creates a blank set and doesn't let me add anything. Deleting Dreamweaver's cache file, the blahblah.dat thing, doesn't fix it.

    Troubleshoot JavaScript errors.  Start with steps 10 & 12.
    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Nancy O.

  • JavaScript Error when adding Insert Record Server Behaviour

    Hello,
    I have searched the Internet and the Adobe Community but have yet resolved a problem.
    Everytime I go to Server Behaviours and choose Insert Record I get this error:
    I have never had this error before and I have used the function many times. Some people are saying it is corrupt configuration files, which I have deleted and still the error persists.
    I am now stuck and cannot do any more work until I have fixed this problem. Any help would be greatly recieved.
    Just so you know I am running Dreamweaver CS5 on Windows 8.1 Enterprise.
    Many thanks

    Below is the whole enchilada on JS Errors.  Start with #6 and #10.
    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html
    Nancy O.

  • Javascript errors on opening DW6

    when opening Dreamweaver I get the following error dialog boxes appear
    On DW startup;
    error dialog says: While executing onLoad in BusinessCatalyst.htm, the following JavaScript error(s) occurred:
    In file “BusinessCatalyst”:
    bcinit is not defined
    As the interface finishes loading;
    error dialog says: The Following JavaScript error(s) occurred:
    At line 17 of file “C:\Program Files (x86)\Adobe\Abode Dreamweaver CS6\Configuration\Shared\BC\JS\bc_ui_utilis.js”:
    MM.BC has no Prpoerties
    After DW loads opeing a file gives this error;
    error dialog says: While executing onLoad in bc_onOpen.htm, the following JavaScript error(s) occurred:
    in File “bc_onOpen”:
    onLoad is not defined
    thank for any assistance, I have uninstalled and reinstalled both Java and DW6

    Nothing to do with Java.
    Javascript is entirely different and Dreamweaver relies heavily on it.
    Try steps #4 and #12 here
    http://helpx.adobe.com/dreamweaver/kb/troubleshoot-javascript-errors-dreamweaver-cs4.html

  • I am getting JavaScript Errors when I attempt to use the Multiscreen Preview function in DW CS 5.

    When I attepmpt to use the Multiscreen Preview button in DW CS 5 I get the following error:
    "While executing onShow in MultiscreenPreview.htm, the following JavaScript error(s) occured:
    In file "Multiscreen Preview":
    onShow is not defined"
    This leads to either an unusable multiscreen preview box or another series of similar JavaScript errors.
    Is there a solution to this problem and if so what is it?
    Thank you for your time.

    Follow this KB article:
    http://kb2.adobe.com/cps/405/kb405604.html
    Start with 12 & 4 and then go through the rest if needed.

  • Javascript error message loading dreamweaver mx

    this may be two different questions but here goes:
    -- i downloaded the interakt kollection a while back and just
    got time to use it. by now i noticed that a newer version was
    available so i downloaded it. but it crashed my machine trying to
    update. and an error message now comes up about a javascript error
    trying to load one of the interakt files. i put the system back 24
    hours but the same error comes up. i click okay and dreamweaver mx
    continues, but what does it mean?
    -- i'm just starting php programming and perform the simplest
    function, saving a .php site in apache2\htdocs and a file within
    the site. but when i try to run the php from the livedata view, i
    get a http 404 message about the doc not found. no wonder: the doc
    is not the one i saved, but has a longer file name. tried this a
    couple of times with different file names and the same thing
    happens. suggestions please.
    thanks,
    michael

    Michael
    You may need to uninstall and then reinstall DW &
    Interakt. The issue that
    you are probably running into is that Interakt changed some
    of the DW files
    which worked until the DW 8.02 update came out, and rewrote
    those files. The
    Interakt updater probably relies on finding the updated DW
    files.
    When you preview a file DW creates a temporary version of it,
    and runs that,
    and then deletes it. You can not reference these temporary
    versions in any
    other way.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "hconnorjr" <[email protected]> wrote in
    message
    news:ef9hkr$5ac$[email protected]..
    > this may be two different questions but here goes:
    >
    > -- i downloaded the interakt kollection a while back and
    just got time to
    > use
    > it. by now i noticed that a newer version was available
    so i downloaded
    > it. but
    > it crashed my machine trying to update. and an error
    message now comes up
    > about
    > a javascript error trying to load one of the interakt
    files. i put the
    > system
    > back 24 hours but the same error comes up. i click okay
    and dreamweaver mx
    > continues, but what does it mean?
    >
    > -- i'm just starting php programming and perform the
    simplest function,
    > saving
    > a .php site in apache2\htdocs and a file within the
    site. but when i try
    > to run
    > the php from the livedata view, i get a http 404 message
    about the doc not
    > found. no wonder: the doc is not the one i saved, but
    has a longer file
    > name.
    > tried this a couple of times with different file names
    and the same thing
    > happens. suggestions please.
    >
    > thanks,
    >
    > michael
    >
    >

Maybe you are looking for

  • Backup of the OS to a USB flashdrive

    I rather restart from scratch, and reinstall Windows 8 on my B580 i5 I saw, in another post, this http://support.lenovo.com/en_US/downloads/detail.page?DocID=HT076024 The idea is to create a USB flash drive with the OS to reinstall. The method says:

  • Package javax.microedition.midlet does not exist

    Hi: I am trying to run the Currency Converter MIDlet. I am using SUnONE4. I have got all the updates for the SUN ONE. When I compile the Converter directory.. i get the following errors.. which indicate that it can't find the javax.micoredition..pack

  • HT201302 How to delete all pictures in Camera Roll at once?

    How to delete all pictures in Camera Roll at once?

  • Adobe Elements 13 upgrade will not install

    Adobe Elements upgrade to 13 will not install on any other drive but C:\ even though I designated another drive in the installer. It only installs on C:\ and I DO NOT HAVE SPACE ON C. It is replacing Adobe Elements 10 which did install successfully o

  • Problems with latest itunes update

    After installing the itunes update yesterday I cannot connect to my apple devices or connect to the itunes store. I get an error message telling me the Bonjour service has not started ( when I check on services, it clearly has). also my processor sta