Click to See Complete Forum and Search --> : javascript paths don't update in DW


skeeterchariot
08-12-2006, 06:36 PM
Has anyone noticed that javascript paths enclosed in single quotes (') are not updated by Dreamweaver when you move the file?

For example, if you move a file to a subdirectory, all paths should automatically get a ../ added like this:

<a href="../main.htm">

becomes

<a href="../../main.htm">

Ok, so far so good. But now add some javascript with a path in single quotes, and try it again:

<a href="../main.htm" onmouseover="image0.src='../main-on.gif';">

becomes

<a href="../../main.htm" onmouseover="image0.src='../main-on.gif';">

The first path got updated, but the second path was completely ignored. This is causing total havoc with my files!! Please someone tell me how to fix this in Dreamweaver (it never happened to me in Frontpage). And how could such a common problem go unnoticed? I've posted in 3 forums, including Adobe's help forum, and no one seems to know what I'm talking about! :mad:

Wiz Creations
08-14-2006, 03:30 AM
I haven't noticed that, but I haven't had a cause to use single quotes. I do understand what you're talking about though, because when I change things, DW updates the links automatically. I don't know if there's a way you can set it to correct, so the only solution I can offer is manual changes.

skeeterchariot
08-14-2006, 06:47 AM
Thx for the tip, wiz. I discovered that it's pretty easy to fix it by doing a find & replace:

Find:
'../

Replace:
'../../

The only problem is that it doesn't work with templates (because templates can only be edited in the .dwt file, and changes are applied to all pages). That's a bummer, because I liked the template feature.

Wiz Creations
08-15-2006, 07:40 PM
couldn't you just open the template file..? Be careful with the find and prelace. You don't want to accidently do one twice.