can javascript work correctly in spry:when?

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default can javascript work correctly in spry:when?

    why the window.open("http://www.ibm.com/"); is alway running even the address
    is not equal to 'ibm'

    <div spry:choose="spry:choose">
    <div spry:when="'{address}' == 'ibm">IBM
    <script language="JavaScript">
    window.open("http://www.ibm.com/");
    </script>
    </div>
    <div class="text09" spry:default="spry:default"></div>
    </div>

    Seedseeker Guest

  2. Similar Questions and Discussions

    1. spry menubar does not work in IE
      I made a spry menubar to my website using dreamweaver cs3 on mac. Everything works fine with Opera, Firefox and Safari, but the menubar won't show...
    2. Spry Submenu Doesn't Work Properly in IE7
      The page in question is at http://www.mayland.edu/test/index.html . I am at my wits end at solving a submenu drop-down problem in IE7. I used the...
    3. Spry Menu Bar Horizontal not viewing in IE correctly
      Can someone please help me understand why this is not viewing in IE correctly. @charset 'UTF-8'; /* SpryMenuBarHorizontal.css - version 0.6 - Spry...
    4. Microphone rate capture doesn't work correctly on MAC
      Hi everyone, We have a sound issue with Mac users that use our videoconference app. Here's the problem: publisher of stream(audio+video or...
    5. Flash loads, but doesn't work correctly. Linux
      All, I have loaded Flash 7, or whatever the latest is for Linux. When I go to sites like youtube.com or anything like that that uses flash. The...
  3. #2

    Default Re: can javascript work correctly in spry:when?

    Seedseeker wrote:
    > why the window.open("http://www.ibm.com/"); is alway running even the address
    > is not equal to 'ibm'
    >
    > <div spry:choose="spry:choose">
    > <div spry:when="'{address}' == 'ibm">IBM
    > <script language="JavaScript">
    > window.open("http://www.ibm.com/");
    > </script>
    > </div>
    > <div class="text09" spry:default="spry:default"></div>
    > </div>
    Remember that the code is on the page and all Spry will be doing is to hide the non-choosen item. So for your code the script tag is still on the page and therefore the browser runs the contained script, in this case opening the window.
    I've not delved into this part of Spry, but you should ask your question in the Spry forums:
    [url]http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602[/url]



    --
    Danilo Celic
    | Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
    | Adobe Community Expert
    danilocelic AdobeCommunityExpert Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139