PDA

View Full Version : Help, Script not updating



Saciro
12-18-2006, 02:12 AM
1) Script Title:AnyLink Vertical Menu
2) Script URL (on DD):http://www.dynamicdrive.com/dynamicindex1/anylinkvertical.htm
3) Describe problem:

Hi, I changed :

var menu1=new Array()
menu1[0]='&nbsp;›&nbsp;<a href="index.html" class="navi">Overview</a><br>'
menu1[1]='&nbsp;›&nbsp;<a href="about-diff.html" class="navi">Our&nbsp;Differentiation&nbsp;</a><br>'
menu1[2]='&nbsp;›&nbsp;<a href="about-md.html" class="navi">MD\'s Message</a><br>'
menu1[3]='&nbsp;›&nbsp;<a href="about-qp.html" class="navi">ISO Certification</a><br>'
menu1[4]='&nbsp;›&nbsp;<a href="about-geo.html" class="navi">Geographical&nbsp;Coverage&nbsp;</a><br>'
menu1[5]='&nbsp;›&nbsp;<a href="about-test.html" class="navi">Testimonial</a><br>'

var menu2=new Array()
menu2[0]='&nbsp;›&nbsp;<a href="prod.html" class="navi">Overview</a><br>'
menu2[1]='&nbsp;›&nbsp;<a href="prod-cm.html" class="navi">Custom&nbsp;Molding&nbsp;</a><br>'

var menuwidth='200px'
var menubgcolor='#003366'
var disappeardelay=250
var hidemenu_onclick="yes"
var ie4=document.all
var ns6=document.getElementById&&!document.all

to

var menu1=new Array()
menu1[0]='&nbsp;›&nbsp;<a href="index.html" class="navi">Overview</a><br>'
menu1[1]='&nbsp;›&nbsp;<a href="about-diff.html" class="navi">Our&nbsp;Differentiation&nbsp;</a><br>'
menu1[2]='&nbsp;›&nbsp;<a href="about-md.html" class="navi">MD\'s Message</a><br>'
menu1[3]='&nbsp;›&nbsp;<a href="about-qp.html" class="navi">ISO Certification</a><br>'
menu1[4]='&nbsp;›&nbsp;<a href="about-geo.html" class="navi">Geographical&nbsp;Coverage&nbsp;</a><br>'
menu1[5]='&nbsp;›&nbsp;<a href="about-test.html" class="navi">Testimonial</a><br>'

var menu2=new Array()
menu2[0]='&nbsp;›&nbsp;<a href="prod.html" class="navi">Overview</a><br>'
menu2[1]='&nbsp;›&nbsp;<a href="prod-macrotech.html" class="navi">Macrotech</a><br>'
menu2[2]='&nbsp;›&nbsp;<a href="prod-parco.html" class="navi">Parco</a><br>'
menu2[3]='&nbsp;›&nbsp;<a href="prod-cdi.html" class="navi">CDI Polytek</a><br>'
menu2[4]='&nbsp;›&nbsp;<a href="prod-cm.html" class="navi">Custom&nbsp;Molding&nbsp;</a><br>'

var menuwidth='200px'
var menubgcolor='#003366'
var disappeardelay=250
var hidemenu_onclick="yes"
var ie4=document.all
var ns6=document.getElementById&&!document.all


Merely adding in a few more items on menu 2 , but even after I've uploaded the edited file, the change doesn't seem to take effect on my browser.

When I check the file on my ftp server, its fine, but when I download it through my browser, I find its the old version.

Do I have to wait for awhile before the changes get updated ?

Please help, completely new to java script.

jscheuer1
12-18-2006, 03:24 AM
I suppose there are all sorts of reasons why this might happen. I am 99.99% sure that none of them have to do with javascript. The two most likely causes are:

1 ) Your browser has the old file cached. It will not show the new version until the cache is cleared. This often happens periodically, depending upon your browser's settings or you can clear the cache manually. Hitting the refresh button while on the page should also take care of this most of the time. This is the most likely, check it first.

