Show-Hide element in Dreamweaver CS5
Please can you tell me why when I validate a web page I get the following error when using the Show-Hide behaviour. The error is only reported for the first use of the feature and no of the others. I don't understand.
Line 239, Column 235: there is no attribute "onload"…HideLayers('drive','','hide')" onload="MM_showHideLayers('drive','','hide')" /…
✉
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
Below is a copy of the relevant code -The code in bold is the line causing the error. You will notice I have used it more than once, but I didn't get any other error messages. Please help.
<h3>Artist Drive and Palette</h3>
<!-- this enlarges two images using show/hide and two different sized images -->
<div id="drive"><img src="Images/Artist Drive large.jpg" alt="Artist Drive" width="300" height="195" title="Artist Drive" onmouseover="MM_showHideLayers('drive','','show')" onmouseout="MM_showHideLayers('drive','','hide')" onload="MM_showHideLayers('drive','','hide')" />
</div>
<img src="Images/Artist Drive.jpg" alt="Artist Drive" width="100" height="56" class="fltlft" title="Artist Drive" onmouseover="MM_showHideLayers('drive','','show')" onmouseout="MM_showHideLayers('drive','','hide')" onload="MM_showHideLayers('drive','','hide')" />
<div id="palette"><img src="Images/Artist Palette large.jpg" alt="Artist's palette" width="300" height="194" title="Artist's Palette" onmouseover="MM_showHideLayers('palette','','show')" onmouseout="MM_showHideLayers('palette','','hide')" onload="MM_showHideLayers('palette','','hide')" />
</div>
<img src="Images/Artist Palette.jpg" alt="Artist Palette" width="100" height="60" class="fltrt" title="Artist's Palette" onmouseover="MM_showHideLayers('palette','','show')" onmouseout="MM_showHideLayers('palette','','hide')" onload="MM_showHideLayers('palette','','hide')" />
<p class="size">These formations are in Death Vally, California, USA. Artist's Drive rises up to the top of an alluvial fan fed by a deep canyon cut into the Black Mountains. Artist's Palette is on the face of the Black Mountains and is noted for having various colours of rock. These colours are caused by the oxidation of different metals (red, pink and yellow is from iron salts, green is from decomposing tuff-derived mica, and manganese produces the purple). Called the Artist Drive Formation, the rock unit provides evidence for one of the Death Valley area's most violently explosive volcanic periods. The Miocene-aged formation is made up of cemented gravel, playa deposits, and much volcanic debris, perhaps 5,000 feet (1500 m) thick. Chemical weathering and hydrothermal alteration are also responsible for the variety of colours displayed in the Artist Drive Formation and nearby exposures of the Furnace Creek Formation.
</p>
<h3>Badlands</h3>
<!-- this enlarges two images using show/hide and two different sized images -->
<div id="badland"><img src="Images/The Badlands large.jpg" alt="The Badlands" width="300" height="183" onmouseover="MM_showHideLayers('badland','','show')" onmouseout="MM_showHideLayers('badland','','hide')" onload="MM_showHideLayers('badland','','hide')" />
</div>
<p><img src="Images/The Badlands.jpg" alt="The Badlands" width="100" height="61" class="fltlft" onmouseover="MM_showHideLayers('badland','','show')" onmouseout="MM_showHideLayers('badland','','hide')" onload="MM_showHideLayers('badland','','hide')" />
</p>
<div id="badland1"><img src="Images/The Badlands1 large.jpg" alt="The Badlands" width="300" height="132" onmouseover="MM_showHideLayers('badland1','','show')" onmouseout="MM_showHideLayers('badland1','','hide')" onload="MM_showHideLayers('badland1','','hide')" />
</div>
<img src="Images/The Badlands1.jpg" alt="The Badlands" width="100" height="44" class="fltrt" onmouseover="MM_showHideLayers('badland1','','show')" onmouseout="MM_showHideLayers('badland1','','hide')" onload="MM_showHideLayers('badland1','','hide')" />
<p class="size">Badlands National Park, in southwest South Dakota preserves 242,756 acres (98,240 ha) of sharply eroded buttes, pinnacles, and spires blended with the largest protected mixed grass prairie in the United States. On-going rains, freezes and thaws have revealed millions of years of sediment that paint a colourful landscape on the prairies of south-western South Dakota. It contains the world's richest Oligocene epoch fossil beds, dating 23 to 35 million years old.
</p>
Sometimes DW's javascripts will throw errors like that, most of the time it can be ignored.
What doctype are you using (the first line of your html)?
If you have a "Strict" Doctype, did you try changing it to a "Transitional" version as the error report suggested?
Edit > Preferences > New Document > Default Document Type (DTD) > Change from Strict to Transitional of the same version.
Similar Messages
-
Show/hide elements in DW CS3
I've just posted this question and got a reply from John
Waller, thanks John, but what I mean is that I don't want to use
layers, this has to do with the positioning in a table. I want to
add images to a table which is in a layer so I can put margin-left
and margin-right for the layer to "auto" so the whole table
(including images) will always be centered. If I add layers to the
table and add images to the layers (to get the mouse-over effect)
the layers will not move with the table to the center of the page,
I hope you guys know what I mean.
Anybody knows if it would be possible in DW CS3 to do so, see
the original question underneath to get the picuture:
Thanks again.
Hi
In DW8 I often used the possibility to put several layers on
top of eachother with images in them, this way I could show/hide
layers so the images would be visible when having a mouse-over
action on a thumbnail for example.
Now DW-CS3 gives the option show/hide elements, however, I
can not simply put elements on top of eachother, which is what I
want.
Am I stuck on using DW8 and the show/hide layers option, or
is there a way to put multiple images (elements) on top of
eachother in DW-CS3?
Thanks, have a nice day
Ferrohead> table which is in a layer so
> I can put margin-left and margin-right for the layer to
"auto" so the
> whole
> table (including images) will always be centered.
You don't need to use a 'layer' for that, and I assume that
you mean a <div>
not a layer, since the latter implies absolute positioning.
> If I add layers to the table
I sure hope you are referring to just div tags and not
layers, because you
would never want to put an absolutely positioned element
directly into a
table cell.
> I hope you guys know what I mean.
Yes, I'm afraid I do. This whole scheme is just wrong.
It would be much better to use the SetText behavior to simply
dynamically
write the desired image link into a named container on the
page, much like
you can see being done here -
http://dreamweaverresources.com/tutorials/settextoflayer.htm
and a tutorial
http://www.dreamweaverresources.com/tutorials/settextoflayer.htm
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Ferrohead" <[email protected]> wrote in
message
news:[email protected]...
> I've just posted this question and got a reply from John
Waller, thanks
> John,
> but what I mean is that I don't want to use layers, this
has to do with
> the
> positioning in a table. I want to add images to a table
which is in a
> layer so
> I can put margin-left and margin-right for the layer to
"auto" so the
> whole
> table (including images) will always be centered. If I
add layers to the
> table
> and add images to the layers (to get the mouse-over
effect) the layers
> will not
> move with the table to the center of the page, I hope
you guys know what I
> mean.
>
> Anybody knows if it would be possible in DW CS3 to do
so, see the original
> question underneath to get the picuture:
>
> Thanks again.
>
> Hi
> In DW8 I often used the possibility to put several
layers on top of
> eachother
> with images in them, this way I could show/hide layers
so the images would
> be
> visible when having a mouse-over action on a thumbnail
for example.
> Now DW-CS3 gives the option show/hide elements, however,
I can not simply
> put
> elements on top of eachother, which is what I want.
> Am I stuck on using DW8 and the show/hide layers option,
or is there a way
> to
> put multiple images (elements) on top of eachother in
DW-CS3?
>
> Thanks, have a nice day
>
> Ferrohead
>
> -
Hi
In DW8 I often used the possibility to put several layers on
top of eachother with images in them, this way I could show/hide
layers so the images would be visible when having a mouse-over
action on a thumbnail for example.
Now DW-CS3 gives the option show/hide elements, however, I
can not simply put elements on top of eachother, which is what I
want.
Am I stuck on using DW8 and the show/hide layers option, or
is there a way to put multiple images (elements) on top of
eachother in DW-CS3?
Thanks, have a nice day
FerroheadThe functionality is identical in CS3, just the terms have
changed.
Layers (8) = AP Divs (CS3)
Show/Hide Layers (8) = Show/Hide Elements (CS3)
Go to the AP Elements panel (F2 or Window > AP Elements)
and ensure that 1)
all AP Elements are stacked on top of each other (ie there
are no child
elements which are shown by the name being indented in the
list); 2) each
Element has a unique Z index (if not re-number them manually
so they're
unique).
Then apply the Show-Hide Elements behavior to each AP
Element.
Regards
John Waller -
Help with Show/Hide Elements please!
I'm using the show/hide elements behavior for the first time and I'm not sure if it's working right. Am I supposed to be able to preview this feature, either in a browser or in Live View? It's not working in either, but I didn't know if the site had to actually be live for it to work or not.
Also, my div is set to display:none; and I didn't know if that is correct, or if I should set a Z-index on all of them.
Thank you!Am I supposed to be able to preview this feature, either in a browser or in Live View?
Yes - it should work in both.
Also, my div is set to display:none; and I didn't know if that is correct, or if I should set a Z-index on all of them.
That could be the problem - show/hide toggles the visibility attribute between 'visible' and 'hidden'. If the element is styled with display:none, even when it's visible it won't be displayed. So, get rid of the display style, and just use the visibility one. The default z-index is "1", so depending on your layout and the desired interaction with these elements, you may need to adjust your z-index as well. -
Show / Hide Elements - how to make hidden elements non-interactive
Hi,
Is there a way to make hidden obejcts (through 'Show / Hide') not only hidden but completely non-interactive? I.e. even if an image is hidden, it is still click-able, which will release its set commandos (such as 'Swap Image' or 'Set Text of Container').Thanks a bunch! I haven't started out with the code yet. Just made some sketches to see what I need to research etc.
When I get around to it, I'll get back to you!
/Orvar -
Show/Hide Element Dreamweaver
I have the numbers "1 2 3" set up on a page to change a image and text when you click on each number. It works fine but I am not able to figure out how i can get the numbers to stay a specific color to indicate that this is the image you are viewing, a kind of "you are here" state.
Any ideas?
http://www.dinahsite.dananealdesigns.com/index3.html
Many thanks,
HoustonYou will not be able to do this easily since you have so many functions wired into those numbers. The notion would be that you would have to also swap a class assignment on each number's span when one of the numbers is clicked to persist that particular number in a 'clicked' state, and to reset the other numbers to the unclicked state. But not only would I not do things the way you have on this page, I also would not want to add that markup to this already busy element.
By the way, you might want to check your validation - you have reused an ID value on the page. -
On this test page,
http://www.talkitup4free.com/test,
when you click the register link, i use a div for the pop up. but i
want it to pop up in more than just a specified pixels placement.
when you click on it, i want it to automatically center on the
page.<p
onclick="MM_showHideLayers('register','','show')">Click here to
register.</p>
That's not going to work - you cannot reliably attach events
to anything
other than anchor tags. Change that to this -
<p><a href="#"
onclick="MM_showHideLayers('register','','show');return
false">Click here to register.</p>
(of course, either way means that your register option won't
work at all for
someone with js disabled)
Also, you have placed an absolutely positioned element
directly into a table
cell - that's a bad thing to do from the get-go, as has been
posted here
many times. Change your markup to this -
<table width="50%" border="0" cellspacing="0">
<tr>
<td><p>Website</p>
<p> </p>
<p><a href="#"
onclick="MM_showHideLayers('register','','show');return
false">Click here to register.</p>
<p>Text</p>
<p> </p>
<p>More text...</p></td>
</tr>
</table>
<div id="register">
<p>Register Page Goes Here</p>
<p> </p>
<p>Name:
<label>
<input type="text" name="name" id="name" />
</label>
</p>
<p>E-mail:
<label>
<input type="text" name="email" id="email" />
</label>
</p>
</div>
Which will bring your AP div OUT OF THE TABLE.
You will need a <form> tag for the form input elements
to function at all.
So don't forget that.
Finally, you can position the AP div with left="40%" to give
you a centering
effect, or with no position values at all, and auto
left/right margins,
e.g.,
#register {
position:absolute;
width:200px;
height:115px;
z-index:1;
margin:0 auto;
visibility: hidden;
But whether this works as desired would depend on how you
build the rest of
the page.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"future-architect" <[email protected]> wrote
in message
news:[email protected]...
> On this test page,
http://www.talkitup4free.com/test,
when you click the
> register link, i use a div for the pop up. but i want it
to pop up in more
> than
> just a specified pixels placement. when you click on it,
i want it to
> automatically center on the page.
> -
"Show Hide Elements" movie Clips continue to play
I've put a bunch of AP Div tags on a page with video links,
once one begins to play it continues after another thumnail is
clicked. So, a user can soon be bombarded with audio from 8
different clips playing all at once, because once one begins
playing, it seems to not "hide" or cease to play as it should.
The URL in question is found here, but you have to click the
link for more demo reel stuff to load the page I'm trying to work
on:
http://www.knappmediaproductions.com/portfolio.htm
Remember, click where on the page it says: "More varied
examples of Demo work seen here" to open the page I'm dealing with.
Is there code of some kind to shut all those clips down when
the layer they are on is hiding?I understand that you can remove one parent instead of many
children in this way, which is good from an efficiency standpoint.
Beyond that, I was ideally looking for a way to basically "freeze"
the action on Frame A and return to it. I assume that, even with a
parent-child scenario, I would still need to loop through all of
the children and save their states (because just checking the
parent attributes isn't going to get at this information). I was
just asking if there was any easier way. It would be nice to be
able to go to another frame - maybe on another level - and then
come back to Frame A and pick up where I left off - just hopeful
thinking, I guess. -
i am are trying to do something that can be achieved with
Javascript.
<script language="javascript">
function showHideComment(onOff){
if (onOff == 1){
document.getElementById('commentArea').style.display = "";
} else {
document.getElementById('commentArea').style.display =
"none";
</script>
<input type="radio" name="comment1" value="1"
onClick="showHideComment(this.value);"> On <br/>
<input type="radio" name="comment1" value="0"
onClick="showHideComment(this.value);"> Off
<cfoutput query="showcomment">
<table width="100%" border="0" align="center"
id="commentArea">
<tr>
<td>Subject:</td>
<td><b
class="sidebar">#subject#</b></td>
</tr>
</table>
</cfoutput>
but problem lies here when it:
hides only one Section of Comments, What about if i had more
than 10 comments.
i tried changes the variables but no luck
plz helpHi,
Just put your <cfoutput query> statement below the
<table> tag (that is before the start of <tr> tag and
it will do that..
<cfquery name="showcomment" datasource="dav">
select * from ttest;
</cfquery>
<script language="javascript">
function showHideComment(onOff){
if (onOff == 1){
document.getElementById('commentArea').style.display = "";
} else {
document.getElementById('commentArea').style.display =
"none";
</script>
<input type="radio" name="comment1" value="1"
onClick="showHideComment(this.value);"> On <br/>
<input type="radio" name="comment1" value="0"
onClick="showHideComment(this.value);"> Off
<table width="100%" border="0" align="center"
id="commentArea">
<cfoutput query="showcomment">
<tr>
<td>Subject:</td>
<td><b
class="sidebar">#firstname#</b></td>
</tr>
</cfoutput>
</table> -
How do I show hide layers in dreamweaver CS6?
I'd like to use this instead of image swap, becuase I have images of different aspect ratios.
how do I stack images ontop of each other in the same place.
With CSS absolute positioning. Also be sure to apply position:relative to your parent container or #wrapper div.
#wrapper {
width: 90%;
position:relative;
#Layer1,
#Layer2,
#Layer3,
#Layer4 {
width: xxpx; /*your widest image*/
height:xxpx; /your tallest image*/
top: xxpx; /*position from top*/
left:xxpx; /*position from left*/
position: absolute;
Nancy O. -
How to SHOW/HIDE a dreamweaver layer from a flash button?
I have almost 2 weeks tying to find a solution for this. Please help...
-How can you SHOW/HIDE an thml-dreamweaver layer from a flash movie button.
My html layer name is LAYER1, and my FlashMC botton name is FLBOT1
Now, what is the actionscript that im suppouse to place in the flash button?
Please respond, ThanksAdobe removed Flash Text and Flash Buttons from CS4 for accessibility reasons. Flash buttons aren't web friendly. And if you use this approach, you'll need to work in Flash because DW doesn't write Action Script for you.
That said, you could do something similar without Flash.
Pure CSS Disjointed Menu Rollovers
http://alt-web.com/DEMOS/CSS-Disjointed-Menu-Rollover.shtml
Pure CSS Disjointed Text Rollovers
http://alt-web.com/DEMOS/CSS-Disjointed-Text-Rollover.shtml
Show/Hide Layers with DW behaviors:
http://www.cbtcafe.com/dreamweaver/showhidelayers/index.html
Walter Zorn's Tooltips
http://www.walterzorn.com/tooltip/tooltip_e.htm
FloatBox Demos
http://randomous.com/floatbox/demo
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.com/blogspot.com -
Show/hide layers no mouseover option
I have MX (2004) and am trying to create a simple show/hide
layer behavior on some thumbnails/main images and it is just not
working for me. The behavior has the show/hide option, but it does
not show the arrows active to choose the mouseover and other
events. I have the 'show 4.0 browsers and later' box
checked...anyone know what else it could be? Is there a simple code
I can drop in (I'm an artist, not a programmer, so be gentle)? Any
immediate help at [email protected] would be very much
appreciated!
nullmaggotsquibb wrote:
> I apologise if I am being really thick, but I need some
help!
>
> I have just purchased a copy of Dreamweaver CS3 to
discover that I can no
> longer work with layers as I used to on MX. I frequently
used the show-hide
> layers behaviour so that I can click on an image in one
frame to reveal a layer
> in another frame, however, if I select the image and and
then try to add the
> behaviour, the show hide elements is grey out so that I
cannot even select it
> as an otion.
Do you actually have any layers on the page. You need to put
a layer on
the page first and then apply the show-hide layer behaviour. -
Custom web part with ontextual tab - show/hide on focus
Hi,
I built a webpart that has a contextual ribbon tab and buttons, this webpart is added to a wiki page. When the wiki page is in edit mode I would like this custom ribbon tab to be shown or hidden depending on whether my webpart is clicked.
Great thanks, if you can show me the right direction.Hi,
To show/hide the ribbon tab depending on the click event of the web part, a workaround is that we can use JavaScript to achieve it.
With JavaScript, we can capture the click event of one web part in a page and show/hide with the help of the corresponding JavaScript function.
Here are some links will provide more information:
onclick Event
Toggle (Show/Hide) Element
Feel free to reply if there are still any questions.
Best regards
Patrick Liang
TechNet Community Support -
Need Dreamweaver CS5.5 ColdFusion 8 Code Validator
Hi,
I know someone who has a ColdFusion validator in Dreamweaver CS5.5. They go to the "File" menu, select the "Validate" menu item then select the CF validator. A horizontal box at the bottom of the window fills with errors the code validator has found specific to CF syntax. However, this validator does not show up in my Dreamweaver CS5.5. I do have the validators: "As XML", "Validate Current Document (WC3)" and "Validate Live Document (WC#)" (which is dimmed). She suggests that it may be an Adobe extension that I can load with the "Adobe Extension Manager" found via the "Commands" menu, "Manages Extensions..." menu item, and then select the "Adobe Extension Manager CS5.5" menu item. When I search the ColdFusion Exchange, hundreds of items pop-up. Does anyone know of a good CF code validator that I can search for by name... of if this is even the right place to look? Might this be related to some Eclipse validation tool?
Thanks,
JeffI believe what you need can be downloaded here:
http://www.adobe.com/support/coldfusion/downloads.html#cf8devtools
jason -
Hi. I was looking for "Flash Elements" on Dreamweaver cs5, so that I can use the Image Viewer to put pictures on my wesbite.
There was no "Flash Elements" option in the Insert tab. I did some research and apparently I needed a jquery code. I found a free code on a website and I downloaded it and it is saved on my computer.
I don't know what I am supposed to do with this code, or how I am supposed to implement it into dreamweaver so that the Flash Elements option appears in my Insert tab.After the file downloaded, I got a notification message on dreamweaver that said something like "jquery.tn3lite.min is a view only file. what would you like to do with it?" The options were View, Make writeable, and Close. I clicked View and I am not sure how to proceed from there. The document that opened in code view contains a ton of content in it.
Please tell me the steps I need to take from here to get the Flash Elements - Image viewer in the Insert tab.
Thanks in advance.
Regards,
LailaSeems to be some confusion here.
Please tell me the steps I need to take from here to get the Flash Elements - Image viewer in the Insert tab.
There are none.
Adobe dropped the Flash Image Viewer from Dreamweaver starting in CS4. It won't be back. There are much better ways of achieving slideshows these days.
There was no "Flash Elements" option in the Insert tab. I did some research and apparently I needed a jquery code. I found a free code on a website and I downloaded it and it is saved on my computer.
I don't know what I am supposed to do with this code, or how I am supposed to implement it
jQuery has nothing to do with Flash Elements - Image Viewer.
jQuery is one good way to get a slideshow working on your webpage but understand what it is before you try to use it.
http://docs.jquery.com/How_jQuery_Works
Try
http://www.1stwebdesigner.com/css/fresh-jquery-image-gallery-display-solutions/
Maybe you are looking for
-
Creation of "Web Dynpro for Java" for SAP transaction
Hi All, In EP when we create SAP transaction iView for SAP transaction, a)ITS server is required if we choose SAP GUI Type as WebGui(Performance wise as well as some other issues) b)SAP GUI has to be installed if we choose SAP GUI Type as Wi
-
[SOLVED] Linux kernel 3.6.2-1 issues on Macbook Pro 4,1
After my recent system upgrade to linux-3.6.2-1, I ran into a couple noticeable issues on my laptop. The first was the inability to use "mount -i /home/user", which is in my .bash_profile, to mount my encrypted home directory at login. An error mes
-
Hi All, I am in the process of installing EP7 on SLES9 and MaxDB 7.6 on a clustered HA environment where the SCS, DB and JC components are installed under and referenced by their virtual hostname (eg. sapinst SAPINST_USE_HOSTNAME <virt name>). The SC
-
Xml gallery alignment, help
I am making an XML gallery with thumbnails. It is working fine, but I have a problem with alignment of the images. All the large images are loading into the top left corner. I would like them to load with center alignment for all images. I don't know
-
PO or PR templates for qiuck ordering of repeted Items
Hi, Is there is any way to create a templates for PO or PR in SAP4.7C version? Any standard way? So that one can make use of those templates at the time of ordering. It is needed to improve the efficiency of the user by reducing time fot repeated ite