Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > menu of external links does not work - onclick = return false? View modes: 
User avatar
Member
Member
dcollins-marketwired - 2/13/2014 12:50:23 PM
   
menu of external links does not work - onclick = return false?
I've got a menu of external links that go out to various social media sites. I am using the "link / button" web part.

The links do not work. The URL is correct and I've checked everything else, except nothing happens when I click on them.

This is the code that's been generated. I think the onclick is interrupting the link. But why?
<li>
<a
id="p_lt_ctl02_lnkSideMenu2_1_btnElem_hyperLink"
href="http://blog.marketwired.com"
onclick="__doPostBack('p$lt$ctl02$lnkSideMenu2_1$btnElem',''); return false;"
>
<img id="p_lt_ctl02_lnkSideMenu2_1_btnElem_image" style="border-width:0px;" src="/MWIntranet/images/non-content/ico_wordpress.png">
<span id="p_lt_ctl02_lnkSideMenu2_1_btnElem_lblText">
Blog
</span>
</a>
</li>

User avatar
Member
Member
dcollins-marketwired - 2/13/2014 1:14:27 PM
   
RE:menu of external links does not work - onclick = return false?
Oh I get it.

http://devnet.kentico.com/docs/webparts/index.html?Link_overview.htm



Under Action, it has a raise event property. The field is a dropdown offering only three choices: Submit, Next, Previous, and it's defaulted to Submit.

There's two tiny words I missed: "If set, the action raises the postback..." So if it can be set, then logically it can be unset!

But, it is not at all apparent that you can ignore the dropdown, erase the existing text (that says Submit), and leave the field empty.

Veeeeery sneaky Kentico...

User avatar
Member
Member
dcollins-marketwired - 2/13/2014 1:25:43 PM
   
RE:menu of external links does not work - onclick = return false?
Worse yet, if you return to the dialogue, the 'Submit' value will be repopulated into the field - meaning that if you do any action other than Cancel (such as OK or Apply), this value will be re-saved as Submit, without your action or knowledge, and that will break the link.

That is a bug.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 3/20/2014 8:38:57 AM
   
RE:menu of external links does not work - onclick = return false?
Hello,

we are not going to close the old Forums, so please use the QaA section instead where we will be able to solve your issue and please describe the exact steps we should follow to be able to reproduce this behavior.

Regards, Martin