9 Replies Latest reply on Jan 20, 2009 4:36 PM by Rufus65

    Problems with external javascript file

    Rufus65
      For some reason, I cant get an external text/javascript [.js] file to operate correctly on my webpage. i went to the Adobe Help Viewer and followed the instructions clearly. But it all comes to a halt cause i cant seem to see a little javascript icon in design view to link my external javascript widget to the javascript holder on my page. Why is that? I have the invisible elements visual aid checked as well. Here's a section of the code below.
        • 1. Re: Problems with external javascript file
          Level 7
          > <script type="text/javascript">
          >
          > </script>

          Why's this empty? What are you expecting to happen there?


          --
          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
          ==================


          "Rufus65" <webforumsuser@macromedia.com> wrote in message
          news:gl5cmg$adr$1@forums.macromedia.com...
          > For some reason, I cant get an external text/javascript [.js] file to
          > operate
          > correctly on my webpage. i went to the Adobe Help Viewer and followed the
          > instructions clearly. But it all comes to a halt cause i cant seem to see
          > a
          > little javascript icon in design view to link my external javascript
          > widget to
          > the javascript holder on my page. Why is that? I have the invisible
          > elements
          > visual aid checked as well. Here's a section of the code below.
          >
          > </p>
          > <h2 class="style1">Featurded Widgets</h2>
          > <p class="style1">
          > <script type="text/javascript">
          >
          > </script>
          > </p>
          > </div>
          >

          • 2. Re: Problems with external javascript file
            Rufus65 Level 1
            that code was generated by me following the adobe help viewer, i told me to go to insert>HTML>Script Objects> Script, and then when the script box opens up just click okay, dont type anything in the content box or anything like that, and my problem is right after that. after i click okay, nothing happens except for that code being entered, and nothing in the design view shows up as a change, or at least i cant see it in design view...
            • 3. Re: Problems with external javascript file
              Level 7
              Rufus65 wrote:
              > For some reason, I cant get an external text/javascript [.js] file to operate
              > correctly on my webpage. i went to the Adobe Help Viewer and followed the
              > instructions clearly. But it all comes to a halt cause i cant seem to see a
              > little javascript icon in design view to link my external javascript widget to
              > the javascript holder on my page. Why is that? I have the invisible elements
              > visual aid checked as well. Here's a section of the code below.

              If you are not seeing the JavaScript shield in design view, then you may have turned off the showing invisible Visual Aids, or turned off the Script tag visual aid. Go to View -> Visual Aids. If you see "Invisible Elements" checked, then that's good, otherwise select it. If you already have it checked and you do not see the Script shield icon, then go to Edit -> Preferences (Dreamweaver -> Preferences on Mac I think), go to the Invisible Elements category, and make sure that Scripts is checked.


              Or you can simply go into code view and in the opening SCRIPT tag at an empty place and hit the space bar and the code hints for the SCRIPT tag should appear, select the src attribute, and then when you see the Browse code hint hit the enter key and a file browse dialog will appear, browse to and select your JavaScript file and away you go.


              --
              Danilo Celic
              | http://blog.extensioneering.com/
              | WebAssist Extensioneer
              | Adobe Community Expert
              • 4. Problems with external javascript file
                Rufus65 Level 1
                Well, that made the script shield pop up, but when i upload the scripts and web page files to the hosting server and refresh the page, it's exactly the same, nothing has changed on the page through my browsers point of view, but the code changed a little bit. This is the modification below...
                • 5. Re: Problems with external javascript file
                  Rufus65 Level 1
                  for a more in-depth look on this, heres the javascript code itself to see if i messed up on something. The first code is for a calender widget on the side bar of my web page, and the second code is a weather widget that's supposed to go right below it...
                  • 6. Re: Problems with external javascript file
                    Level 7
                    Rufus65 wrote:
                    > for a more in-depth look on this, heres the javascript code itself to see if i
                    > messed up on something.

                    What is messed up. You said that you didn't have the JavaScript shield icon showing. Is that still the case, if so, what happened when you followed the steps I suggested?

                    With the code chunks you pasted, it appears that you were able to add in the links to the external JavaScript files. If you're now having a different problem than the shield icon showing, please explain what that specific problem is.

                    If the problem happens to be that nothing appears when viewing your page within a browser, I gave the code snippets a quick test and kept coming up with a an error that WIDGETBOX was not defined. After I went through the code a bit I noticied that it was mangled a little, and it may be due to this forum, or it may be due to you having been supplied mangled code. For example the src attribtues of the script tags have line breaks in them, they should be all on one line. As in:
                    http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js

                    Also, in the second code block there is an issue with the renderWidget method call, it's broken apart and it should be on one line:
                    if (WIDGETBOX) WIDGETBOX.renderWidget('d650a4fe-8488-4722-bcf1-cc27529dde74');




                    --
                    Danilo Celic
                    | http://blog.extensioneering.com/
                    | WebAssist Extensioneer
                    | Adobe Community Expert
                    • 7. Re: Problems with external javascript file
                      Rufus65 Level 1
                      I am sorry, i went from one problem to the next, the first problem with the javascript shield was my main and first problem, and its fixed. now its a new problem, but i think i can all cut this time in half, i got the mangled codes from this website: Widgetbox.com. it lets you customize your own widgets and i thought it was legit, apparently its not. to solve my javascript problem, basically i just want a website that has downloadable widgets for me to insert into my website using dreamweaver CS3. Thats my main task i was trying to accomplish. I started 5 steps ahead of that goal which wasnt bright at all. So my main problem [apart from my other post topic about my screwed up header] is just getting legit widgets that are free, and easy to use in dreamweaver CS3, cause i dont have time to learn Javascript code or anything close to it.
                      • 8. Re: Problems with external javascript file
                        Level 7
                        Rufus65 wrote:
                        > I am sorry, i went from one problem to the next, the first problem with the
                        > javascript shield was my main and first problem, and its fixed. now its a new
                        > problem, but i think i can all cut this time in half, i got the mangled codes
                        > from this website: http://www.widgetbox.com/#. it lets you customize your own
                        > widgets and i thought it was legit, apparently its not. to solve my javascript
                        > problem, basically i just want a website that has downloadable widgets for me
                        > to insert into my website using dreamweaver CS3. Thats my main task i was
                        > trying to accomplish. I started 5 steps ahead of that goal which wasnt bright
                        > at all. So my main problem [apart from my other post topic about my screwed up
                        > header] is just getting legit widgets that are free, and easy to use in
                        > dreamweaver CS3, cause i dont have time to learn Javascript code or anything
                        > close to it.

                        Depends on what widgets you want and what you need them to specifically do for you. Perhaps start a new thread listing the widgets you feel that you need and what you'd like to be able to do with them.

                        You do have Spry widgets available on the Insert bar, but they may or may not be able to accomplish some things that you'd like to do, be specific about what you want to do on your end, and what you'd like the end result to be. Post examples if you have them.

                        Many widgets will require some, if not extensive coding, to get the most out of them. For example the widgets at http://ui.jquery.com/ can do something relatively well, but within Dreamweaver CS3, you will need to get into the code to be able to set many of the options.

                        In case it matters, DWCS4 added a "web widgets" option that allows you to install widgets from the exchange:
                        http://www.adobe.com/cfusion/exchange/index.cfm?s=5&from=1&o=desc&cat=290&l=-1&event=produ ctHome&exc=3

                        But again, they may need a bit of digging intot he code to get the most out of them.

                        HTH

                        --
                        Danilo Celic
                        | http://blog.extensioneering.com/
                        | WebAssist Extensioneer
                        | Adobe Community Expert
                        • 9. Re: Problems with external javascript file
                          Rufus65 Level 1
                          alright then. see you in the next thread. thanks for the help.