Hi,
I am currently using JQuery's validation plugin for basic form validation such as required fields.
I want to add functionality so that when the user types in the username field, an ajax call is triggered to check whether the username is already taken. My requirements are:
Preferably integrate with JQuery Validation plugin, rather than writing a custom function
I want the lookup to occur on the nkeyup event
I want the lookup to be triggered approx 0.5 seconds after the keyup event has occurred.
Thanks!
I am trying to attach an event to a separate onhover trigger. But I am having problems using multiple selectors since its dynamic.
Need help ::: Upon hovering on the yellow box named 'Rings', this should trigger the animated slide event for the green box above it.
http://home.jasonfletcher.info/all/alliteration/index.html
$('.boxgrid1').hover(function(){
$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
}, function() {
$(".cover", this).stop().animate({top:'247px'},{queue:false,duration:300});
});
I'm writing a web page in ASP.NET. I have some Javascript, and I have a submit button with an onClick event.
Is it possible to call a method I created in ASP with Javascript's onClick event?
public void departmentChangeListener(ValueChangeEvent event){
Long id = (Long) event.getNewValue();
department = id;
if(department == -1 || department == 0){
employee=0;
displayEmployee = false;
} else{
changeEmployee();
employee=0;
displayEmployee = true;
}
}
This is the method that call in valuechangeListener attribute of ice:selectOneMenu tag
but here problem is value of employee set 0 when we second time change value from selectOneMenu's List.
I have some popup dialogs on my webpage, in each of this dialogs i have defined some click event with jquery :
$(".links_view").click(function(e){ //code });
But the problem is when i activate one this click event, it will be executed in each dialog...
I have created a table with draggable rows. Unfortunately, most of the rows are covered with a large textbox input element. In order to drag the rows, you have to grab the row on the very edge just outside of the textbox. Is there a way to allow the rows to be grabbed through the textboxes without destroying the textbox functionality? (i.e. relay the mouse drag event, but not the mouseclick event?)
Using a facade controller pattern in .net. It seems as if though it is not efficient BECAUSE, for every event that happens in a domain object(Sales, Register, Schedule, Car) it has to be subscribed to by the controller(use case controller) and then the controller in turn has to duplicate that same event to make it available for the presentation, so that the presentation can show it to the user. Does this make sense? Please comment!
Title more or less says it all. In response to a touchesBegan event, my UIViewController recolours itself and adds some subviews.
It never receives the touchesEnded. I guess because the added subviews are somehow intercepting the event. I tried calling resignFirstResponder on the subviews to no avail.
The code works fine when I don't add the child views and the touch events are called as normal.
Any ideas?
Thanks
I have a QAbstractItemView that needs to react to single and double click events. The actions are different depending on whether it was single clicked or double clicked. The problem that is occurring is that the single click event is received prior to the double click event.
Is there a recommended way/best practice for distinguishing between the two? I don't want to perform the single click action when the user has actually double clicked.
I am using Qt 4.6
I'm building an firebug-like inspection tool for my page. When the mouse enters an element, the element should be highlighted.
Now I'm creating an element which I position absolute on top of the target element, this however means the next mousemove event (which is bound to the document) will fire with the actual "highlight element" as the target.
Is there a way to prevent the "highlight element" from being the target element in the mousemove event? The element already has a transparant background.
Same code I'm using of dojo documentation
just downloaded code work fine but onchange event do not fire on my project.
I have make it to work by firing onblur onBlur: function(){alert(3)}
What thing may cause onchange event not fire?
var filteringSelect = new FilteringSelect({
id: "stateSelect",
name: "state",
value: "CA",
store: stateStore,
searchAttr: "name",
onChange: function(){alert(3)}
}, "stateSelect");
I've a NULL gtklabel. Upon the occurrence of an event, I set a text in this label (with gtk_label_set_text). How can I reset the gtklabel after the event (reset to NULL)?
How can I set the max length (characters) of a GtkTextView?
What's the easiest way to set the distance from the margin of a widget in a GtkTable?
Hi, there's a swing JTextField, and I want to add a listener, so whenever the users types a single letter, there's an event. There's a ValueChanged event in scala api, but I don't get it what's it's peer. So which one Listener should I use? KeyListener and implement reasonably just one method?
I have a scrollview and I only want an event to happen if it's already scrolled to the bottom but I can't find a way to check if the scrollview is at the bottom.
I have solved it for the opposite; only allow the event to happen if it's already scrolled to the top:
ScrollView sv = (ScrollView) findViewById(R.id.Scroll);
if(sv.getScrollY() == 0) {
//do something
}
else {
//do nothing
}
I have a table of data which represents a series of events that persons do over time, sometimes people do the same thing several times in a row. How to select a result using MS SQL 2008 that shows only disambiguated sequences of those events?
Source data:
Person Event Time
1 2 1
1 2 20
1 2 33
2 1 34
1 4 43
1 2 44
2 3 45
1 2 46
1 3 50
1 3 55
Result:
Person Event
1 2
2 1
1 4
1 2
2 3
1 3
I am using the calender module with it's iCal support for Drupal 6. I have made my event type which appear on the iCal feed. I however want to make the event content type private, so only authenticated users can read it. By doing this they will not show on the iCal feed. Is there any way that I could get the iCal feed to still show these events?
I need to find which event handlers an object has registered.
eg.
$("#el").click(function(){...});
$("#el").mouseover(function(){...});
Is there anyway I can use a function to find out that- $("#el") has click and mouseover registered and possibly iterate over the event handlers.
If not a jQuery Object can we find this on a plain DOM object?
Hi,
I have a menu in jQuery when you click on a link it opens up, but I want it so when you click somewhere else, anywhere else that is not the menu, it becomes hidden.
At the moment I'm binding a click event to
$(':not(#the_menu)')
But this seems like I'm binding a click event to the entire minus the menu, is there a more efficient way of doing something like this?
I have a TextField which I initialize by setting htmlText.
The text has anchor tags (hyperlinks).
When a user clicks on the hyperlink, the indentation of the second and subsequent lines in the paragraph changes. Why? How do I stop it?
My html has an image at the beginning of the line, followed by the tag, followed by more text. To style the hyper links to look blue always and underlined when the mouse is over them, I do this:
var css:StyleSheet = new StyleSheet();
css.parseCSS("a {color: #0000FF;} a:hover {text-decoration: underline;}");
stepText.styleSheet = css;
stepText.htmlText = textToUse;
stepText.visible = true;
Here is a fragment of the html text (with newlines and exrta whitespace added to improve readability - originally it was one long line):
<textformat indent="-37" blockindent="37" >
<img src="media/interface/level-1-bullets/solid-circle.png"
align="left"
hspace="8"
vspace="1"/>
American Dental Association. (n.d.). <i>Cleaning your teeth and gums (oral hygiene)</i>.
Retrieved 11/24/08, from
<a href="http://www.ada.org/public/topics/cleaning_faq.asp"
target="_blank">http://www.ada.org/public/topics/cleaning_faq.asp
</a>
</textformat>
<br/>
As it turns out, the text field is of a width such that it wraps and the second line starts with "Retrieved 11/24/08". Clicking on the hyper link causes this particular line to be indented. Subsequent paragraphs are not affected.
ASIDE: The image is a list bullet about 37 pixels wide. (I used images instead of li tags because Flash does not allow nested lists, so I faked it using a series of images with varying amounts of whitespace to simulate three levels of indentation.)
IDEA: I was thinking of changing all hyperlinks to use "event:" as the URL protocol, which causes a TextEvent.LINK event to be triggered instead of following the link. Then I would have to open the browser in a second call. I could use this eventhandler to set the html text to itself, which might clear the problem. (When I switch pages in my application and then come back to the page, everything is OKAY again.)
PROBLEM: If I use the "event:" protocol and user tries the right-mouse button click, they will get an error, or so I am told. (See http://www.blog.lessrain.com/as3-texteventlink-and-contextmenu-incompatibilities/ ) I do not like this trade-off.
I'm using a jQuery slider as a price range selector in a form.
I'd like to have the form submit automatically when one of the values has been changed. I used a couple of examples I found on SO but they didn't work with my code.
<form action="itemlist.php" method="post" enctype="application/x-www-form-urlencoded" name="priceform" id="priceform" target="_self">
<div id="slider-holder">
Prices: From <span id="pricefromlabel">100 €</span>
To <span id="pricetolabel">500 €</span>
<input type="hidden" id="pricefrom" name="pricefrom" value="100" />
<input type="hidden" id="priceto" name="priceto" value="500" />
<div id="slider-range"></div>
<input name="Search" type="submit" value="Search" />
</div>
</form>
This is the code that displays the values of the slider and updates 2 hidden form fields I use to store the prices in order to submit:
<script>
$(function() {
$("#slider-range" ).slider({
range: true,
min: 0,
max: 1000,
values: [ <?=$minprice?>, <?=$maxprice?> ],
start: function (event, ui) {
event.stopPropagation();
},
slide: function( event, ui ) {
$( "#pricefrom" ).val(ui.values[0]);
$( "#priceto" ).val(ui.values[1]);
$( "#pricefromlabel" ).html(ui.values[0] + ' €');
$( "#pricetolabel" ).html(ui.values[1] + ' €');
}
});
return false;
});
</script>
I've tried adding this code as well as an data-autosubmit="true" attribute to the div but no result.
$(function() {
$('[data-autosubmit="true"]').change(function() {
parentForm = $(this).('#priceform');
clearTimeout(submitTimeout);
submitTimeout = setTimeout(function() { parentForm.submit() }, 100);
});
I've also tried adding a $.post() event to the slider but I'm not very good with jQuery so I'm probably doing it wrong. Any help will be appreciated.
Basically I have a Search Text Box with a LinkButton Control on which the click event is fired. now what i want is when the user type keywords and press enter the Click event got fired.
So No Javascript Only ASP.NET With VB.NET v2.0
Sincerely
Rajeev
[email protected]
I find that many game development requires a main game loop, but I don't know why it is necessary. Can't we implement an event listener, and response to every user actions. Also, the animation can be played when a event occurs.
What is the purpose for making a main game loop.
i want to do some actions when all items in checked list box are unchecked. There is only event ItemCheck but the check state is not updated until after the ItemCheck event occurs.
I have added a new content type event. Now, i have to make a view in which it shows a set of fields if the dateOfEvent (one of the fields) is less than the present date and some other set of fields of the 'event' content if the dateOfEvent is more than the present date. how can I do that in the views..
thanks in advance for helping...