This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > March 2004 > DOM





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author DOM
parfive

2004-03-01, 6:29 pm

I wanted to integrate a website I coded "by hand"
into Dreamweaver MX. So far so good, however,
a page that references a .js DOM file is causing
lots of trouble, in fact it crashes the whole thing.

Your help is greatly appreciated!

Thank you.



mrichmond

2004-03-01, 7:29 pm

If you rpage worked "just fine" when coded by hand then it should work "just
fine" if you open it in DW. DW is just an editor. there is no integration
necessary if you properly coded the HTML.

There is most likely a problem in the DOM references in your JS file. ut as
you have not posted any files nor any code ther eis no way to tell.

Also you should include a description of what you are trying to do and exactly
what the problem is. Does it occur in both IE and Mozilla? Only in Safari?
Does it work in Opera? There are many questions that need to be answered by yo
before we can give you tips or advice.

parfive

2004-03-02, 8:28 am

Thanks for the answer. It renders fine in IE6, but it is a complete mess
in DWeaver. All it does is activate a drop down menu using DOM objects.

Here comes the .JS and the file that calls it.

I had to truncate the file at ...

<html> <head><title> deTOOL </title>
<LINK rel="stylesheet" type="text/css" href="linko.css">
<script language="JavaScript" src="dom.js"></script>

<script language="JavaScript"><!--

var timer, closing = true;

function closeMenu() {
closing = true;
timer = setTimeout('closeMenuAll()',500);
}

function keepOpen() {
closing = false;
clearTimeout(timer);
}

function closeMenuAll() {
if (window.DOMObjects && closing) {
for (var i=0; i<DOMObjects.length; i++) {
if (DOMObjects[i].id != 'toolbar')
DOMElementHide(DOMObjects[i]);
}
}
}

function openMenu(menu, x, y) {
if (window.DOMObjects) {
for (var i=0; i<DOMObjects.length; i++)
if (DOMObjects[i].id != 'toolbar' && DOMObjects[i].id != menu)
DOMElementHide(DOMObjects[i]);

keepOpen();

DOMElementSetLeft(DOMObjects[menu],xOffset + x);
DOMElementSetTop(DOMObjects[menu],yOffset + y);
DOMElementShow(DOMObjects[menu]);
}
}

.....
</head>
<body onLoad="start()" topmargin="0" leftmargin="0"
marginwidth="0" marginheight="0">
<span id="toolbar" class="v" style="top:0; left:456;"> <a href="#"
onMouseOver="openMenu('menu1',0,20)" onMouseOut="closeMenu()"><img
src="IMAGES/MENU1.png" width="100" height="20" border="0">
</a> <a href="#" onMouseOver="openMenu('menu2',100,20)"
onMouseOut="closeMenu()"><img src="IMAGES/MENU2.png" width="100" height="20"
border="0"></a>
<a href="#" onMouseOver="openMenu('menu3',200,20)"
onMouseOut="closeMenu()"><img src="IMAGES/MENU3.png" width="100" height="20"
border="0"></a>
</span><br>
<br>
<span id="menu1" class="l">
<layer onMouseOver="keepOpen()" onMouseOut="closeMenu()">
<table border="0" cellspacing="0" cellpadding="0"
background="images/canvas.gif">
<tr>
<td> <table class="t" border="0" cellspacing="0" onMouseOut="closeMenu()"
onMouseOver="keepOpen()">
<tr>
<td> <a class="m" href="E:/neweb/wind.htm"
target="look"><strong>Windows
OS</strong></a><br> <a class="m" href="E:/neweb/htee.htm"
target="look"><strong>HTML</strong></a><br>
<a class="m" href="E:/neweb/spa.htm"
target="look"><strong>SPANISH</strong></a><br>
</td>
</tr>
</table></td>
</tr>
</table>
</layer>
</span><span id="menu2" class="l">
<layer onMouseOver="keepOpen()" onMouseOut="closeMenu()">
<table border="0" cellspacing="0"
cellpadding="0"background="images/canvas.gif"><tr><td>
<table class="t" border="0" cellspacing="0" onMouseOut="closeMenu()"
onMouseOver="keepOpen()"><tr><td>
<a class="m" href="E:/neweb/AMAZON.htm"
target="look"><strong>AMAZONIA</strong></a><br>
<a class="m" href="E:/neweb/GALAPAGOS.htm"
target="look"><strong>GALAPAGOS</strong></a><br>
<a class="m" href="E:/neweb/ANDES.htm"
target="look"><strong>ANDES</strong></a><br>


</td></tr></table>
</td></tr></table></layer></span>

<span id="menu3" class="l">
<layer onMouseOver="keepOpen()" onMouseOut="closeMenu()">
<table border="0" cellspacing="0" cellpadding="0"
background="images/canvas.gif"><tr><td>
<table class="t" border="0" cellspacing="0" onMouseOut="closeMenu()"
onMouseOver="keepOpen()"><tr><td>
<a class="m" href="E:/neweb/student.htm"
target="look"><strong>STUDENT</strong></a><br>
<a class="m" href="E:/neweb/holydays.htm"
target="look"><strong>HOLIDAYS</strong></a><br>
<a class="m" href="E:/neweb/how.htm" target="look"><strong>KNOW
HOW</strong></a><br>
</td></tr></table>
</td></tr></table></layer></span>


