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.
Related
my web page has a view result button which is a toggle for bootstrap modal popup.
I am unable to create a onclick event for it as control does not go to server side when I click it, only a popup is displayed. How can I get the onclick event to raise serverside event handler.
As you can see I tried creating OnClick event handler but with no success.
<p class="text-center"><button type="button" class="btn btn-info" data-toggle="modal" data-target="#myModal" id="btnshowmodal" onclick="Save_Result" runat="server">View Result</button>
change the 'button' to 'asp:Button` because this is an asp.net control that triggers events on code behind.
<asp:Button type="button" class="btn btn-info" data-toggle="modal" data-target="#myModal" id="btnshowmodal" onclick="Save_Result" runat="server" Text="View Result"></asp:Button>
left the other attributes as they are - just set the Text. Will be render not a button but an input, but your job will be done.
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.
I build asp webform page (vb.net)
My tooltips crashes when I open modal from code behind using below code
Dim sb As New System.Text.StringBuilder()
sb.Append('<script type='text/javascript'>')
sb.Append('$('#SetTime').modal('show');')
sb.Append('</script>')
ScriptManager.RegisterClientScriptBlock(Me, Me.[GetType](), 'SetTimeModalScript', sb.ToString(), False)
If I open the same modal form using button eg.
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#SetTime"> Launch demo modal
</buton>
everything works fine.
To initialize tooltips I use
$(document).ready(function () {
$('[data-tooltip="true"]').tooltip();
});
I try to find solution but I gave up after few hours.
I must use this code to open modal because I open it to display data for specific gridview row.
Edit
Here is part of code where I put data tooltip :
<asp:LinkButton runat="server" CssClass="btn btn-primary btn-xs" CommandArgument='<%#Eval("ID") %>' CommandName="SetTime" data-tooltip="true" title="Ustaw czas rozpoczęcia i zakończenia zlecenia" data-container="body"> <i class="fa fa-clock-o"></i> </asp:LinkButton>
I tried also with data-target="tooltip" instead data-tooltip="true"
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.
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(...)