Trigger lightbox with button onclick - lightbox

I am using lightbox by Lokesh Dhakar for an image gallery. I want to be able to initiate the lightbox gallery by clicking a button.
<span style="cursor:pointer" onclick='parent.$.lightbox({href:".gallery"}); return false;'><img style="margin-left:60px;" src="/images/template/assets/view.png" alt="View Gallery" width="120" height="33" /> </span>
Something along these lines...but this does not work for me.

Related

EditCommandColumn Image not clickable

I have made an image as the Edit text button.
For some reason I can't click it. Am I missing something?
If I leave it as text it is fine.
<asp:EditCommandColumn EditText="<li class='fa fa-pencil-square-o' style='color:green;background-color:white;font-size:25px;'/>" CancelText ="Cancel" UpdateText="Update" ItemStyle-Width="60" />
UPDATE:
HTML Rendered
So apparently you can't encase the image in a <li>
I changed it to a <span> and it worked :)
<asp:EditCommandColumn EditText="<span aria-hidden='true' class='fa fa-pencil-square-o' style='color:green;background-color:white;font-size:25px;'/>" CancelText ="Cancel" UpdateText="Update" ItemStyle-Width="60" />

transit to next page from casGenericSuccess page using link in jasing cas single sign on

I want to navigate to my added jsp page from casGenericSuccess.jsp but I am not able to transit to next page using hyperlink.
What i did is:
changes in login-webflow.xml
<view-state id="viewGenericLoginSuccess" view="casLoginGenericSuccessView">
<transition on="userManagement" to="userManagementHome" />
</view-state>
default_views.properties
userManagementHome.(class)=org.springframework.web.servlet.view.JstlView
userManagementHome.url=/WEB-INF/view/jsp/default/ui/userManagementHome.jsp
casGenericSuccessView.jsp
<jsp:directive.include file="includes/top.jsp" />
<div id="msg" class="success">
<spring:message code="screen.success.header" />
<p><spring:message code="screen.success.success" /></p>
<p><spring:message code="screen.success.security" /></p>
<a href="login?_flowExecutionKey=${flowExecutionKey}&_eventId=userManagement">User Management
</div>
<jsp:directive.include file="includes/bottom.jsp" />
Also I tried changing href to login?&_eventId=userManagement
I have my userManagementHome.jsp at same place where casGenericSuccess.jsp is present.
can someone please help me out navigate to my page.
Right now it is not navigating and displays the same casGenericSuccess.jsp page on click of user management link.
Try with execution instead of _flowExecutionKey

tinymce button trigger click not working

I'm using wordpress and i add some button on editor
i wants to trigger click on that well its triggering click
but not opening light box
for example that button codes looks like
<td style="position: relative">
<a title="Add New Alert" aria-labelledby="content_admin_alert_voice" onClick="return false;" onMouseDown="return false;" class="mceButton mceButtonEnabled mce_admin_alert" href="javascript:;" id="content_admin_alert" role="button" tabindex="-1">
<img alt="Add New Alert" src="http://www.xyz.com/themes/abc/wp-content/themes/abc/admin/js/../img/icon-alert.png" class="mceIcon"><span id="content_admin_alert_voice" style="display: none;" class="mceVoiceLabel mceIconOnly">
Add New Alert
</span>
</a>
</td>
and i'm clicking on #content_admin_alert but actions not happens like we actually click on that button
I haven't played with TinyMCE in a while, but the onClick and onMouseDown events are returning false, which would essentially cancel any click actions.

ASP.NET Toolkit - Rating

I'm trying to get the Ajax Toolkit rating control working in ASP.NET 4. I've added it to the page, and added the registration statement but it renders as invisible (ie: it renders on the page with display:none.
I have a standard scriptmanager on my masterpage, and a standard scriptmanagerproxy on the page itself.
I've tried putting the rating in an updatepanel, but the same thing happens.
This is my code:
<ajaxToolkit:Rating ID="ratRating" runat="server" MaxRating="5" StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar" FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar" OnChanged="rating_Changed" />
Which results in the following code (notice it's hidden with an inline style)
<div id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating">
<input type="hidden" value="3" id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating_RatingExtender_ClientState" name="ctl00$ctl00$ctl00$cphBody$cphBody$cphBody$editRecipeForm$ratRating_RatingExtender_ClientState">
<a style="text-decoration:none" title="3" id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating_A" href="javascript:void(0)">
<span style="float:left;" class="ratingStar filledRatingStar" id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating_Star_1"> </span>
<span style="float:left;" class="ratingStar filledRatingStar" id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating_Star_2"> </span>
<span style="float:left;" class="ratingStar filledRatingStar" id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating_Star_3"> </span>
<span style="float:left;" class="ratingStar emptyRatingStar" id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating_Star_4"> </span>
<span style="float:left;" class="ratingStar emptyRatingStar" id="ctl00_ctl00_ctl00_cphBody_cphBody_cphBody_editRecipeForm_ratRating_Star_5"> </span>
</a>
</div>
I find it odd that there's no error message displayed, and I haven't explicitly hidden the control anywhere.
It's probably not invisible, but rather the images locations of the rating star classes are wrong.
Check your css classes ratingStar, filledRatingStar, and emptyRatingStar.

asp net jquery popup dialog form in asp:formview

i have following problem, i am using a popup jquery dialog with asp:formview .
the purpose of this popup is for user to enter a hyperlink which is placed then in textbox control in formview
the popup dialog div is located outside a formview just after body tag
<body style="background-color: #FFFFFF; font-family:Lucida Console;">
<div id="dialog-form" title="sdfdfsdf" style="font-size:14px; ">
<form>
<fieldset>
<label for="link">sdfdf</label>
<input type="text" name="sdfsdf" id="link" size="32" />
</fieldset>
</form>
</div>
<form id="form1" runat="server" style="margin-top:50px;" >
<div>
<asp:FormView ID="FormView1"
.......
<InsertItemTemplate>
...
<sometextbox ...../>
<button id="create-user" class="ui-state-default ui-corner-all">Create link</button>
...
</InsertItemTemplate>
After clicking a button a popup window is shown BUT the page starts to refresh immediately
and of course the popup is then hidden.
If I relocate the button outside the formview - the page is not refreshed, but i need it in formview..
Any idea what to do?
add the following attribute to the button:
onclick="javascript: return false;"
this behavior should not come out because it is a button not submit button.
it seems when it is inside the form view a submit action is attached to it, check your jQuery scripts maybe you mistakenly added onclick submit while attaching the dialog.
I found my answer:
clientId must be used:
FTB_API['<%=FormView1.FindControl("AdminCommentTextBox").ClientID%>'].SetHtml(...)

Resources