<body background="images/canvas.gif">


<style> <!--

#city {position: absolute;
left: 2px;
top: 2px;
width: 84px;
height: 86px;
font-family:sans-serif;
color:green;
font-size:10pt;}

#dunga {position: absolute;
left: 86px;
top: 2px;
width: 370px;
height: 86px;
font-family:sans-serif;
color:green;
font-size:10pt;}


--> </style>


<div id="city">
<P align="center">
<img src="images/city.gif" width="84" height="76">
<a href="new_order.htm" target="look"><STRONG>NEW ORDER</STRONG></a></p>
</div>

<div id="dunga">
<P align="center"><img src="IMAGES/RUMI2.gif" width="370" height="76">
<a href="wishes.htm" target="look"><STRONG>WISH YOU WERE</STRONG></a></P>
</div>


</body>
</html>

Murray *TMM*

2004-03-02, 12:28 pm

par:

Can you post a URI to the page?

You are using <span> tags as positioned elements?

You are using <layer> tags?

You have two <body> tags?

You have embedded styles in the body?

I'd say DW is a bit confused by your handcoding style.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"parfive" <webforumsuser@macromedia.com> wrote in message
news:c21tkk$1fk$1@forums.macromedia.com...
> Thanks for the answer. It renders fine in IE6, but it is a complete mess
> in DWeaver. All it does is activate a drop down menu using DOM objects.
>
> Here comes the .JS and the file that calls it.
>
> I had to truncate the file at ...
>
> <html> <head><title> deTOOL </title>
> <LINK rel="stylesheet" type="text/css" href="linko.css">
> <script language="JavaScript" src="dom.js"></script>
>
> <script language="JavaScript"><!--
>
> var timer, closing = true;
>
> function closeMenu() {
> closing = true;
> timer = setTimeout('closeMenuAll()',500);
> }
>
> function keepOpen() {
> closing = false;
> clearTimeout(timer);
> }
>
> function closeMenuAll() {
> if (window.DOMObjects && closing) {
> for (var i=0; i<DOMObjects.length; i++) {
> if (DOMObjects[i].id != 'toolbar')
> DOMElementHide(DOMObjects[i]);
> }
> }
> }
>
> function openMenu(menu, x, y) {
> if (window.DOMObjects) {
> for (var i=0; i<DOMObjects.length; i++)
> if (DOMObjects[i].id != 'toolbar' && DOMObjects[i].id != menu)
> DOMElementHide(DOMObjects[i]);
>
> keepOpen();
>
> DOMElementSetLeft(DOMObjects[menu],xOffset + x);
> DOMElementSetTop(DOMObjects[menu],yOffset + y);
> DOMElementShow(DOMObjects[menu]);
> }
> }
>
> .....
> </head>
> <body onLoad="start()" topmargin="0" leftmargin="0"
> marginwidth="0" marginheight="0">
> <span id="toolbar" class="v" style="top:0; left:456;"> <a href="#"
> onMouseOver="openMenu('menu1',0,20)" onMouseOut="closeMenu()"><img
> src="IMAGES/MENU1.png" width="100" height="20" border="0">
> </a> <a href="#" onMouseOver="openMenu('menu2',100,20)"
> onMouseOut="closeMenu()"><img src="IMAGES/MENU2.png" width="100"

height="20"
> border="0"></a>
> <a href="#" onMouseOver="openMenu('menu3',200,20)"
> onMouseOut="closeMenu()"><img src="IMAGES/MENU3.png" width="100"

height="20"
> border="0"></a>
> </span><br>
> <br>
> <span id="menu1" class="l">
> <layer onMouseOver="keepOpen()" onMouseOut="closeMenu()">
> <table border="0" cellspacing="0" cellpadding="0"
> background="images/canvas.gif">
> <tr>
> <td> <table class="t" border="0" cellspacing="0"

