Adobe Forums

Add Me
Adobe Forums » Adobe Influences » Dynamic Html » Re: In Behaviors: <A>

Tags:



Reply
LinkBack Thread Tools Display Modes
Re: In Behaviors: <A>
  #1 (permalink)  
Old 09-25-2008, 03:18 AM
david_allen_mac
Guest
 
Posts: n/a
Default Re: In Behaviors: <A>

Murray,

Let me say just how much we appreciate your thoroughly detailed answer. It has
made the whole difference for us. Thanks!

Actually, we modeled on the syntax you provided below, for the case with the
<a> tag. That has led to a quandary. Perhaps you can help with this.

We are building a picture gallery, and so of course our behavior starts with
the img tag. Then we go to the Behaviors tab, to add OpenBrowserWindow onClick.
And we select the onClick that starts with <A>. DW (CS3, on Mac 10.4.11) will
not let us use that.

In fact for apparently all the <A> events, we get the same failure message. I
wrote it down finally: "<A> onClick [or other event, we discovered] is not a
valid event for the IMG tag. Please check for spelling errors, or choose a
different browser or specification from the Show Event For menu."

In Show Event For, we are at HTML 4.01. It did not look like any of the other
possibilities would give us more liberal options. Is our presumption incorrect?

But, not giving up, we decided - rather than use the DW Behaviors tab for the
job - we would code, using the syntax you so kindly provided. (We did let DW
put in the javascript, via the Behaviors tab, to get us started.) Then we
modeled on yours below. Viola, it works! Despite DW's denial that it would
work. And even more, when we select around in just the right place in Design
view, DW even shows a behavior attached to <A> onClick, rather than to just
onClick.

And the page also 'validates.'

We are mystified. Why the block on this event/action, when it works? We even
trashed Configuration from App Support, to check whether the Prefs may have
been corrupt. That did not change anything.

Of course we area also wondering if there is some more streamlined workaround,
perhaps somehow within DW, rather than the laborious copying and pasting in
code view, then correcting from the paste, repeatedly. Of course with a photo
gallery, there are a lot of pictures to do.

(We also could not get the winName element in the script to put a name on the
popup window. But maybe that is another post.)

Again with appreciation, David

[q]Originally posted by: Newsgroup User
Which DW are you using?

In most versions of DW where that option is available, the <A> implies that
when you select that event, the element to which you applied the behavior
will get wrapped with an <a> tag, to which the behavior will then be
applied. For example, if you apply an image swap directly to an image, and
you use the onmouseover event, you will get this -

<img onmouseover="MM_swapImage(...)"...

but if you use the <A> onmouseover event, you will get this -

<a onmouseover="MM_swapImage(...)" href="javascript:;"><img
src="..."...></a>
(where the ellipses represent other tag attributes)

The latter method is the preferred method for applying behaviors to images
or to bare text.

However, on some versions of DW8, this method was broken, and would only
throw an error when the <A> event was selected.

The workaround (and perhaps the best method anyhow) would be to select the
element, then enter "javascript:;" (or "#") in the Link field of the
Property inspector first, followed by the TAB key to set the Link. Doing
this will force the element to be wrapped in a 'null' link, to which you
would then apply the desired behavior.

--
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
==================


[/q]





Reply With Quote


  #2 (permalink)  
Old 09-25-2008, 03:18 AM
Murray *ACE*
Guest
 
Posts: n/a
Default Re: In Behaviors: <A>

Yep - it's broken allright. I couldn't remember whether it was CS3 or DW8.
But there you go. You will have to use plan B in my reply.

> Of course we area also wondering if there is some more streamlined
> workaround,
> perhaps somehow within DW, rather than the laborious copying and pasting
> in
> code view, then correcting from the paste, repeatedly. Of course with a
> photo
> gallery, there are a lot of pictures to do.


