Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Dreamweaver won't let me paste head scripts from one page to another

I  never noticed this issue until  receintly in Dreamweaver MX 2004

I have a javascript menu system on a test page that I need to transfer to another html page.

WHile it lets me COPY the section -- it will not let me paste it into another header section.

I can copy the material into another non-dreamweave document (such as Word or notepad), but it will not let me copy it into another dreamweaver html header.

As a test I left out the opening and closing javascript statements -- and dreamwever did indeed let me copy it to the other document's header.  

I assume there is a setting that I must change in preferences?   Or what else?

Here is an example  of the code that would not copy and paste:

 <script language="JavaScript">

I know I have been able to copy and paste before -- but not anymore!


Rowby Goren
Rowby Goren
1 Solution
Ryan ChongCommented:
try open your page in HTML mode, then do a copy there.... then try paste it to your target page? (also try to paste it to notepad for testing...)

I think this should works!
Is it a template? You most likely will NOT be able to do things like that in a new page based on a template.
Rowby GorenAuthor Commented:

No it's not a template.  And I think I have tried a version of ryancy's suggestion.  But I'll try again.

I"m thinking it *might* be an anti-virus program not javascript -- because when I leave out the begninning and ending of the script (the p <script language="JavaScript"> portions, I am able to make the copy.  

But I'll do some more testing.   On another computer at a client today.

Stay tuned!

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.


Ok, this is the 3rd time I see someone having this problem and my solution is this:

The solution that is basically to clear the configurations for dreamweaver.

C:\Documents and Settings\<Your account name>\Application Data\Macromedia\Dreamweaver MX 2004\Configuration

To acertain if this is the case, you can simply test it by moving the configuration folder to somewhere else. If it still doesnt work, simply put it back.

When your config folder is not there, Dreamweaver will auto-recreate it again, thus fixing any error that occured earlier.

Now my dreamweaver works fine again without having to reinstall it.

I could have looked through what is the problematic file, but i guessed it was easier to simply replace the configuration folder completely. Nothing much in there if u are only using basic dreamweaver functions. Just that you have to recreate the site cache once for all the sites again(quite fast).

Your sites' settings should not be affected. (ie Site name, FTP settings etc)


My earlier fix:
Rowby GorenAuthor Commented:

Unfortunatley it didn't work :(  

But your suggestion is excellent and I will keep it in mind when something similar (or the same) happens again in Dreamweaver.  I am going to test the issue on the same file with a different copy of dreamweaver on Monday to see if my problem is Dreamweaver related, or if it has something to do with my local computer (I suspect perhaps overly aggressive anti-virus software.)

Your suggestion is appreciated and will be filed away!

This doesn't directly solve your problem, but if you are using this script across multiple pages you might want to consider sticking it in an external JavaScript file.

Just copy the entire script (minus the <script> tags and comments) into a new .js file (available from the New Document menu), and reference it in the page like

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

If you still can't copy to perform the above in DW, just do it in Notepad and you won't have to do it again.  Also there is an extension available on the Macromedia Exchange (under 'Scripting' i think) that hot-swaps any script between internal/external, which might be helpful in future.
Hey, thanks for the A! What worked for you in the end?
Rowby GorenAuthor Commented:
The external script.  Especially since the script needs to be on multiple pages.
Rowby GorenAuthor Commented:
By the way, sky99yahoo -- thanks for your suggestion too.

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now