onMouseOut="closeMenu()"
> onMouseOver="keepOpen()">
> <tr>
> <td> <a class="m" href="E:/neweb/wind.htm"
> target="look"><strong>Windows
> OS</strong></a><br> <a class="m" href="E:/neweb/htee.htm"
> target="look"><strong>HTML</strong></a><br>
> <a class="m" href="E:/neweb/spa.htm"
> target="look"><strong>SPANISH</strong></a><br>
> </td>
> </tr>
> </table></td>
> </tr>
> </table>
> </layer>
> </span><span id="menu2" class="l">
> <layer onMouseOver="keepOpen()" onMouseOut="closeMenu()">
> <table border="0" cellspacing="0"
> cellpadding="0"background="images/canvas.gif"><tr><td>
> <table class="t" border="0" cellspacing="0" onMouseOut="closeMenu()"
> onMouseOver="keepOpen()"><tr><td>
> <a class="m" href="E:/neweb/AMAZON.htm"
> target="look"><strong>AMAZONIA</strong></a><br>
> <a class="m" href="E:/neweb/GALAPAGOS.htm"
> target="look"><strong>GALAPAGOS</strong></a><br>
> <a class="m" href="E:/neweb/ANDES.htm"
> target="look"><strong>ANDES</strong></a><br>
>
>
> </td></tr></table>
> </td></tr></table></layer></span>
>
> <span id="menu3" class="l">
> <layer onMouseOver="keepOpen()" onMouseOut="closeMenu()">
> <table border="0" cellspacing="0" cellpadding="0"
> background="images/canvas.gif"><tr><td>
> <table class="t" border="0" cellspacing="0" onMouseOut="closeMenu()"
> onMouseOver="keepOpen()"><tr><td>
> <a class="m" href="E:/neweb/student.htm"
> target="look"><strong>STUDENT</strong></a><br>
> <a class="m" href="E:/neweb/holydays.htm"
> target="look"><strong>HOLIDAYS</strong></a><br>
> <a class="m" href="E:/neweb/how.htm" target="look"><strong>KNOW
> HOW</strong></a><br>
> </td></tr></table>
> </td></tr></table></layer></span>
>
>
> <body background="images/canvas.gif">
>
>
> <style> <!--
>
> #city {position: absolute;
> left: 2px;
> top: 2px;
> width: 84px;
> height: 86px;
> font-family:sans-serif;
> color:green;
> font-size:10pt;}
>
> #dunga {position: absolute;
> left: 86px;
> top: 2px;
> width: 370px;
> height: 86px;
> font-family:sans-serif;
> color:green;
> font-size:10pt;}
>
>
> --> </style>
>
>
> <div id="city">
> <P align="center">
> <img src="images/city.gif" width="84" height="76">
> <a href="new_order.htm" target="look"><STRONG>NEW ORDER</STRONG></a></p>
> </div>
>
> <div id="dunga">
> <P align="center"><img src="IMAGES/RUMI2.gif" width="370" height="76">
> <a href="wishes.htm" target="look"><STRONG>WISH YOU WERE</STRONG></a></P>
> </div>
>
>
> </body>
> </html>
>



Murray *TMM*

2004-03-02, 12:28 pm

Check these out:

Dreamweaver MX 2004: The Missing Manual - by David Sawyer McFarland
http://www.amazon.com/exec/obidos/t...=books&n=507846

Depending on your technical expertise, the following could become one of
your most useful references -

Dreamweaver MX 2004 Bible - by Joseph Lowery
http://www.amazon.com/exec/obidos/t...=books&n=507846

Dreamweaver MX 2004: The Complete Reference, Second Edition
http://www.amazon.com/exec/obidos/t...=books&n=507846

And finally, you will *definitely* want this one once you get to speed!

Dreamweaver MX 2004 Magic - by Massimo Foti, Angela Buraglia, and Dan Short
(with help from their friends)
http://www.amazon.com/exec/obidos/t...=books&n=507846

In addition, I can't praise this one highly enough -

http://www.projectseven.com/foundations/index.htm



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"parfive" <webforumsuser@macromedia.com> wrote in message
news:c22a7i$l8e$1@forums.macromedia.com...
> The URL is:
>
> http://www.magma.ca/~jguevara
>
> Don't laugh.... I shaved my teeth working on it,
> and I am just about to give up on DW
> Can you recommend a good book?
>
> I picked up Betsy Bruce's and it is just about
> a nightmare! arghhhh!!!
>
> Thank you for your time
>



parfive

2004-03-02, 12:28 pm

The URL is:

http://www.magma.ca/~jguevara

Don't laugh.... I shaved my teeth working on it,
and I am just about to give up on DW
Can you recommend a good book?

I picked up Betsy Bruce's and it is just about
a nightmare! arghhhh!!!

Thank you for your time

Murray *TMM*

2004-03-02, 12:29 pm

Sorry to hear about your teeth. Sadly, it didn't work! 8(

Your default page has this *only* -

<frameset rows="98,*" frameborder="0" border="0" scrolling="0">
<frame src="tools.htm" name="tools">
<frame src="main.htm" name="main">
</frameset>

Before giving up on DW, you should get out your HTML books.


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"parfive" <webforumsuser@macromedia.com> wrote in message
news:c22a7i$l8e$1@forums.macromedia.com...
> The URL is:
>
> http://www.magma.ca/~jguevara
>
> Don't laugh.... I shaved my teeth working on it,
> and I am just about to give up on DW
> Can you recommend a good book?
>
> I picked up Betsy Bruce's and it is just about
> a nightmare! arghhhh!!!
>
> Thank you for your time
>



parfive

2004-03-02, 5:28 pm

Like I said, it wokrs well in IE6, the framset code is enough
for that frame, I ahve another frame defined in the same
fashion.

Thanks for the pointers.
I don't have the 2004 version, are those books
backwards compatible?



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews