refreshing text input value in jqMobi - jqmobi

I have a text input within a custom footer. I am trying to update the text using:
$("#navbar #segment").val("blah");
I have also tried
$("#segment").val("blah");
both return objects, but neither show an updated text input. The footer the input belongs to is not shown at the time, and I think this might have something to do with it since performing the same actions works when the panel is displayed. I have also tried adding $.ui.updateNavbarElements($("#navbar #segment")) after each call and it throws an error.
Also, what is the difference between the jq.web.min.js included in the appMobi XDK and the jqMobi script located on the CDN? Are they they same, and just the CDN is the latest?

I was correct in assuming that changes are only reflected if the element is showing.

Related

Can't set step property in input type number iside alert

I have an input type number inside an Ionic v4 alert, the problem is that I can't set step property since It's not recognised, is there any workaround or solution?
If you have advanced alert needs you might consider making a modal form instead.
The alert doesn't have many configuration options.
I don't see the value in trying to recreate a full modal tutorial here. This seems to cover it quite well.
But the high level overview is that instead of using an alert you create what is basically a new page, but it is loaded in on top of the existing page and you can pass data in and out of it.

Robot Framework + Selenium can't enter text in a field, throws InvalidElementStateException

Using Robot Framework (with Selenium) to automatically fill a form - it's a checkout page on a ecommerce website,
It bugs at the very last step, when trying to enter the CVC code of a test credit card,
Robot throws a "InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated"
when the field is clearly visible and actionable.
Using Chrome, not Firefox (can't get it to work at all with FF)
I made sure the test scrolls the page down to see the field, but it still considers that field to be hidden or not actionable.
Has anyone run into the same issue here?
Section of the code that fails is here:
Card Payment is Visible
Execute JavaScript window.scrollTo(0,700)
Wait Until Page Contains Expires
Focus xpath=//*[#id="securityNumber"]
I Enter the CC Security Code
Input Text securityNumber ${CHECKOUT_CARD_CODE}
I Click Submit Order
Submit Form forms.payByCardForm
(the bits about "Focus" and "Input Text" are the ones that fail. I validate the text "Expires" is visible, it's right above the CVC field...)
I also tried:
Wait Until Element is Visible id=securityNumber
But it still fails.
It takes a screenshot and it's clearly there...
Oh well...payment forms you don't build yourself will always be trouble. This one is built using AngularJS so it's even more trouble.
I found how to locate the proper field by using a css property, since there is a hidden form that contains the same field with the same ID and Name.
I did have to use "Sleep" for it to work as well (thx Goralight).
And thanks to everyone else.
Use unique identifiers. Had same issue with the "description" field. Upon using View Source [Code] I see "description" in my HEAD META tag. Changed id fields to use "product_description" - error is gone. Code works.

restore ajax dynamically added content on back button

I have a very simple scenario. A web page with a list of items which invokes ajax call upon clicking on any item and dynamically add some text to the page.
Now, obviously, if I leave this page and then I press the back button I get the initial list without all the dynamically added text.
I've been reading a lot about this issue. There are a many tricks to preserve the information and/or load it again from server. But it seems to me that this really simple and desired behaviour should have a simple solution without the need for any trick or server re-loading which will result in obvious noticeable delay for the user.
So, does anyone know about a simple way to get back to the page via back button and retain all the dynamically added parts without the need to load them again from the server?

FileMaker 13 GetThumbnail Anomaly?

I have a container field named tempImage, set to have a calculated value of:
GetThumbnail(tempImage; 500; 500)
However, when I drag a larger size image into that field, the image does not get resized.
How can I fix this?
Note: The "Do not replace existing value of field (if any)" checkbox is unchecked. Here is a link to a video showing the anomaly.
I don't have a specific answer, but will offer a method to debug this.
Instead of dropping the image into the container, write a script that is triggered by the OnObjectModify that sets another container field using the GetThumbnail() function.
In so doing, you will be able to run the debugger and see if an error is generated by the script. That will give you more information to post here if you have not solved this already.
Reference information:
http://www.filemaker.com/help/12/fmp/html/func_ref1.31.14.html
Here is a detailed blog post about this function:
http://hbase.net/2013/07/11/resizing-images-in-filemaker-pro-12/`

Input field for uploading

I am using the blueimp/jQuery-File-Upload basic plugin.
In a form, the input field for uploading files is, by default, on the right of the button.
A text is also written into.
How can I have the field on the left and how can I get rid the text ?
What you are talking about is standard browser behavior. When you use <input type='file'>, the browser chooses how to render that, and it can give it its own default text like 'Choose file'. I have used a workaround in the past which works nicely, provided in the link below (which will scroll you to Romas' answer). Basically you hide the file input, and declare another button that you style however you wish.
In JavaScript can I make a "click" event fire programmatically for a file input element?