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">
<!--
Foobar
}
//-->
</script>

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

Thanks

Rowby
LVL 9
Rowby GorenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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!
0
webwomanCommented:
Is it a template? You most likely will NOT be able to do things like that in a new page based on a template.
0
Rowby GorenAuthor Commented:
Hi

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!

Rowby
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

sky99yahooCommented:
Hi,

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)

Cheers!

My earlier fix:
http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_21272503.html
0
Rowby GorenAuthor Commented:
HI

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!

Rowby
0
Havin_itCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Havin_itCommented:
Hey, thanks for the A! What worked for you in the end?
0
Rowby GorenAuthor Commented:
The external script.  Especially since the script needs to be on multiple pages.
0
Rowby GorenAuthor Commented:
By the way, sky99yahoo -- thanks for your suggestion too.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.