?
Solved

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

Posted on 2005-02-24
9
Medium Priority
?
379 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:Rowby Goren
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 13399607
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
 
LVL 19

Expert Comment

by:webwoman
ID: 13400446
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
 
LVL 9

Author Comment

by:Rowby Goren
ID: 13403446
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:sky99yahoo
ID: 13411224
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
 
LVL 9

Author Comment

by:Rowby Goren
ID: 13412461
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
 
LVL 10

Accepted Solution

by:
Havin_it earned 2000 total points
ID: 13437853
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
 
LVL 10

Expert Comment

by:Havin_it
ID: 13444725
Hey, thanks for the A! What worked for you in the end?
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 13449864
The external script.  Especially since the script needs to be on multiple pages.
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 13449873
By the way, sky99yahoo -- thanks for your suggestion too.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question