PDA

View Full Version : Javascript blows out design view-help


zebulonzed
04-01-2010, 08:02 AM
I have for the first time run into a javascript (which uses a form action) that completely mutilates what I see in Design View, all the page elements are blown to insane widths and scattered everywhere. Hours of tinkering with the code haven't solved anything, and though the code functions perfectly in browser tests, I'm incapable of working in the Design view because of the severity of the distortion the script/form produces there. I'll be using this template so often I need the Design View functionality and don't want to muck with hard coding every time I need to use this script. Is there no way to frame or bracket a section of script/code where the Design View will basically ignore it and not display anything? It seems to do this with just about every other javascript I've even implemented, showing a little icon where the script/code is. This one however begins with <form name=...> and then has some html involved, and then a javascript, all involved (Its a Dynamic Image selector Script from www.dynamicdrive.com).

I'm wondering if there isn't a way to make this work with DreamWeavers design mode, something I'm just missing or don't know about.. or if there was a simple way to put the whole code on a page as a .js file and call to it, but I'm rather clueless about how to do that as far as the code I would need to make the proper call-to. (I use DreamWeaver MX. Yeah, I know, I know, it's got dust on it and cob webs, but I'm comfortable!! :roll: )

Any help or hints would be greatly appreciated!

edbr
04-01-2010, 09:31 AM
if it looks ok in browsers , then that what counts, dont worry about design view as such just consider it a tool for quick reference but always test in actual browsers.

zebulonzed
04-01-2010, 11:26 PM
I understand that, but my problem is, I have to work in the design view for this template probably 10 times a day... and quickly... it's so blown out of whack nothing I do in design mode makes any sense this way at all. And I'm no hard-coder, and don't have time to hard-code. Looks like I better find a script that doesn't do this. Seems like a great over sight that DWR wouldn't implement some kind of script blocking for design mode, though... even super simple programs from the dinosaur days like Pagemill allowed that. All one saw was an icon indicating an active script and the design view remained unchanged.

Thanks for the feedback, though! Nice to find this forum specifically for DreamWeaver. (PS: I have some very old pages constructed in Pagemill 2.0 I'd like to have DreamWeaver (MX) "adopt," but it seems not to want to do that, it chokes the program and sometimes crashes, not to mention the difference in the code. Is there some secret to wrangling old code to new code I don't know about? I'd love to be able to work those pages (make updates, etc) now in DWR, but it doesn't want to convert or deal with them (and most are VERY simple pages). I think Pagemill 2.0 composes in html 2.0.). Any hope there, or do I have to just rebuild those suckers (ulgh)?

DWcourse
04-02-2010, 02:02 AM
If you have Dreamweaver CS4 read up on Design-time style sheets. It lets you create styles that apply only in Design View and not in the browser. You can also choose not to use some of your styles in Design View.