Why change event of an input does not fire with jQuery? - input

I use jQuery with asp.net.
I have an Input that its value will change after a process:
first a button is clicked and a popup dialog is opened and an item is selected, then popup is closed and the value of my input is changed.
i want to get the change event and do sth, but nothing happen.
Thanks for help

Are you looking for something like this?
http://jsfiddle.net/rsarika/b9NTS/1/

When the popup is opened I set the parameter in session and then when the main page is focused I checked if the session has value (with ajax) and then I got the change value!

Related

Vuetify combobox set focus to the next combobox when yes is clicked on a dialog

I am using Vuetify combox control in a project I also have a dialog that pops up #blur to the next combobox to confirm the entry that is typed in the first combobox I am have two issues going on.
the first issue is that I want to set focus onto the next combobox or input when yes is clicked on the dialog I have tried using nextTick for this with some code to make it focus but it does not work. How can I go about setting this up so that it focuses the next input when yes is clicked ?
The second issue is that when you click on the next combobox the dialog gets its name from the item that is clicked. So if I were to type something into category then click on the next combobox manufacturer would show up in the dialog instead of category.
Can anyone point me to some insight on how I can correct this ?
I have setup an example in code sandbox for you to take a look to see if yall can help me out on these issues.
Code Sandbox Example
Rather late than never.
You can set the autofocus prop to have it focused.
<v-combobox
:autofocus="focusCombox"
...
Check their API: https://vuetifyjs.com/en/api/v-combobox/

tabindex not being set when textbox has focus

I have a textbox that when focused it calls an ajax request and populates a list for the user to choose from. Basically just recreated the dropdown using a textbox instead of a select.
The problem is that if I click on the textbox the browser does not recognize the tabindex of the input. Instead it resets its self and starts back at 0. If I tab to the next element tabs work fine, only when I click in the input field to give it focus does it start acting up.
I did notice last night if I put an alert in the page on the focus event that it seems to work. Guessing because the browser focuses on the elememt after I click the ok button.
has anyone heard of this before?
found what was causing the problem. I was calling .blur() on keydown and code was 9 or 13 (Tab/Enter). Not sure why this would give me the problem I was having. I would have just thought the blur event would have executed twice. However I suppose that I was forcing blur on keydown and the current tabindex was not being set. If this is the case then If I needed to I should beable to call blur() onkeyup event.

Need to change focus to another text box before buttons are activated

I am entering data into text fields in a browser via "type" command. In order for the Save and Cancel buttons to be activated (not grayed out), I need to click in another text field to change focus. This works manually, but I can't seem to figure out how to do it programmatically. I have tried click, clickAt, doubleClick, mouseOver/click/mouseOUt, mouseDown/mouseUp, focus, fireEvent ... all without luck. Thanks for any suggestions!
Does tabbing out of the input field enable the buttons? If so, maybe you can just do:
WebElement element = driver.findElement(By.id("your_input_field"));
element.sendKeys(Keys.TAB);

Unable to handle confrimation box with selenium RC

i am trying to press the ok button from a confirmation box like this (i added Thread.spleep so i checked the button is pressed and the confirmation box is shown)
selenium.chooseOkOnNextConfirmation();
selenium.click("xpath=//a[contains(#href,'123')]");
assertTrue(selenium.getConfirmation().equalsIgnoreCase("123"));
but i get this
com.thoughtworks.selenium.SeleniumException: ERROR: There were no confirmations
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:262)
at com.thoughtworks.selenium.DefaultSelenium.getConfirmation(DefaultSelenium.java:429)
Thx for your help.
I got the same error with the code
selenium.chooseCancelOnNextConfirmation();//点击cancel按钮
selenium.click("link=Delete");
selenium.getConfirmation();
Finally I find the reason is that the developer used the jconfirm function of jquery instead of window.confirm, and the jconfirm function is override with div.
Finally I used assertTrue(selenium.isElementPresent("id=popup_container")).
from this information it is hard to say exactly. but i will give you some info which will help you
java script generates 3 types of pop-up windows
1) Alerts
2)Confirmations
3)Prompts
your case, i guess
1) may be the statement selenium.click() you used, is not triggering the confirmation box
OR
2) if it is triggering, then it may not be the Confirmation box.it could be any one of the other 2 boxes
so, you must make sure manually what type of pop-up window it is and call the statements accordingly.
ex : Confirmation window : conatins OK and Cancel buttons
Alert window : contains only OK button
Prompt window : contains Textbox and OK and Cancel buttons
so check and use that commands respectively
if it is not the above case please the HTML code also

Visual Basic (VB) Forms: wait for a user click?

I'm making a simple form that is to step through a program iteratively.
How can I get it to run a method each time a user clicks a button and wait once it is finished for the next click?
Maybe I'm not understanding your question very well, but is it like the "Next" button on a Wizard?
You can have a State variable to store the current "state", so at starup its has the value 1. when click "Next" then do the code for State=1 and then change to State=2 and so on.
Inside you Click event you can have a case statement to proceed according
You want to create a method that gets called when it sees the OnClick event.
The simplest way to do this is to double-click the button in the GUI Form Designer, and it will go to the code page and start the method for you with the correct syntax.