2 ) You uploaded the new file but, not by the correct name and/or location. The old file is still in place, the new file is on the server but, not at the address you are expecting. The solution is to find the correct address and put the new file there. Upper and lower case letters in the filename are crucial on the web and must match exactly, this is not the case most times on the local machine.

Other possibilities exist, I am sure but, they are all 1 chance in 100 or less.

Saciro
12-18-2006, 03:53 AM
Hi,

Thank you for the reply.

I've tried refreshing my browser and accessing the page from a different computer, the old menu is still displayed, so I dont think it's due to my cache not being cleared.

I've also checked the file name, it's correct and I downloaded FTP surfer just to use its file finding feature and could only find one copy of the file in the folder where I uploaded it.

Are there any other possible causes of this problem ?

Thanks once again, your help is greatly appreciated. :)

jscheuer1
12-18-2006, 07:22 AM
Yes, but to get an idea of what they might be, I would need a link to your page. One thing you haven't told me though and that you could try is - if you view the page's source code in the browser, is it the old or the new file? However, when you say downloaded with the browser, this is about the same thing. Still check the source, you may have a syntax error that I am not seeing or that isn't in your post but, that is in the new file. If the view source looks like the new file, this is probably the problem (syntax). It could also be something odd with the server, directory and/or file permissions or server side caching.

Saciro
12-19-2006, 02:10 AM
Hi ,

The link to my page is

www.multiseals.com.sg

the script : www.multiseals.com.sg/dd.js

the source points to the correct file , so it might have something to do with permissions or caching on the server side, I suppose I'd have to contact my webserver to rectify such a problem ?

Thanks again for your replies.

thetestingsite
12-19-2006, 02:22 AM
Well, I just went at the link you posted above and the menu appears to be the same as in your original post. When I mouse over the "Products" menu, it shows all of the items in the part you changed (original post). I have tried this in FF and IE6 and it looks fine.

jscheuer1
12-19-2006, 04:02 AM
Yes, the expanded products drop down is there and working. However:

Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice.

Also, to work properly in other browser (other than IE) the call to menu1 should be with a width of 180px not 125px:


onMouseover="dropdownmenu(this, event, menu1, '180px');MM_swapImage('about','','images/subabout-r.gif','change','','images/sub-about.jpg',1)"

Saciro
12-19-2006, 05:33 AM
Hi,

Thanks very much for your help

jscheuer1 and thetestingsite !

Have no idea why it isn't showing properly on either of my browsers.

Also, I apologise for not crediting Dynamic Drive in my code.

The script didn't actually originate from here, it was done by the web design company I originally contracted to build my site for me. I just decided to try my hand at making additions to my site myself, and come here to ask for help because I found their script closely resembled yours. I apologise for any confusion I might have caused with my original post.

Though I would very much like to credit dynamic drive in the script I wouldn't want to risk encountering any legal issues as the script was originally written by the coders at the company I contracted.

Thank you very much for you help though, I wouldn't have been able to resolve the problem myself. I will certainly come here should I need to make any additions to my website that requires dynamic scripting.

jscheuer1
12-19-2006, 07:46 AM
If the page still hasn't updated for you, try clearing the cache in your browser(s). And, make sure you are accessing the page via the link you provided in your post.

As for the credit, it must be included for legal use. You should inform your web design company of this fact and reinstate it yourself. Use this on your pages:


<script type="text/javascript" src="dd.js">

/***********************************************
* AnyLink Vertical Menu- Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

in place of:


<SCRIPT language="JavaScript" src="dd.js"></script>

Ddadmin, who administers these forums and who also runs Dynamic Drive, would probably appreciate knowing the name of the company and how to contact them. You can PM him with the information here:

http://www.dynamicdrive.com/forums/private.php?do=newpm&u=1

Ddadmin (if he even bothers to contact them) will take no action as long as they stop removing credits from Dynamic Drive scripts.

johnnyboy5
01-05-2007, 01:41 PM
having the same problem with my site on Tripod - you have to wait a while and try refreshing it for good measure.