Fireworks doesn't accept my javascript code

Ask a Question related to Macromedia Fireworks, Design and Development.

  1. #1

    Default Fireworks doesn't accept my javascript code

    Hi, help me please, i need to put this javascript (It shows the date, but it is in portuguese, but that's not the problem) in my .png file:

    var mydate=new Date()
    var year=mydate.getYear()
    if (year < 1000)
    year+=1900
    var day=mydate.getDay()
    var month=mydate.getMonth()
    var daym=mydate.getDate()
    if (daym<10)
    daym="0"+daym
    var dayarray=new Array("Domingo","Segunda","Terça","Quarta","Quinta ","Sexta","Sábado")
    var montharray=new
    Array("Janeiro","Fevereiro","Março","Abril","Maio" ,"Junho","Julho","Agosto","Setembro","Outubro","No vembro","Dezembro")
    document.write("<small><font color='000000' face='Arial' size='2'><b>"+dayarray[day]+", "+daym+" de "+montharray[month]+" , "+year+"</b></font></small>"),

    but at the highlighted line, the program says that the document is not defined.

    I'm just a beginner i don't know how to define it.

    Can someone tell me how will the code look like?

    Help me please


    LequinhoTso webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. code hint javascript api
      I am extending dreamweaver to add code hinting and color coding to my proprietary scripting language. I am fine with the Javascript but I am not...
    2. Fireworks Javascript Fails
      The Web Photo Gallery Extension fails because of a Javascript error (won't load in Fireworks). Is this a Dreamweaver prob or Fireworks? And how...
    3. JavaScript issue after exporting HTML from Fireworks
      I have been using Fireworks MX 2004 to create a web page with pop-ups, slice it and export it to HTML. In Dreamweaver MX 2004 I would then add a...
    4. how do i hide FireWorks code for drop downs
      I am trying to hide or create a direct link for my fireworks drop down menu so that it doesn't show up in the source code of all of my pages. I...
    5. Need Help with fireworks 4 ( get error code )
      when i open the programm up it's ok ( Crecked ) when i try to type in something i get this error an internal error occurred an internal error...
  3. #2

    Default Re: Fireworks doesn't accept my javascript code

    You don't put javascript into PNG files. You put it into HTML pages.

    It would go in the <head> region of the page, between <script
    type="text/javascript"> and </script> tags.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver MX
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]news://forums.macromedia.com/macromedia.dreamweaver[/url] - THE BEST WAY TO GET
    ANSWERS
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.DreamweaverFAQ.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "LequinhoTso" <webforumsuser@macromedia.com> wrote in message
    news:bmot0a$2gh$1@forums.macromedia.com...
    > Hi, help me please, i need to put this javascript (It shows the date, but
    it is in portuguese, but that's not the problem) in my .png file:
    >
    > var mydate=new Date()
    > var year=mydate.getYear()
    > if (year < 1000)
    > year+=1900
    > var day=mydate.getDay()
    > var month=mydate.getMonth()
    > var daym=mydate.getDate()
    > if (daym<10)
    > daym="0"+daym
    > var dayarray=new
    Array("Domingo","Segunda","Terça","Quarta","Quinta ","Sexta","Sábado")
    > var montharray=new
    >
    Array("Janeiro","Fevereiro","Março","Abril","Maio" ,"Junho","Julho","Agosto",
    "Setembro","Outubro","Novembro","Dezembro")
    > document.write("<small><font color='000000' face='Arial'
    size='2'><b>"+dayarray[day]+", "+daym+" de "+montharray[month]+" ,
    "+year+"</b></font></small>"),
    >
    > but at the highlighted line, the program says that the document is not
    defined.
    >
    > I'm just a beginner i don't know how to define it.
    >
    > Can someone tell me how will the code look like?
    >
    > Help me please
    >
    >

    Murray *TMM* 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