2 Replies Latest reply on Sep 24, 2010 5:47 PM by cromartie1974

    Problem opening a link, created in FW CS5


      OK....so I'm about half way finished with my Fireworks CS4 Essential  training, so I got to SYMBOLS and THERE we have BUTTONS. Finally!


      As  usual there're good news and bad. I managed to create fine (with Mr.  Babbage's help) working rollover button. I only had to manually change  the code (to adjust the correct location of the buttons 2 files (2  states of one button, basically) on my server. Also in FW I added a link  to the button. So I placed the code into 2 places


      1) A regular Joomla article opened with no editor so I could see the code.


      2) Custom HTML Joomla module


      In  BOTH cases it worked. The only thing is...it does NOT work together, so  I just disabled the Custom HTMLmodule and left the button at the bottom  of the article.


      BTW, I just placed ALL the code generated by FW all in one place...


      Now...another  thing which is unclear (don't know if it makes any difference), when I  make export in FW, I get a choice where I can choose Generic or DW  XHTML. I chose the former...


      Now, the BAD thing is...for some stupid reason, despite the fact that I DID wrote

      www.google.com in Link box in FW, so it appears as a href=

      www.google.com ...when I tried to open the .htm file in my local PC's browser for a  preview AND when I tried to click on a link on my site, there was the  same problem.
      Instead of www.google.com, it brings me file:///C:/Users/TM/Desktop/New%20folder/www.google.com
      OR...in a latter case:
      WHY is that??? and how it can be solved
      Here's the code:


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <!-- saved from url=(0014)about:internet -->
      <html xmlns="http://www.w3.org/1999/xhtml">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <!--Fireworks CS3 Generic target.  Created Fri Sep 24 16:56:12 GMT+0200 2010-->
      <script language="JavaScript1.2" type="text/javascript">
      function MM_findObj(n, d) { //v4.01
        var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
          d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
        if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
        for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
        if(!x && d.getElementById) x=d.getElementById(n); return x;
      function MM_swapImage() { //v3.0
        var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
         if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
      function MM_swapImgRestore() { //v3.0
        var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;


      function MM_preloadImages() { //v3.0
        var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
          var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
          if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}


      <body bgcolor="#ffffff" onload="MM_preloadImages('images/stories/surf_button_s2.gif');">
      <a href="www.google.com" target="_blank" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('surf_button_s1','','images/stories/surf_button_s2.gif',1);"><i mg name="surf_button_s1" src="images/stories/surf_button_s1.gif" width="192" height="58" border="0" id="surf_button_s1" alt="" /></a></body>


      The buttons I will attach too, just in case.
      And the URL is
        • 1. Re: Problem opening a link, created in FW CS5
          Jim_Babbage Level 4



          The link must be absolute for external sites. http://www.google.com


          I don't use Joomla so I don't think I'll be much help in that area.


          I hope you are enjoying the training title!

          • 2. Re: Problem opening a link, created in FW CS5
            cromartie1974 Level 1

            It WORKS NOW!!!


            I found a solution to the problem...Yes, thank you Sir for correcting the URL. I watched videos from YouTube and I also paid attention and corrected that.

            Also, I realized that hotspots are not neccessary. So I don't even have to touch Hotspot tool. What I haven't done before was that I didn't make an Active Area slicing. Now I exported the button with the following setting:


            HTML and Images
            Export Slices

            Current Page


            I put checkmarks in all 3 boxes. And In Options I chose .htm and DW XHTML.


            I changed the location of files in a code to match their physical location on the server and I just copy-pasted ALL the FW code into my existing Joomla article and everything works fine. Except that I didn't optimize my gif button with Matte, so the edges are jaggedy sort of. But that's not important.


            As per Joomla...No miracles there, Sir and you really don't have to know it. Because basically Joomla doesn't do anything by itself. It just executes the HTML, JS codes and uses lots of CSS. If its a good working code-it works, if it doesn't-it doesn't. As simple as that.


            I hope in the future chapers you will explain more about that Hotspot tool, and the connection between so called Active Area (I wonder why its even called like that), slices and links on buttons and such.


            And another thing is...I still don't understand how I can make in FW a billbord bg image with a rollover button on top (call to action kinda button).

            What should be a workflow?