Get data from Double click on non-editable Kendo Scheduler - bootstrap-modal

I tried to get the data for empty kendo scheduler. Mean no event. I try to extract atleast start time, end time and date. I off the editable. mean I not use the window that kendo provided. I try to custom by using bootstrap modal.
here is my event delegate
$("#scheduler").delegate('.k-event', "click", function (e) {
debugger;
});;
I can get the event on this scheduler, but i cant extract data without event.

To get the underlying event object from event element you can get it's data-uid attribute and pass it to the occurrenceByUid method. Demo is available in the method description (check the link).

Related

Web Browser Events using MsHTML.h

I am using cwebpage integrated into my program. CWebpage information can be found here:
https://www.codeproject.com/Articles/3365/Embed-an-HTML-control-in-your-own-window-using-pla
My question is regarding events. I currently have this setup to setup click events using get_anchors() in IHTMLDocument2. I then iterate over all of the elements to create a IDispatch in memory. This holds the event information. When an item is clicked, it sends a WM_NOTIFY to the window and then I can handle the event and parse out what I need to parse from the element that was selected.
This all works fine until I run into a page in my software with close to 50,000 anchor tags in which we run out of memory since we hold the events in memory until the the page is destroyed.
Is there a simple way to obtain the clicked element without having to set an event for each individual element? Is it possible to set a click event at a document level and then find the element that tripped it? All I am trying to do is obtain the id of the element that is clicked.
What I've tried:
I tried to just use a WM_LBUTTONDOWN message read in our browser window and then use htmlDoc2->elementFromPoint() to simply get the information that I need from the element selected. This however does not work well if the page is zoomed or wraps.
Please note this programming is in C/C++, not javascript or vb.
Thank you.
HTML events "bubble" from child elements to parent elements. So, you can simply assign a single onClick handler to the IHTMLDocument2 itself, and then use the srcElement property of the IHTMLEventObj object that is given to your handler every time on onClick event is fired by any child element on the page. See Understanding the Event Model.

What's the difference between .modal('show') and shown.bs.modal?

Calling a modal via Javascript, when do I use $('#myModal').on('show.bs.modal', function()) and when to use $('#myModal').modal('show')?
Based on Bootstrap 3 documentation:
.modal('show')
Manually opens a modal. Returns to the caller before the modal has actually been shown (i.e. before the shown.bs.modal event occurs).
Due to how HTML5 defines its semantics, the autofocus HTML attribute has no effect in Bootstrap modals. To achieve the same effect, use some custom JavaScript:
$('#myModal').on('shown.bs.modal', function () {
$('#myInput').focus()
})
This event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event.

Foundation 4 : render custom select returned with ajax call

I'm struggling trying to figure out how to render the custom form select in Zurbs Foundation 4, which has been returned with the ajax call. At the moment I'm simply re-initialising the plugin, but I know that's not the right way:
$(document).foundation('forms');
Also - the same question about resetting the select. Is there a way of doing it without actually hard code the id of the element as the object?
$('form select').trigger('change', true);
You can fire foundation('forms') function just on parent container. For example, I have a modal window which contains a form loaded via ajax. The modal window has id="modal-region". To get custom fields in the form I do:
$('#modal-region').foundation('forms');

make emberjs event only get called once

I have a app that has items that can contain child items and so on.
Each item has a mouseDown event that i want to be able to use to click and select an item.
The problem is that when i click a child item the parents mouseDown event is also being called.
How do i stop this so the mouseDown event only gets called once or if thats not posible i actually want the function called within the mouseDown event to only get called once.
Here is a jsfiddle to very simply show this. http://jsfiddle.net/rmossuk/W9vmW/1/
If you click no the Click here its mouse down event gets called twice.
You have to return false; in the mouseDown function.
Or you can you use event.stopPropagation(). I updated your fiddle, see http://jsfiddle.net/W9vmW/2/.
There is more informations about how event bubbling in ember works here - http://emberjs.com/guides/view_layer/#toc_event-bubbling
Events will bubble up the view hierarchy until the event reaches the root view. An event handler can stop propagation using the same techniques as normal jQuery event handlers:
return false from the method
event.stopPropagation

ZK how to remove waiting actions

I have an textbox with onChange method and button to make some actions. But if I type some thing in textbox and not clicking any where , click that button, It calls onClick method and then onChange method.Or first onChange and then OnClick but I should disable all actions after that onChange method.
Add the check to your onClick() method. The onChange() for a text box is fired after a certain period of time or after you deselect your component. If you deselect your component by clicking on a button it sounds pretty natural to me to get the onClik first and then the onChange. There is no way of controlling (as far as I know) these events, except on server side.
Read this !
Keep in mind that you are developing a WEB application and not a Desktop Application. And event if the development of zk applications may look pretty similar to the desktop applications they are not and they have their limitations.
I found solution :
First for Textbox onFocus method I disable next button , and user cant click it.
Second for Textbox onBlure method I enable next button. (To be fired onBlure action user should click somewhere on window or press tab and this fires onChange action)