Plan B, to refresh your memory, was to add a null link first: select the
image, and enter "javascript:;" in the Link field of the Property inspector,
then press the tab key. Now, select the <a> on the tag selector (the bar
beneath the document pane, and above the Property inspector, and apply your
behavior. This will give you exactly the same thing as using the <A>
events, only you won't get the error message because you are already
applying the event/behavior to an <a> tag.

And by the way, swing by ProjectSeven - they have GORGEOUS gallery
extensions there. I have used one of them on my brother's site -

http://www.wildimages.biz

--
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
==================


"david_allen_mac" <webforumsuser@macromedia.com> wrote in message
news:ga70ai$dot$1@forums.macromedia.com...
> Murray,
>
> Let me say just how much we appreciate your thoroughly detailed answer. It
> has
> made the whole difference for us. Thanks!
>
> Actually, we modeled on the syntax you provided below, for the case with
> the
> <a> tag. That has led to a quandary. Perhaps you can help with this.
>
> We are building a picture gallery, and so of course our behavior starts
> with
> the img tag. Then we go to the Behaviors tab, to add OpenBrowserWindow
> onClick.
> And we select the onClick that starts with <A>. DW (CS3, on Mac 10.4.11)
> will
> not let us use that.
>
> In fact for apparently all the <A> events, we get the same failure
> message. I
> wrote it down finally: "<A> onClick [or other event, we discovered] is not
> a
> valid event for the IMG tag. Please check for spelling errors, or choose a
> different browser or specification from the Show Event For menu."
>
> In Show Event For, we are at HTML 4.01. It did not look like any of the
> other
> possibilities would give us more liberal options. Is our presumption
> incorrect?
>
> But, not giving up, we decided - rather than use the DW Behaviors tab for
> the
> job - we would code, using the syntax you so kindly provided. (We did let
> DW
> put in the javascript, via the Behaviors tab, to get us started.) Then we
> modeled on yours below. Viola, it works! Despite DW's denial that it would
> work. And even more, when we select around in just the right place in
> Design
> view, DW even shows a behavior attached to <A> onClick, rather than to
> just
> onClick.
>
> And the page also 'validates.'
>
> We are mystified. Why the block on this event/action, when it works? We
> even
> trashed Configuration from App Support, to check whether the Prefs may
> have
> been corrupt. That did not change anything.
>
> Of course we area also wondering if there is some more streamlined
> workaround,
> perhaps somehow within DW, rather than the laborious copying and pasting
> in
> code view, then correcting from the paste, repeatedly. Of course with a
> photo
> gallery, there are a lot of pictures to do.
>
> (We also could not get the winName element in the script to put a name on
> the
> popup window. But maybe that is another post.)
>
> Again with appreciation, David
>
> [q]Originally posted by: Newsgroup User
> Which DW are you using?
>
> In most versions of DW where that option is available, the <A> implies
> that
> when you select that event, the element to which you applied the behavior
> will get wrapped with an <a> tag, to which the behavior will then be
> applied. For example, if you apply an image swap directly to an image,
> and
> you use the onmouseover event, you will get this -
>
> <img onmouseover="MM_swapImage(...)"...
>
> but if you use the <A> onmouseover event, you will get this -
>
> <a onmouseover="MM_swapImage(...)" href="javascript:;"><img
> src="..."...></a>
> (where the ellipses represent other tag attributes)
>
> The latter method is the preferred method for applying behaviors to images
> or to bare text.
>
> However, on some versions of DW8, this method was broken, and would only
> throw an error when the <A> event was selected.
>
> The workaround (and perhaps the best method anyhow) would be to select the
> element, then enter "javascript:;" (or "#") in the Link field of the
> Property inspector first, followed by the TAB key to set the Link. Doing
> this will force the element to be wrapped in a 'null' link, to which you
> would then apply the desired behavior.
>
> --
> 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
> ==================
>
>
> [/q]
>
>
>


Reply With Quote


  #3 (permalink)  
Old 09-25-2008, 03:18 AM
Murray *ACE*
Guest
 
Posts: n/a
Default Re: In Behaviors: <A>

Good luck, David!

--
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
==================


"david_allen_mac" <webforumsuser@macromedia.com> wrote in message
news:ga7aem$olr$1@forums.macromedia.com...
> Ah, yes ,,, we might have paid attention to Plan B, instead of taking it
> to be
> just for DW 8 ...
>
> Now we've learned the syntax. And now we have a straightforward way to
> get
> the result. May I say 'thanks!' - again!
>
> And yes, first, the 'wild images' are terrific. Particularly liked the
> big
> cats. The way they all come out from the thumbnail, and the thumbnails
> scroll
> - we're going ot head over to Project Seven.
>
> Thanks, Murray.
>
> David
>
> [q]Originally posted by: Newsgroup User
> Yep - it's broken allright. I couldn't remember whether it was CS3 or
> DW8.
> But there you go. You will have to use plan B in my reply.
>
> > ...

>
> Plan B, to refresh your memory, was to add a null link first: select the
> image, and enter "javascript:;" in the Link field of the Property
> inspector,
> then press the tab key. Now, select the <a> on the tag selector (the bar
> beneath the document pane, and above the Property inspector, and apply
> your
> behavior. This will give you exactly the same thing as using the <A>
> events, only you won't get the error message because you are already
> applying the event/behavior to an <a> tag.
>
> And by the way, swing by ProjectSeven - they have GORGEOUS gallery
> extensions there. I have used one of them on my brother's site -
>
> http://www.wildimages.biz
>
> --
> 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
> ==================
>
> [/q]
>
>
>


Reply With Quote


Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Hairstyles | UFO Videos | Bollywood Wallpapers | Poems  | WWE


All times are GMT. The time now is 09:51 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.