Image button link

754 views
Skip to first unread message

Didier Quatrer

unread,
Nov 16, 2015, 2:22:42 AM11/16/15
to Google Web Designer beta
Hello.

I do not know why, but my  previous post
https://groups.google.com/forum/#!topic/gwdbeta/SnT3vcaV6XI
is locked.

The only problem with this :

  <a class="image-link-style" href="http://www.mylink.html" id="LienAccueilB1">
    <gwd-imagebutton id="BoutonBas" up-image="assets/Template/bb1.png" over-image="assets/Template/bb2.png" down-image="assets/Template/bb3.png" scaling="cover" class="gwd-imagebutton-1j9q"></gwd-imagebutton>
  </a>

is that https://validator.w3.org/
says my elements are nested and that this is not allowed.

I do understand why it's nested, but cannot solve this problem.
Note that this code does work. I only want to write a correct code !

Thanks in advance for any help.

Didier Quatrer

unread,
Nov 18, 2015, 6:03:01 AM11/18/15
to Google Web Designer beta
I made a simple html page with only one gwd-imagebutton
W3c validator generates an error with this simple gwd-imagebutton !
" Element gwd-imagebutton not allowed as child of element body in this context. (Suppressing further errors from this subtree.) "


My above code is correct.
Google team should check why w3c generates an error with this component.

Sukhbir Kaur

unread,
Nov 18, 2015, 2:00:12 PM11/18/15
to Google Web Designer beta

Hi Didier ,


You can add an event to the Image button instead of <a> tag .


Here are the steps :

  1. Open the components panel.
  2. Drag the Image Button component to the stage.
  3. In the component properties section of the Properties panel, set the following properties: Up Image,Over Image and Down Image 
  4. Set other properties as required .
  5. Right Click to invoke contextual menu >Select Add Event 
  6. gwd-Imagebutton>Click>Exit>gwd-ad 
  7. Enter the ID ,URL and save  















Also , These validation error are expected due to our use of custom elements that the validator is unaware of, and do not indicate a problem.

I hope this helps !

Thanks
Sukhbir
(GWD Team)

ImagebuttonClick.zip

Didier Quatrer

unread,
Nov 18, 2015, 5:06:04 PM11/18/15
to Google Web Designer beta
Thank you Sukhbir Kaur for your help, but your procedure only works with an add. If you create a new project using html page, you will not get the event ad->quit option.

In html mode,  possible actions only are:
  • css
  • Image button
  • Personalized

(using the french UI, I'm not sure I'm using the correct words)


This is why I'm asking "how to".

I already used the quit action with an ad. But concerning my project, I can only use the html page creation function for my project.


Cordialement,

Didier.

Sukhbir Kaur

unread,
Nov 18, 2015, 5:33:14 PM11/18/15
to Google Web Designer beta
Hi Didier,

For a HTML file you can add a custom code  :
gwd-Imagebutton>Click>Select Custom code 
 
window.open("http://www.google.com", "_blank")


















I have also attached the sample file .

Thanks
Sukhbir
GWD Team
ImageButtonCustomExit.zip

Didier Quatrer

unread,
Nov 19, 2015, 9:34:21 AM11/19/15
to Google Web Designer beta
Thank you very much
Sukhbir Kaur .
My problem is solved.
Reply all
Reply to author
Forward
0 new messages