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?
Hi,
How do I detect change event on textarea using javascript?
I'm trying to detect how many characters left is available as you type.
I tried using the onchange event, but that seems to only kick in when focus is out.
Thanks,
Tee
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?
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 a webview and I want to manually switch to another tab during a specific event. The event is arbitray, but I can't figure out hwo to switch teh tab. On my other views, I have the following code:
self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:2];
However, this does not work in my custom UIWebView class. Is there a simple solution to this?
Thanks
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
}
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 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?
As per the title, is there any way to programatically change the selected item in a ComboBox and have it raise an event?
I am setting the selected item using myComboBox.SetSelection(index), but this doesn't raise the wx.EVT_COMBOBOX event.
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...
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 know that I can implement a Java interface with Jython like this:
class MyListener (Listener):
def foo(self, event):
print(str(event))
Python has first-class functions so that seems like an overkill - especially for interfaces with one method. Is there a way to just pass a lambda or function which implements a single method in an interface instead?
Here is an example of what i would do in vb:
Public Class Class1
Public Shared WithEvents Something As New EventClass
Public Shared Sub DoStuff() Handles Something.Test
End Sub
End Class
Public Class EventClass
Public Event Test()
End Class
Now how do i do this in c#. I know there is not handles clause in c# so i need some function that is called and assign the event handlers there. However since its a shared class there is no constructor i must put it somewhere outside of a function.
Any ideas?
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 event handler 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.
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.
How to set a bitmap as a button so that i can apply button mode and mouse-event stuff on it, without adding the bitmap to a Movie Clip?
var bmpFull=new Bitmap(event.currentTarget.content.bitmapData);
bmpFull.smoothing=true;
bmpFull.name="photo";
bmpFull.alpha=0;
//fullMC.buttonMode=true;
fullMC.addChild(bmpFull);
HI
Let me explain what i wont to do.I have a form and there is 10 picturebox on it.when I click one of them I wont to hide all other except clicked.It is possible that on click event of all of them hide others.but I ask for efficent way.forexample with a single function call from click event maybe
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 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?
I have a function that calculates how many characters remaining the user can type, but I don't know why it only starts counting from the 2nd characters. Means at the end I will able to type an extra character from the maximum amount I set.
wInput.maxChars=30
wInput.addEventListener(KeyboardEvent.KEY_DOWN, calculate);
private function calculate(event:Event=null):void {
NameRC=wInput.maxChars-wInput.length;
remainingA.text=NameRC;
}
How can I force my objects DataContext bindings to update? I'm using an event on a grid, and binding updates are not being processed before my event fires.
Any cheap tricks to get around this?
In the end I can always do things the old manual way of getting the values from my textboxes and updating my object, but it'd be nice to have binding do it for me.
I have a form in which i paint a waveform on a button click that is as soon as i click button, the waveform displays. Now when i minimize the form and maximize it again, the waveform disappears.How to repaint it? I have seen people using paint event but i dont know how to use it after/inside the button click event. Please help.