Javascript written in Dreamweaver behaves different when inserted in Muse

I have a simple javascript list that is written in Dreamweaver and works as expected but when I copy & paste that exact javascript into the -Object-insert html section in Muse the outcome is different.
Is there a place I can go to research on what I need to do different for that code to behave properly in Muse? I am not understanding what I need to change or do different.
Below is the code I got to work in Dreamweaver:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>list</title>
<script type="text/javascript">
function fixTheList(){
var msg = "";
var msg = "";
if (document.getElementById("appleQty").value > 0) {
msg += "Apples   ";
msg +=document.getElementById("appleQty").value;
msg += "<br>";
if (document.getElementById("orangesQty").value > 0) {
msg += "Oranges   ";
msg +=document.getElementById("orangesQty").value;
msg += "<br>";
if (document.getElementById("tangerineQty").value > 0) {
msg += "Tangerines   ";
msg +=document.getElementById("tangerineQty").value;
msg += "<br>";
if (document.getElementById("kiwiQty").value > 0) {
msg += "Kiwis   ";
msg +=document.getElementById("kiwiQty").value;
msg += "<br>";
if (document.getElementById("pearsQty").value > 0) {
msg += "Pears   ";
msg +=document.getElementById("pearsQty").value;
msg += "<br>";
if (document.getElementById("grapesQty").value > 0) {
msg += "Grapes   ";
msg +=document.getElementById("grapesQty").value;
msg += "<br>";
if (document.getElementById("canteloupeQty").value>0) {
msg += "Canteloupes   ";
msg+=document.getElementById("canteloupeQty").value;
msg += "<br>";
if (document.getElementById("strawberryQty").value>0) {
msg += "Strawberry   ";
msg+=document.getElementById("strawberryQty").value;
msg += "<br>";
document.getElementById("outputDiv").innerHTML = msg;
</script>
</head>
<body>
<div id="outputDiv">
<table>
  <tr>
  <td>Item</td>
  <td>Quantity</td>
  </tr>
  <tr>
  <td>Apples</td>
  <td><input type="text" size="3" id="appleQty"></td>
  </tr>
  <tr>
  <td>Oranges</td>
  <td><input type="text" size="3" id="orangesQty"></td>
  </tr>
  <tr>
  <td>Tangerines</td>
  <td><input type="text" size="3" id="tangerineQty"></td>
  </tr>
  <tr>
  <td>Kiwi</td>
  <td><input type="text" size="3" id="kiwiQty"></td>
  </tr>
  <tr>
  <td>Pears</td>
  <td><input type="text" size="3" id="pearsQty"></td>
  </tr>
  <tr>
  <td>Grapes</td>
  <td><input type="text" size="3" id="grapesQty"></td>
  </tr>
  <tr>
  <td>Cantaloupe</td>
  <td>
  <input type="text" size="3" id="canteloupeQty">
  </td>
  </tr>
  <tr>
  <td>Strawberry</td>
  <td><input type="text" size="3" id="strawberryQty">
  </td>
  </tr>
  </table>
  <input type="button" value="Stack" onclick="fixTheList();">
</div>
</body>
</html>

Hello,
Only difference I see is with the CSS properties of Input tag.
You can define the style for these tag by adding few lines of code right below <title> tag in the code you are pasting in Object > Insert HTML.
For an example you can add codes mentioned below
<style type="text/css">
  input {
    border: thin solid #AAA2A3;
    margin-bottom: 7px;
    margin-left: 9px;
  </style>
As per your requirement you can edit them.
One more advice. Break your codes in to 3 part, Scripts tag, Style tag and Div tag in body.
Insert Div tag in body in Object > Insert HTML
Insert Scripts tag, Style tag in Page > Page Properties >Metadata > HTML for <head>
This will help you avoid any unexpected behavior in preview when you have more stuff inserted in Muse Page.
1. Script tag (Insert it in Page > Page Properties >Metadata > HTML for <head>)
<script type="text/javascript">
function fixTheList(){
var msg = "";
var msg = "";
if (document.getElementById("appleQty").value > 0) {
msg += "Apples   ";
msg +=document.getElementById("appleQty").value;
msg += "<br>";
if (document.getElementById("orangesQty").value > 0) {
msg += "Oranges   ";
msg +=document.getElementById("orangesQty").value;
msg += "<br>";
if (document.getElementById("tangerineQty").value > 0) {
msg += "Tangerines   ";
msg +=document.getElementById("tangerineQty").value;
msg += "<br>";
if (document.getElementById("kiwiQty").value > 0) {
msg += "Kiwis   ";
msg +=document.getElementById("kiwiQty").value;
msg += "<br>";
if (document.getElementById("pearsQty").value > 0) {
msg += "Pears   ";
msg +=document.getElementById("pearsQty").value;
msg += "<br>";
if (document.getElementById("grapesQty").value > 0) {
msg += "Grapes   ";
msg +=document.getElementById("grapesQty").value;
msg += "<br>";
if (document.getElementById("canteloupeQty").value>0) {
msg += "Canteloupes   ";
msg+=document.getElementById("canteloupeQty").value;
msg += "<br>";
if (document.getElementById("strawberryQty").value>0) {
msg += "Strawberry   ";
msg+=document.getElementById("strawberryQty").value;
msg += "<br>";
document.getElementById("outputDiv").innerHTML = msg;
</script>
2. Style Tag (Insert it in Page > Page Properties >Metadata > HTML for <head>)
<style type="text/css">
  input {
    border: thin solid #AAA2A3;
    margin-bottom: 7px;
    margin-left: 9px;
  </style>
3. Div tag in body (Insert in Object > Insert HTML)
<div id="outputDiv">
<table>
  <tr>
  <td>Item</td>
  <td>Quantity</td>
  </tr>
  <tr>
  <td>Apples</td>
  <td><input type="text" size="3" id="appleQty"></td>
  </tr>
  <tr>
  <td>Oranges</td>
  <td><input type="text" size="3" id="orangesQty"></td>
  </tr>
  <tr>
  <td>Tangerines</td>
  <td><input type="text" size="3" id="tangerineQty"></td>
  </tr>
  <tr>
  <td>Kiwi</td>
  <td><input type="text" size="3" id="kiwiQty"></td>
  </tr>
  <tr>
  <td>Pears</td>
  <td><input type="text" size="3" id="pearsQty"></td>
  </tr>
  <tr>
  <td>Grapes</td>
  <td><input type="text" size="3" id="grapesQty"></td>
  </tr>
  <tr>
  <td>Cantaloupe</td>
  <td>
  <input type="text" size="3" id="canteloupeQty">
  </td>
  </tr>
  <tr>
  <td>Strawberry</td>
  <td><input type="text" size="3" id="strawberryQty">
  </td>
  </tr>
  </table>
  <input type="button" value="Stack" onclick="fixTheList();">
</div>
Regards
Vivek

Similar Messages

  • Why does "Link Media" behave differently when used as a keyboard shortcut vs when right clicked???

    Not sure whether anyone else is encountering this, but the "Link Media" command behaves differently when right clicked as opposed to when used as a keyboard shortcut.
    When you right click to select that option for an offline file, you get only the corresponding disconnected source media. But when you execute "Link Media" via a keyboard shortcut, PP brings up a huge list of all other offline media. Why does it only do that when you use the keyboard shortcut for "Link Media" but not when you right click "Link Media".
    I'd like to get the Link Media command to behave via the keyboard shortcut the same way it behaves when right clicked. I don't want to have to deal with relinking a hundred other files, but just the single offline file I'm working on.

    Among the alternatives not mentioned... Using a TiVo DVR, rather than the X1; a Roamio Plus or Pro would solve both the concern over the quality of the DVR, as well as providing the MoCA bridge capability the poster so desperately wanted the X1 DVR to provide. (Although the TiVo's support only MoCA 1.1.) Just get a third-party MoCA adapter for the distant location. Why the hang-up on having a device provided by Comcast? This seems especially ironic given the opinions expressed regarding payments over time to Comcast. If a MoCA 2.0 bridge was the requirement, they don't exist outside providers. So couldn't the poster have simply requested a replacement XB3 from the local office and configured it down to only providing MoCA bridging -- and perhaps as a wireless access point? Comcast would bill him the monthly rate for the extra device, but such is the state of MoCA 2.0. Much of the OP sounds like frustration over devices providing capabilities the poster *thinks* they should have.

  • Executable behaving different when called f/Java

    I have an executable that is run from the command line which behaves differently when I run it from my application. The executable takes MP3s files as arguments and merges them together. When I use large files from within my app, it doesn't respond, but using the same files from the command line works fine. I was thinking it might be a memory thing, but the executable should get its own space seperate from the VM. Does anyone have any suggestions? Thanks!

    I do not have the source for the executable, so I wouldn't be able to pull lines out of there. It works from my Java app when I pass in smaller files, so I know I have the syntax correct, but with larger files it hangs. When I run the same thing from the command line with the larger files it runs like a champ. I was trying to use my task manager (I'm on Win NT) to look at memory usage since the only variable seems to be file size, but nothing seems to indicate it is a memory issue.

  • Code behaves differently when run in debugger

    var he:Array = handControl.getHumanInfo(ha, handNumber);
    while (he.length != 0)
    humanInfo.push(he.shift());
    This snippet is part of a large flash project I am working
    on. The program works fine by itself, but when I try to step
    through it in the debugger, it sometimes crashes, depending on
    where I put a breakpoint. If I put the breakpoint on the first line
    of code above, I can step into the function getHumanInfo(), trace
    it, and step back out, and everything is fine. But if I only put a
    breakpoint somewhere inside the getHumanInfo() function, all of a
    sudden when I step out of that function, the variable 'he' is
    undefined, and so the while loop never ends.
    This makes no sense to me. The code is either good or bad, it
    shouldn't behave differently based on where I put the breakpoint.
    The getHumanInfo() function always creates a new array and
    passes it back, so there is no reason 'he' should be undefined.
    This has happened many times when I've tried to use the flash
    CS3 debugger -- is there a known issue that this sounds like? I'm
    so fed up I'm ready to stop using the debugger altogether.

    I ran the program without the debugger and put some trace()
    statements in, just to make sure. Everything works fine without the
    debugger. So it seems to me it has to be a debugger issue. Has
    anyone heard of a similar issue?

  • Why does terminal behave differently when logged in as different users?

    when I'm logged into my mba as my regular normal user, bash behaves normally;  but when I create a new user or use any user other than my default the behavior is different.  (might be bash or sh)
    Specifically, the tab autocomplete function works fine when I'm logged in as my regular user (tab-complete;  tab twice for all available selections/options).
    But on a newly-created user (also an admin) there is no tab complete, no 'tab twice, other options' etc. 
    Has anyone else seen this?
    I searched in this forum and found some instructions for creating an .inputrc file but I don't appear to have one on my default user so not sure why I would need this on the new user ?!?!?
    p.s. here are the instructions I found previously via a post on this forum:
    http://www.ernieflores.net/osx-page-4/how-to-enable-tab-completion-in-mac-os-x-t erminal/

    Done!  Thanks!
    https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/6/wo/iLhrfiEtEJtPFTt J8S23O0/23.83.28.0.9
    https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/6/wo/iLhrfiEtEJtPFTt J8S23O0/23.83.28.1.9

  • Dreamweaver CS6 Crashes when Inserting... anything

    I've been encountering this problem frequently. When I use the Insert menu, whether from the menu bar or from the quick tab panel, (usually) Dreamweaver crashes. It happens with flash videos, form elements, you name it. There's no error message, just a windows alert stating that Dreamweaver CS6 has encountered a problem and needs to shut down. Checks for solution, and fails.
    So, has anybody else encountered this? I don't even know where to start, since there's no alert getting thrown by DW, and it doesn't stop responding either. It just goes from working to dead.
    Thanks

    Thanks for the replies. No, I'm not running any extensions. Everything is right "out of the box". Meaning, how I downloaded it from Adobe. I checked the extension manager anyway, not much to see there...
    As for deleting te personal cache, the walkthrough for locating and removing that file is inconsistent with my system. As stated, I'm running Win7, but there is no winFileCach.******.dat file on my C: drive. I've turned on hidden file visibility, and searched three times while writing this reply, just to make sure I'm not overlooking something simple. But I'm not finding anything.
    The one configuration folder I did delete, as I suspected, broke Dreamweaver entirely, but that was an easy fix. I knew what was wrong, lol.

  • Code behaves different when SWF is in browser as opposed to stand alone player, why?

    In ActionScript, I have some code that dispatches a
    MOUSE_OVER event when a tween is complete. I am using Tweener for
    the tween. On my Mac OSX machine, I preview the SWF file in a stand
    alone player spawned from my Flash IDE, and the event is dispatched
    and the behavior works as expected, but when I preview the SWF file
    as embedded in a MacOSX browser, the event is not dispatched. On a
    Windows machine, however, the event is dispatched both in a stand
    alone player and within the embedded SWF file in a browser. The
    problem seems to come particularly from the Mac OSX player.
    Has anybody ever experienced this? Is the OSX implementation
    of the Flash player different in a stand alone and browser setting?
    Here is the code that I am using:

    HMMM! Verrrrrry interesting.
    Yes file size is an issue, it's a large project.
    Exterenally host it?
    Where could I go and do that?
    I'm not familiar with this process.  Can you please tell me exactly how it works? 
    And....that means both servers need to be up and running?  Kinda sounds a bit shakey.   This project needs to be strong and stand alone to go here and there.  Durable.   
    I feel safer if its all in one piece.  Bam.
    You know, I noticed "FAST" and "BEST" does not make a difference to file size or quality. 
    Could I be wrong?
    Thanks.

  • Stored Procedure behaves differently when activation is on?!

    Hi,
    I have got a simple stored procedure for testing purposes. When Activation is off and I run this sp myself it works correct, but when I set activation to on and send a message, the message is being pulled from the queue and I think this can only be done
    by the activated sp but the insert into (see sp) is not done.
    here is stored procedure:
    as
    declare
    @message_bodyasxml;
    declare
    @message_typeassysname;
    declare
    @dialogasuniqueidentifier;
    while
    (1=1)
    begin
    waitfor
    receivetop(1)
    @message_type=message_type_name,
    @message_body=cast(message_bodyasxml),
    @dialog=conversation_handle
    fromdbo.MADClaimCallHistoryQueue
    ),timeout2000;
    if
    (@@ROWCOUNT=0)
    begin
    print'rowcount
    = 0'
    break;
    end
    if
    (@message_type='http://schemas.microsoft.com/SQL/ServiceBroker/EndDialog')
    endconversation@dialog;
    elseif
    (@message_type='http://schemas.microsoft.com/SQL/ServiceBroker/Error')
    begin
    print'Dialog
    Error dialog #'+cast(@dialogasnvarchar(50));
    endconversation@dialog;
    end
    elseif
    (@message_type='InsertMessage')
    begin
    print'insert';
    insertintoMADLog.dbo.SBTest(xmlvar)
    select@message_body
    endconversation@dialog;
    end
    end

    the stored procedure is executed as SELF.

  • Siena - Gallery control behaving differently when data is filtered?

    I have a gallery control populated by a dataset that contains images and text. In my app I have two dropdowns that I use to filter the contents of the gallery. When the gallery is showing 'all' (nothing filtered out, selecting an image in the gallery
    results in the selected item moving to the top of the gallery. However, when the dataset is filtered, I get a different result:
    1. If the dataset it small enough to be visible on the screen, the selected image stays in place and is visible
    2. If the dataset is bigger than what can be viewed on the screen, selecting an image in the gallery results in the selected image being scrolled off screen
    Any ideas on how to program the selection behavior to make it consistent?

    Also, here is the filter I am applying to the dataset:
    If(Dropdown_Location_Filter!Selected!Value="ALL", BUSINESS_LIST_1,Filter(BUSINESS_LIST_1, NEIGHBORHOOD=Dropdown_Location_Filter!Selected!Value))

  • Java application behaving differently when run from netbeans

    Hi,
    When i run my program from netbeans it receives packets from ip addresses which are not in my subnet
    but when i run it from outside netbeans it doesn't receives packets from ip addresses which are not in my subnet.
    Can anybody explains why my application is showing different behavior when run from netbeans and when run independently?
    Thanks.

    Bingo! My script started the rmiregistry and continued on to start the servers. Apparently, it was too quick. I put a 10 second delay after the rmiregistry startup and all is working as it should.
    Thanks for your help. You get the Duke dollars if I can figure out how that works.

  • Applescript in Automator behaves differently when executed from inside Automator, or as an Automator application

    Hello everyone,
    I'm trying to execute an Automator workflow at startup, which I do by saving the workflow as an application, and adding it to the startup list, this works fine.
    My workflow works fine when executed from within Automator (ie clicking on the "Execute" button), but does not anymore when the Automator application is executed (ie. simply double clicking on my Automator file)
    I have narrowed it down to an Applescript inside my workflow which fails only when the application is executed from the finder (the step works fine from within Automator). The script automatically creates an ad hoc wifi network.
    The line which specifically fails is :
    set menu_extras to value of attribute "AXDescription" of menu bar items
    Anyone has any idea why executing the workflow from within automator, and executing it from the finder yield different results ?
    The crazy thing is that all this worked fine up until a few days ago, there might have been an update since (running Mavericks 10.9.2), but nothing game-changing.

    You will need to provide more than the one line of AppleScript you quote if you want a definitive answer.  (We can't even see which app you are addressing this to.)

  • 'create table..' statement behaves differently when alone or in a SP

    hello
    sorry for the title, I just couldnt think of a better description of the problem in very few words...
    the problem I have is:
    I created a stored procedure into the oracle db, and this procedure has the following code inside it:
    auxsql := 'create table tmp (id smallint, name varchar2(256))';
    execute immediate auxsql;
    - now this procedure I call from a java class, using a callable statement
    when I call the stored procedure, I get this message:
    ORA-01031: insufficient privileges (at the line containing the execute instruction)
    my dillema arises from the fact that if I change my callable statement to execute a query of the form:
    auxsql := 'create table tmp (id smallint, name varchar2(256))';
    execute immediate auxsql;
    - but executed as is, not embedded in a sp or something;
    - so if I change to execute simply this, all goes well....
    I would much appreciate if anyone knew at least where to start looking.
    Thank you,
    Silviu Lipovan Oanca
    p.s. for any further details, just say.
    Message was edited by:
    silviulipovan

    In all probability, the user that owns the stored procedure has the CREATE TABLE privilege through a role, not granted directly. In PL/SQL blocks (assuming definer's rights), only direct privilege grants are "visible", whereas straight SQL statements also "see" privileges granted through a role.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • PA30 and ESS behave differently when updating other bank details

    I am trouble shooting an issue with maintaining other bank details in ESS. In PA30 when a other bank details record is updated SAP code just updates the record with new data. it will change the date changed to sy-datum with no changes to the begda and endda,
    In the case of ESS a new enrty is created in created in the PA0009 so now we have 2 active banks. please help

    Hi,
    You need to implement BADI "HRXSS_PER_BEGDA"
    Please find the following SPRO path
    Personnel Management-> Employee Self-Service -> Service-Specific Settings -> Own Data -> Change Default Start Date
    Change Default Start Date
    Use
    In this IMG activity, you can specify a certain date as the default value for the start date of data records in the Own Data area. You can specify the following dates:
    A date that will be displayed as the start date on the overview page
    A date from which the user can maintain his or her personal data
    You can thus specify whether a user can change only present and future dates or if he/she can also change data records whose validity periods are in the past.
    For example, if a customer wants to allow their employees to maintain their family dependents information as of the previous year, the customer can implement this BAdI specifying the date from which employees can maintain their family data.
    Requirements
    The current system date is currently set as the default value. You can overwrite this setting with a date of your choice.
    Activities
    To change the default start date, you can use the Business Add-In (BAdI) HRXSS_PER_BEGDA. You can set the date in the DEFAULT_DATE method.
    Parameters of the method DEFAULT_DATE:
    MOLGA (Importing)
    PERNR (Importing)
    INFTY (Importing)
    SUBTY (Importing, optional)
    BEGDA (Changing)

  • IDOC : Interface behaves differently when updated via external system

    Hi,
    I have a z idoc function module to update customer master table. z function module was created coping the standard fucntion and added a additional logic.
    Now when the idoc from other non sap system hits sap, the tables are not updated as expected by the logic but updated the tables when it used to update with standard function module.
    When I reprocess the same idoc through we19, it updates correctly.
    Am i missing something please help.
    Thanks

    I created a zprocess code and assigned it to inbound parameters in partner profiles settings. and z process code is assigned to z funtion module.

  • Flex app behaves differently when Adobe automation files loaded

    We have an application built with Flex 3.1. I am attempting to create QTP tests for this application.  The instrumentation files are loaded at run time, not compiled into the application.
    I am using QTP 9.5 with the Adobe Flex Add-in 3.0.  I am able to see the controls an run tests to some extent.
    The main issue I am trying to resolve is that there is a difference in behavior of the application when it is started with the instrumentation files. The differences occur both inside and outside of the QTP environment.
    The observed differences are:
    The initial page is a login screen. After entering the id and password, I can click ‘Enter’ or click the “Log in” command button. With the instrumentation files loaded, the ‘Enter’ key no longer works.
    When I log out of the application, a progress screen displays while the environment clean-up occurs.  When the progress bar hits 100%, the original login screen is displayed. With instrumentation files loaded, activity stops when the progress bar hits 100% and the original login screen is never displayed.
    After logging in, a window with perspective tabs displays.  Each perspective tab page contains a window containing a list of resource associated with the perspective. When instrumentation files are loaded, the tab pages exist, but the perspective windows are not created.
    I realize I am dealing with application-specific behavior here and I am pursuing this with our developers. What I am looking for is any information related to differences in application behavior when instrumentation files are loaded.

    I can't seem to reproduce what you are seeing with this sample application:
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark">
        <s:states>
            <s:State name="state1" />
            <s:State name="state2" />
        </s:states>
        <s:controlBarContent>
            <s:Button label="change state" click="currentState=currentState=='state1'?'state2':'state1'" />
        </s:controlBarContent>
        <s:Button x="50" y="50" label.state1="state1" label.state2="state2" skinClass="CustomButtonSkin" />
    </s:Application>
    Can you provide a similar sample application that demonstrates the issue?

Maybe you are looking for

  • Error 3194 every time i try to update my iphone 4

    hi i am getting error messge everytime i try to update my iphone 4 to 4.3.2, error 3194. i have been trying all day long today, in 3-4 computers. i tried many ways, recovery mode and dfu mode etc.. still no luck. Please help, what should i do.

  • Epson R220 & Leopard  "Print CD Program"

    I just installed Leopard my Mac Pro, But I am having problems printing directly on CD's with my EPSON R220 Printer. I am using Epson's "Print CD" and Roxio/Toast "Disc Cover RE" and everytime i go to print I get the following message: "The EPSON prin

  • HD and Fans

    WOuld switching the internal HD from a 5400 to a 7200 rpm on a MBPro kick start the fans a little more often or is it simply my impression? The unit seems to run a little hotter, but then again, I could be mistaken.

  • The date should be divided based on the month

    Hi Team,                I have two fields A and B.Iam fetching vbeln and erdat from VBAK.it is in the Format YYYY/MM/DD. suppose i get the values from 2009/10/01 to 2009/11/18. Now all the values from 2009/10/01 to 2009/10/31 should be in A. The valu

  • CreateImage problem

    Hi, I'm trying to create an Image of a swing component and then display that Image. It seems that createImage doesn't really create anything. The following program demonstrates my problem: import java.awt.*; import javax.swing.*; public class ImageVi