EditWrx Knowledge Base Home
 Search       Login   Register   Members   Help   Home 
Search by username

EditWrx Knowledge Base > Open End User Forum > Block Editing > Excludeblock and javascript submenu issue

Excludeblock and javascript submenu issue
 Moderated by: Keith  
 New Topic   Reply   Print 
AuthorPost
Martin
Member
 

Joined: Tue Jun 14th, 2005
Location:  
Posts: 66
 Posted: Sat Jun 23rd, 2007 10:53 am
 Quote  Reply 
Hello all,

I have a small problem I can't seem to solve. On my clients site I have placed the javascript menu between exludeblocks.
http://www.isis-books.nl/english/thankyou.html

But I can still mess the submenu items up with editwrx which results in a menu that doesn't work properly anymore.

I am not entirely sure what I am doing wrong. Could someone have a look at the source and help me out?

I have this between the head tags:
<script type="text/javascript" language="JavaScript1.2" src="js/stmenu.js"></script>


Which I haven't placed between exludeblocks

And in the body I have this:
<div id="ldhestandaardHtml1" style="position: absolute; left: 1px; top: 118px; width: 197px; height: 167px;" align="left">

<div excludeblock="one">

<script type="text/javascript" language="JavaScript1.2" src="js/menu.js"></script></div>

</div><!-- excludeblock="one" -->  


Regards,
Martin

Keith
Moderator
 

Joined: Fri Apr 8th, 2005
Location:  
Posts: 583
 Posted: Sat Jun 23rd, 2007 05:25 pm
 Quote  Reply 
You're not going to be able to use an excludeblock and get the results you want.

You have it set up to edit the full page - with the exception of the excludeblock. The problem is that the menu javascript creates a new element on the page for each menu item expansion. These new elements are inserted into the body of the page with document.body.appendChild. Therefore, when you save the page these elements become permanetly part of the page.

You need to instead use an editblock in the part of the page that you weant to be editable - I assume the area containing "The form has been sent."

<span class="arial100FFFFFFtb" editblock="one">The form had been sent<A class="arial100FFFFFFtb" onclick="javascript:history.back();return false;" href="/a.htm#">!</A></span><!-- editblock="one" --></div>

 

If you place an editblock on the page, EditWrx is entirely unaware that there is anything else on the page. Therefore, elements that get added to the body outside of the editblock is completely ignored.

Also, editability can have rendering problems on absolute elements because of inheritance problems. Notice that your menu expansions are distorted the way you have it with the full page being editable. If you instead us an editblock so that the menu expansions are outside of the editable area, the menu expansions display correctly.

Martin
Member
 

Joined: Tue Jun 14th, 2005
Location:  
Posts: 66
 Posted: Sat Jun 23rd, 2007 09:25 pm
 Quote  Reply 
Thanks Keith!

I will change it and create editblocks instead:-).

Martin


 Current time is 05:52 pm




Powered by WowBB 1.62 - Copyright © 2003-2004 Aycan Gulez