Dreamweaver adding unwanted javascript

I have been having a problem for a while now where even
though I have moved my javascript to an external file and inserted
a standard link to this javascript file in the <head> area of
a site template Dreamweaver intermittently adds the javascript
itself back to the template thereby applying it to the various
pages in the site on saves. Sometimes clearing the javascript out
of the <head> area of the template and applying the template
to the pages in the site clears the offending javascript out,
sometimes not. The pages function as desired without the javascript
added back, in other words the link to the external file works.
I would like to keep the javascript (only a few lines to
allow image swapping for rollovers) in an external file in order to
keep the page code clean but Dreamweaver keeps occasionally adding
it back.
Here is the actual code I am using to link to the external
file from the <head> section: (<script
type="text/javascript"
src="javascript/script.js"></script>). I am using
Dreamweaver version 8.
Has anyone else experienced this behavior? Any
solutions?

> Has anyone else experienced this behavior? Any
solutions?
It's a known issue with legacy versions of DW. There is no
workaround that
I know of. It will happen with non-templated pages, as well.
It only happens when you EDIT a behavior that is in the
external javascript
file.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"deruand" <[email protected]> wrote in
message
news:frpkhv$oiv$[email protected]..
>I have been having a problem for a while now where even
though I have moved
>my
> javascript to an external file and inserted a standard
link to this
> javascript
> file in the <head> area of a site template
Dreamweaver intermittently adds
> the
> javascript itself back to the template thereby applying
it to the various
> pages
> in the site on saves. Sometimes clearing the javascript
out of the <head>
> area
> of the template and applying the template to the pages
in the site clears
> the
> offending javascript out, sometimes not. The pages
function as desired
> without
> the javascript added back, in other words the link to
the external file
> works.
>
> I would like to keep the javascript (only a few lines to
allow image
> swapping
> for rollovers) in an external file in order to keep the
page code clean
> but
> Dreamweaver keeps occasionally adding it back.
>
> Here is the actual code I am using to link to the
external file from the
> <head> section: (<script type="text/javascript"
> src="javascript/script.js"></script>). I am
using Dreamweaver version 8.
>
> Has anyone else experienced this behavior? Any
solutions?
>

Similar Messages

  • Dreamweaver adding div height in tooltip?

    I dont normally use dreamweaver, but I must for this project,
    in dreamweaver for some bizarre reason the tooltip says height 50px
    (54px) and has added 4pxs to an image in a div. Anyone know why? It
    aligns in the browsers, IE 6, firefox, but why has dreamweaver
    added these 4 pixels and given it a gap in dreamweaver?
    Picture example:
    http://homepage.ntlworld.com/spensley/dreamweaverbug.jpg
    anyone know why and what this is all about?
    The css:
    #logo{
    top: 30px;
    width:126px;
    height: 51px;
    padding:0px;
    float: left;
    html:
    <div id="logo"><a href="index.html"><img
    src="media/images/gtfLogo.jpg" title="GTF logo" alt="GTF logo
    design" longdesc="three circles showing the letters G, T and F in
    orange and green" width="126"
    height="51"/><a/></div>

    Oops - sorry - missed the CSS.
    You have a munged <a> tag -
    orange and green" width="126" height="51"/><a/></
    should be -
    orange and green" width="126" height="51"/></a></
    Does that solve the problem?
    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
    ==================
    "spongebobcirclepants" <[email protected]>
    wrote in message
    news:[email protected]...
    > <?xml version="1.0" encoding="utf-8"?>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Strict//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml"
    xml:lang="en" lang="en">
    > <head>
    > <title>GTF - Gardens, Tools &
    Furniture</title>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=UTF-8" />
    > <meta name="keywords"
    >
    content="tools,gardens,furniture,spades,water,toys,toy,gardening,uk,giant
    >
    toys,giant,lawnmowers,tool,diy,outdoor,outdoors,pool,shovels,hoses,hose,fish,aqu
    > atics,benches,tables,chairs" />
    > <meta name="description" content="GTF Company Site"
    />
    > <meta name="author" content="Roy Spensley" />
    >
    > <link rel="stylesheet" type="text/css"
    href="style/textformat.css"/>
    > <link rel="stylesheet" type="text/css"
    href="style/layout.css"
    > title="default"
    > />
    >
    > </head>
    >
    > <div id="wrapper">
    >
    > <div id="topSpace"></div>
    > <div id="logo"><a href="index.html"><img
    src="media/images/gtfLogo.jpg"
    > title="GTF logo" alt="GTF logo design" longdesc="three
    circles showing the
    > letters G, T and F in orange and green" width="126"
    > height="51"/><a/></div>
    > <div id="logoRight"></div>
    > </div>
    > </body>
    > </html>
    >
    >
    > css
    >
    >
    >
    > /*BODY*/
    >
    > body{
    >
    > margin-top:0px;
    >
    > margin:0px;
    >
    > left:0px;
    >
    > padding:0px;
    >
    > font-family: arial, Helvetica, sans-serif;
    >
    > font-size: 100.1%;/*fixes bug in IE*/
    >
    > color:#333333;
    >
    > text-align: center;
    >
    > background-color: #666666;
    >
    > overflow: auto;
    >
    > }
    >
    > /*ALL IMAGES*/
    >
    > img{
    >
    > border-style: none;
    >
    > }
    >
    >
    > /*CONTAINING WRAPPER*/
    >
    > #wrapper{
    >
    > width: 800px;
    >
    > margin-top: 0px;
    >
    > height: 597px;
    >
    > background-color: #000;
    >
    > margin: 0 auto; /*This will now centre in firefox as
    well*/
    >
    > }
    >
    > #topSpace{
    >
    > width: 100%;
    >
    > height: 30px;
    >
    > padding:0px;
    >
    > background-color: #fff;
    > }
    >
    > #logo{
    >
    > top: 30px;
    >
    > width:126px;
    >
    > height: 51px;
    >
    > padding:0px;
    >
    > float: left;
    >
    > }
    >

  • Step to step guide to adding a javascript

    Hello all
    I need to add a color picker to by apex application
    I have found the Java code ... http://www.flooble.com/scripts/colorpicker.php
    and see it working ... Re: Using color picker
    Does anyone have a step to step guide to adding a large..ish java script to an application?
    i.e. In this color picker example, adding the Javascript to the header is not a problem, I do not understand the second half of code in the context of APEX as itwould you normally copy this into a from.
    All help very welcome
    Regards
    Pete

    Hi Pete,
    I don't get it. I can't look into your workspace so I created a new page myself with only 1 item.
    http://apex.shellprompt.net/pls/apex/f?p=604:6
    1. In the HTML Header of the page I copied the javascript. (copy it from my page again)
    2. I've a textfield item with HTML Form Element Attributes: onChange="relateColor('PICK1135849624', this.value);" name="pxx" 3. And in the post element text: &lt;a href="javascript:pickColor('PICK1135849624');" id="PICK1135849624"
    style="border: 1px solid #000000; font-family:Verdana; font-size:10px;
    text-decoration: none;">   &lt;/a>
    &lt;script language="javascript">relateColor('PICK1135849624', getObj('PICK1135849624FIELD').value);&lt;/script>Can you try with the above steps?
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • Adding a javascript img array file to picture in dreamweaver

    Hi I am very new to Javascript but efficient in Dreamweaver. I use CS5 and a Macbook Pro. I'm trying to attach a Javascript file to a picture on my homepage. I wrote the code in text edit and saved it as an HTM file. When I open the file in Google Chrome, Safari or Firefox it works perfectly and the array displays all five pictures in a row. How do I attach this to dreamweaver? Also do I leave in the HTML tags in the javascript file? Here's how it looks when it plays right on a browser.
    <HTML>
    <HEAD>
    <TITLE>Please Work</TITLE>
    <SCRIPT>
    var imgArray = new Array(5);
    imgArray[0] = new Image;
    imgArray[0].src = "awesome.jpg";
    imgArray[1] = new Image;
    imgArray[1].src = "dadinforest.jpg";
    imgArray[2] = new Image;
    imgArray[2].src = "neatplant.jpg";
    imgArray[3] = new Image;
    imgArray[3].src = "greenlake.jpg";
    imgArray[4] = new Image;
    imgArray[4].src = "cattail.jpg";
    var index = 0;
    function cycle()
          document.banner.src = imgArray[index].src;
          index++;
          if (index == 5)
               index = 0;
          setTimeout("cycle()", 3000);
          return;
    </SCRIPT>
    </HEAD>
    <BODY onLoad="cycle()">
    <CENTER>
    <IMG NAME="banner" SRC="awesome.jpg">
    </CENTER>
    </BODY>
    </HTML>

    Kitty Collins3 wrote:
    I'm trying to attach a Javascript file to a picture on my homepage. I wrote the code in text edit and saved it as an HTM file. When I open the file in Google Chrome, Safari or Firefox it works perfectly and the array displays all five pictures in a row. How do I attach this to dreamweaver?
    What you have created is an HTML file with a block of JavaScript in the <head>. It's not a JavaScript file, so there's nothing to attach. Just put the <script> block in the <head> of the page where you want to use it, and make sure your image is named "banner".
    If you're just starting to learn JavaScript, you should be aware that JavaScript practices have changed radically in the past few years. Looking at the code you have written, it seems as though you are using an old book or an online script that was written many years ago. Several clues are the uppercase characters in the HTML tags, the <center> tag, the name attribute in the <img> tag, and the use of a string as the first argument to setTimeout().
    JavaScript can be quite difficult to master, so make sure you learn from a reliable, modern source. A book that I found very helpful is DOM Scripting by Jeremy Keith. A new edition of the book was published this week (http://friendsofed.com/book.html?isbn=9781430233893). I'm sure there are other good resources, but you should avoid anything written earlier than 2005.

  • 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;
    > }
    >
    >

  • Adding custom javascripts into my jsp pages

    Hi all,
    it will seems to be a newby question, i'm sorry i begin using jhs since two weeks
    the question is how can i Allow an onBlur property on VO Attributes; this property includes a piece of JavaScript to be executed on leaving the item to be generated in my jsp pages to prevent doing this in post-generation, by the way i would like to know who is the class responsible for the generation of form.js .
    thanks a lot
    best regards.
    Edited by: user1718070 on 3 févr. 2009 06:41

    Hi EvertJan, thanks for the reply.
    I need an advice:
    i've added an onblur event to jhsgenerator ADF BC property and i write as an example this.value=null
    i created a template in jspinput.xsl(JAGLauncher.jar) like this:
    <xsl:template name="onBlur">
    <xsl:param name="onBlur" />
    <xsl:if test="$onBlur !=''" >
    <xsl:attribute name="onblur">
    <xsl:value-of select="$onBlur" />
    </xsl:attribute>
    </xsl:if>
    </xsl:template>
    and i try to generate a html:text by modifing inputtextsec template like this:
    <xsl:template name="textInputSec">
    <xsl:param name="name"/>
    <xsl:param name="property"/>
    <xsl:param name="withIndex"/>
    <xsl:param name="size"/>
    <xsl:param name="maximumLength"/>
    <xsl:param name="updateable"/>
    <xsl:param name="displayType"/>
         <xsl:param name="onBlur" />
    <html:text name="{$name}" property="{$property}" size="{$size}" maxlength="{$maximumLength}" onblur="{$onBlur}">
    <xsl:call-template name="onBlur" >
    <xsl:with-param name="onBlur" select="$onBlur"/>
    </xsl:call-template>
              <xsl:if test="$withIndex = 'true'">
    <xsl:attribute name="indexed">
    <xsl:value-of select="'true'"/>
    </xsl:attribute>
    </xsl:if>
    <xsl:call-template name="disabledAttribute">
    <xsl:with-param name="updateable" select="$updateable"/>
    </xsl:call-template>
    </html:text>
         </xsl:template>
    also added this to CreateFormElement template in jsplibrary.xsl:
    <xsl:with-param name="onBlur" >
    <xsl:call-template name="getCustomProperty">
    <xsl:with-param name="entityAttribute" select="$entityAttribute"/>
    <xsl:with-param name="propertyName" select="'ON_BLUR'"/>
    </xsl:call-template>
    </xsl:with-param>
    but the result inemployees.jsp is not what i expected:
    <td class="prompt" nowrap="nowrap">FirstName</td>
    <td nowrap="nowrap">
    <html:text name="EmployeesBean" property="EmployeesFirstName" size="20" maxlength="30" onblur="" />
    </td>
    like yousee this.value=null is missing in onblur=""
    i hope you can help me
    Best regards

  • Adding own javascript to edge animate

    I'm having a bit of trouble adding my own javascipt to an edge animate project. I created a website that has javascipt in it. I am trying to recreate it using edge animate because I was interested in using edge animate to take the site up a notch... basically I have a template of what I need the site to do with the existing javascipt I have, but I haven't gotten it to work integrated into edge animated yet.
    I imported all of the images I have from the existing website into edge animate and then relabled all of the instances on the stage to reflect what I have called them in the javascript. I've tried importing my javascript file into the "scripts" section and then just linking to the source in the main html page that edge generates but the javascript doesn't work. Then I've tried putting parts of the script into the CompositionReady panel and onto the button I want clicked directly in the elements.... this works ok, except I have to change the syntax a little (not too much of a pain except when I don't think the edge animate javascript has the same functions).....I'll post below and see if someone can help me get this working either by just linking to the file directly from the html or making the script campatable in edge syntax and posting it in the appropriate element panel. Here is the seperate script from the outside javascript... show I change the syntax and put it directly on the"checkbutton" button in the elements (if so, how?) or should I just link to the file (if so, how come when I put a simple link in the header that it doesn't work: <script type="text/javascript" charset="utf-8" src="js/myscript.js"></script>
    script from myscript.js:
    //sym.$("pic1a").hide(); //edge animate syntax when in animate panels.... does my external js sheet have to keep this syntax?
    var carArrayX = [140,140,330,460,650,765];
    var carArrayXcounter = 0;
    var carArrayY = [ 440,440,405,390,390,390];
    var carArrayYcounter = 0;
    $( '#blueCar' ).addClass( "hidden" );
    var counterBox = 0;
        $('#checkButton').click(function(){
         if (counterBox == 0)
             alert("Please choose an answer");
         else if (counterBox > 1)
             alert("Please choose only one answer");
         else if (counterBox == 1)
             $(this).css('background-image', 'url(button_down.png)');
             $("#pic2a").unbind("click");
             $("#pic2b").unbind("click");
             $("#pic2c").unbind("click");
             $("#pic2d").unbind("click");
             $("#pic2e").unbind("click");
             $("#pic2f").unbind("click");
               if($("#pic2a").hasClass("hidden")){
               $("#words_correct").removeClass("hidden");          
               $( '#pic3a' ).removeClass( "hidden" ); //correct answer
               $( '#pic1a' ).addClass( "hidden" );
               $( '#blueCar' ).removeClass( "hidden" );
               $('#blueCar').animate({
                left:carArrayX[carArrayXcounter] + "px",
                top:carArrayY[carArrayYcounter] + "px"
               carArrayXcounter ++;
               carArrayYcounter ++;
               var cookieXcounter = carArrayXcounter;
               var cookieYcounter = carArrayYcounter;
               //console.log(cookieXcounter);
               //console.log(cookieYcounter);
               $.cookie('mycookieX',cookieXcounter,{expires:7,path:'/'});
               $.cookie('mycookieY',cookieYcounter,{expires:7,path:'/'});
               console.log($.cookie('mycookieX'));
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1c' ).addClass( "hidden" );
               $( '#pic1d' ).addClass( "hidden" );
              else if($("#pic2b").hasClass("hidden")){
               $("#words_wrong").removeClass("hidden");
               $( '#pic4b' ).removeClass("hidden");//incorrect answer
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1a' ).addClass( "hidden" );
               $( '#pic1c' ).addClass( "hidden" );
               $( '#pic1d' ).addClass( "hidden" );;
              else if($("#pic2c").hasClass("hidden")){
               $("#words_wrong").removeClass("hidden");          
               $( '#pic4c' ).removeClass( "hidden" );//incorrect answer
               $( '#pic1c' ).addClass( "hidden" );
               $( '#pic1a' ).addClass( "hidden" );
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1d' ).addClass( "hidden" );;
              else if($("#pic2d").hasClass("hidden")){
               $("#words_wrong").removeClass("hidden");        
               $( '#pic4d' ).removeClass( "hidden" );//incorrect answer
               $( '#pic1d' ).addClass( "hidden" );
               $( '#pic1a' ).addClass( "hidden" );
               $( '#pic1b' ).addClass( "hidden" );
               $( '#pic1c' ).addClass( "hidden" );;
        $('#pic2a').click(function(){
          $( '#pic1a' ).removeClass( "hidden" );
          $( '#pic2a' ).addClass( "hidden" );
          counterBox++;
        $('#pic2b').click(function(){
          $( '#pic1b' ).removeClass( "hidden" );
          $( '#pic2b' ).addClass( "hidden" );
          counterBox++;
        $('#pic2c').click(function(){
          $( '#pic1c' ).removeClass( "hidden" );
          $( '#pic2c' ).addClass( "hidden" );
          counterBox++;
        $('#pic2d').click(function(){
          $( '#pic1d' ).removeClass( "hidden" );
          $( '#pic2d' ).addClass( "hidden" );
          counterBox++;
        $('#pic2e').click(function(){
          $( '#pic1e' ).removeClass( "hidden" );
          $( '#pic2e' ).addClass( "hidden" );
          counterBox++;
        $('#pic2f').click(function(){
          $( '#pic1f' ).removeClass( "hidden" );
          $( '#pic2f' ).addClass( "hidden" );
          counterBox++;
        $('#pic1a').click(function(){
          $( '#pic2a' ).removeClass( "hidden" );
          $( '#pic1a' ).addClass( "hidden" );
          counterBox--;
        $('#pic1b').click(function(){
          $( '#pic2b' ).removeClass( "hidden" );
          $( '#pic1b' ).addClass( "hidden" );
          counterBox--;
        $('#pic1c').click(function(){
          $( '#pic2c' ).removeClass( "hidden" );
          $( '#pic1c' ).addClass( "hidden" );
          counterBox--;
        $('#pic1d').click(function(){
          $( '#pic2d' ).removeClass( "hidden" );
          $( '#pic1d' ).addClass( "hidden" );
          counterBox--;
        $('#pic1e').click(function(){
          $( '#pic2e' ).removeClass( "hidden" );
          $( '#pic1e' ).addClass( "hidden" ); 
          counterBox--;
        $('#pic1f').click(function(){
          $( '#pic2f' ).removeClass( "hidden" );
          $( '#pic1f' ).addClass( "hidden" );
          counterBox--;

    I also had the problem of wanting to use custom javascript that I could call from an Edge Animate Composition.
    The solution I found (from a post by hemanth kumar r https://forums.adobe.com/thread/1479495) was to make variables and functions properties of AdobeEdge.
    So in the external .js document a variable is declared and given a value:
    AdobeEdge.myVariableName = "The variable value";
    To use it in a symbol/element:
    alert(AdobeEdge.myVariableName);
    And a function is declared:
    AdobeEdge.myFunctionName(param){...function code...} //param optional
    To call these in a symbol/element:
    AdobeEdge.myFunctionName(param);
    To test this out I created a button on my stage that called a function in my custom .js file that simply called an alert. Once the function works you can expand it to do anything you want (I used it to go to a new html page).
    Peter Small

  • 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.

  • Retrieving form components added via javascript

    I looked around and couldn't find anything on this. I'm adding form elements dynamically using Javascript. How do I read those dynamically added elements? Faces doesn't pick them up and they're not coming through in the request attributes (HttpServletRequest#getAttribute(String)). Anybody know how this works or knows of a resource? Any help would be appreciated.

    You should look in the request parameter map, not the request attributes map. See ExternalContext.getRequestParameterMap() or use the JSF-reserved keyword param in your EL.

  • Dreamweaver adding local testing server MySQL-HELP REQUEST

    I have a website on register.com and I am using MySQL for the
    first time. My DB and table have been created using MyPHPAdmin. Now
    I want to use my Dreamweaver to setup a testing server that will be
    local and then upload asp pages after testing. Can Anyone PLEASE
    assist with this. I have downloaded and installed MySQL 5 and
    loaded the MySQL Driver for ODBC. I am not sure if I am doing this
    correctly OR if anyone knows an easier way. In summary I simply
    want to:
    A : Be able to test MySQL tables using dreamweaver's testing
    server then locally upload to my remote site that is hosted at
    register.com.
    THANKS in advance
    Mark

    Why not use PHPMyAdmin to build the database remotely and
    then just use your
    remote connection for testing?
    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
    ==================
    "Mark6372" <[email protected]> wrote in
    message
    news:eivg19$sdf$[email protected]..
    >I have a website on register.com and I am using MySQL for
    the first time.
    >My DB
    > and table have been created using MyPHPAdmin. Now I want
    to use my
    > Dreamweaver
    > to setup a testing server that will be local and then
    upload asp pages
    > after
    > testing. Can Anyone PLEASE assist with this. I have
    downloaded and
    > installed
    > MySQL 5 and loaded the MySQL Driver for ODBC. I am not
    sure if I am doing
    > this
    > correctly OR if anyone knows an easier way. In summary I
    simply want to:
    >
    > A : Be able to test MySQL tables using dreamweaver's
    testing server then
    > locally upload to my remote site that is hosted at
    register.com.
    >
    > THANKS in advance
    > Mark
    >

  • Adding a javascript event to a dynamically loaded content

    Hello,
    I am new to adobe air. I am trying to create a desktop application with html and javascript. I have a page that reads data from db and lists each  records as links (a href). I need to assign an onclick event for each link.
    both
    foreach result {
         <a href="#" onclick="foo()">bla bla</a>
    and
    foreach result {
         document.getElementById('container').innerHTML = '<a href="#" id="link_id">bla bloa</a>';
         document.getElementById('link_id').addEventListener("click", function() { foo(); });
    With the second  solution it  only workd  for the last record
    What am I missing ?
    I appreciate any help.
    Thanks.

    I always recommend using a javascript framework such as jQuery for building JS AIR applications. If you're already using jQuery, or plan on it then look into jQuery's live binding:
    http://api.jquery.com/live/
    Essentially what it does is "listen" for new DOM elements that match events you're watching for and add them to your existing bindings. It's very simple. Your example below becomes:
    $('a').live('click', function(){
         // do something

  • Adding new javascript in LiveCycle script editor

    The form has a Print button and already has this javascript xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
    How do I add the following javascript to the same button and its click event?
    newDocName = "";
    f1 = this.getField("topmostSubform[0].Page1[0].Last_Name[0]").valueAsString;
    if (f1!="") newDocName += f1 + " ";
    f2 = this.getField("topmostSubform[0].Page1[0].First_Name[0]").valueAsString;
    if (f2!="") newDocName += f2 + " ";
    f3 = this.getField("topmostSubform[0].Page1[0].Date[0]").valueAsString;
    if (f3!="") newDocName += f3 + " ";
    f4 = this.getField("topmostSubform[0].Page1[0].Email[0]").valueAsString;
    if (f4!="") newDocName += f4;
    newDocName = newDocName.replace(/[\\,\/,\:,\*,\?,\",\<,\>,\|,\,,\n,\r]/g,"");
    docPath = this.path+"";
    docPath = docPath.substring(0, docPath.lastIndexOf("/")+1);
    mySaveAs(this,docPath+newDocName+".pdf");
    I had this working in Acrobat on an earlier version of the same form (with an external script also in the Acrobat directory -- so it all worked perfectly), but on this form, I don't have full access. My only option is to try to add this javascript to save the file with a new filename by using LiveCycle.

    Post your question in the forum for LiveCycle Designer.

  • Dreamweaver adding paragraph tags

    Dreamweaver has started automatically putting paragraph <p> tags on information in table cells. This never used to happen. How do you turn that "feature" off as it's making my tables look horrible. I tried CSS table attributes, but its screwing everthing else up. i'm sure it's something simple, but not sure where I can go to turn it off.

    By default, DW adds <p> tags when you hit the Return key in Design View. 
    Or you can invoke <br> tags by hitting Shift+Return.  I assure you, this is not a "new" feature.
    Yes, you can style your tables with CSS to remove white space if desired.
         table td p {margin:0; padding:0}
    Nancy O.

  • IPhoto New Albums Adding unwanted photos

    I have the new iPhoto 11' and each time I create a new album, random photos from my iPhoto library are added into the newly created album...any help on why?
    Thanks,

    When I transferred all of my photos onto my MacBook and updated iPhoto '11 it duped most of the Events regardless if they were already on the MacBook.
    How did you do this? Did you import an old library into the new one - you never do that - it causes massive duplication and does not keep your metadata --- the correct method is to copy the old library to the pictures folder of the new computer (assuming your do not have a working iPhoto library there) and launch iPhoto and let it convert the old library
    In addition to that it started 'adding' just the faces as additional photos to the Events and Albums. I have a few thousand photos but it ended up transferring over 65,000 photos (mostly dupes). Very annoying. I think I am going to back everything out and start over.
    That probably is the solution - doing it as outlined above
    LNB

  • Adding Custom Javascript for disabling metadata field

    Hi,
    I have a metadata field as option list and based upon its selection i need to enable/disable 2 other metadata fields.
    I'm stuck where to include the javascript for the same.Can anyone provide pointers for the same.

    Hi All,
    I 'm able to disable the 2 metadata upon selection of the option list metadata using the following code:
    <@dynamichtml std_js_bootstrap_vars@>
    <$include super.std_js_bootstrap_vars$>
    <$if IsLoggedIn$>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
         <script type="text/javascript">
         $(document).ready(function(){
         $('tr.idcRowClass-xlanguage td select').change(function() {
         var selectedVal = $('tr.idcRowClass-xlanguage td select option:selected').val();
              if(selectedVal !== "en-US"){
              $('tr.idcRowClass-xConvert td select').attr('disabled','disabled');
              $('table#Languages-Checkbox tr td input[type=checkbox]').attr('disabled','disabled');
                             </script>
    <$endif$>
    <@end@>

Maybe you are looking for