Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 19th, 2005, 12:29 PM   #1
ksm
Newbie
 
Join Date: Aug 2005
Posts: 3
Rep Power: 0 ksm is on a distinguished road
Send a message via Yahoo to ksm
Unhappy Dreamweaver Navigation bar problems

Hi people,

Am having some problem with the Dreamweaver (version 3, some probs not being able to install a higher ver I have) Navigation bar script...

Basically have made a navigation bar... which works fine on my comp...
But when uploaded to the server (linux) it doesn't work... if move mouse over the images don't change... Also tried inserting m own

<td>
<a href="#" onMouseOver="WhoAreWe.src='images/DaMag_b1.jpg'" onMouseOut="WhoAreWe.src='images/DaMag_b.jpg'">

<img name="WhoAreWe" src="images/DaMag_b.jpg" border="0" onLoad="" width="198" height="25">

</a>
</td>

Again same problem...

But if keep mouse over menu item for 2-3sec (literally) the image changes...
the images are about 4kb
The dreamweaver script preloads images, and even if that isn't working, once have moved mouseover an image (and it is loaded) it should work fine the next time... but doesn't...
Works absolutly fne on me comp...

Please help people... My first post here :o
ksm is offline   Reply With Quote
Old Aug 19th, 2005, 12:33 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8 Ooble is on a distinguished road
You mention it's a Linux server. Are you getting the case of the image filenames right?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 19th, 2005, 12:36 PM   #3
ksm
Newbie
 
Join Date: Aug 2005
Posts: 3
Rep Power: 0 ksm is on a distinguished road
Send a message via Yahoo to ksm
Hey thanks for such a prompt reply... Wow!

Think the image filenames are right.. as after a few seconds when it does change the image.. it changes to the correct ones and then onMouseOut back to the old ones + it works fine on my comp... delay only when hosted on server ...
ksm is offline   Reply With Quote
Old Aug 19th, 2005, 1:06 PM   #4
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8 Ooble is on a distinguished road
In that case, it's not preloading the images properly. Nothing I can do about that until I see the script it uses to load 'em.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 19th, 2005, 2:03 PM   #5
ksm
Newbie
 
Join Date: Aug 2005
Posts: 3
Rep Power: 0 ksm is on a distinguished road
Send a message via Yahoo to ksm
Hey the complete code is:

All the script is written by dreamweaver:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
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];}}
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" onLoad="MM_preloadImages('images/DaMag_b1.jpg','images/DaMag_d1.jpg','images/DaMag_e1.jpg','images/DaMag_f1.jpg','images/DaMag_c.jpg')" style="margin:0">
<table border="0" cellpadding="0" cellspacing="0" style="margin:0">

  <tr>
    <td><img src="images/DaMag_a.jpg" width="198" height="15"></td>
  </tr>
  <tr> 
<td> <a href="#" onClick="MM_nbGroup('down','group1','who are we?','images/DaMag_b1.jpg',1)" onMouseOver="MM_nbGroup('over','who are we?','images/DaMag_b1.jpg','images/DaMag_b1.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="who are we?" src="images/DaMag_b.jpg" border="0" onLoad="" width="198" height="25"></a></td>
  </tr>
  <tr> 
<td> <a href="#" onClick="MM_nbGroup('down','group1','DaMag','images/DaMag_c.jpg',1)" onMouseOver="MM_nbGroup('over','DaMag','images/DaMag_c.jpg','',1)" onMouseOut="MM_nbGroup('out')"> 
      <img name="DaMag" src="images/DaMag_c.jpg" border="0" onLoad="" align="top" width="198" height="25"></a> 
    </td>
  </tr>
  <tr> 
<td><a href="#" onClick="MM_nbGroup('down','group1','psynapse@tribe','images/DaMag_d1.jpg',1)" onMouseOver="MM_nbGroup('over','psynapse@tribe','images/DaMag_d1.jpg','images/DaMag_d1.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="psynapse@tribe" src="images/DaMag_d.jpg" border="0" onLoad="" align="top" width="198" height="25"></a> 
    </td>
  </tr>
  <tr> 
<td><a href="#" onClick="MM_nbGroup('down','group1','join mailing list','images/DaMag_e1.jpg',1)" onMouseOver="MM_nbGroup('over','join mailing list','images/DaMag_e1.jpg','',1)" onMouseOut="MM_nbGroup('out')"><img name="join mailing list" src="images/DaMag_e.jpg" border="0" onLoad="" align="top" width="198" height="25"></a> 
    </td>
  </tr>

  <tr> 
 <td> <a href="#" onClick="MM_nbGroup('down','group1','guestbook','images/DaMag_f1.jpg',1)" onMouseOver="MM_nbGroup('over','guestbook','images/DaMag_f1.jpg','',1)" onMouseOut="MM_nbGroup('out')"> 
      <img name="guestbook" src="images/DaMag_f.jpg" border="0" onLoad="" align="top" width="198" height="25"></a> 
    </td>
  </tr>

  <tr>
    <td><img src="images/DaMag_g.jpg" width="198" height="25"></td>
  </tr>
</table>
</body>
</html>

Last edited by Pizentios; Aug 19th, 2005 at 2:14 PM.
ksm is offline   Reply With Quote
Old Aug 19th, 2005, 2:14 PM   #6
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Fixed the code tags.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Aug 19th, 2005, 3:14 PM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8 Ooble is on a distinguished road
That is some NASTY code. I suggest reading up on JavaScript and writing it yourself. Click here for a great site.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 19th, 2005, 3:29 PM   #8
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 3 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Recommended: http://jennifermadden.com
Others: http://www.programmingforums.org/for...ead.php?t=5405
coldDeath is offline   Reply With Quote
Old Aug 19th, 2005, 4:11 PM   #9
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8 Ooble is on a distinguished road
Nice site. I'll keep that one bookmarked.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Aug 19th, 2005, 4:14 PM   #10
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 3 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Yeah it is, someone else recommended it to me and its pretty good.
coldDeath is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:10 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC