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

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.

Related

Selenium state of button to be clicked

I have a site which is populated from a database. I want to access the pages in Selenium. The number pages associated with a particular topic is variable.
Using Selenium I am clicking through successive pages using a line like
driver.find_element_by_xpath("""//*[#id="mainContent"]/
div[2]/div/div[2]/div[1]/
div[3]/div[2]""").click()
This works successfully.
However I would like to detect when the element I am clicking (a next button) is "greyed" out rather than having to predict how many pages are available.
Currently I am using a block of code inside a for loop with a counter for the number of available pages.
EDIT: The page element has the word Inactive added when it is "greyed out" as in
<div class="paginationBtn paginationNextContainer inactive"><div class="icn chevron-left"></div><div class="visuallyHidden">Previous</div></div>
If your button is changing its color on click, it's associated with CSS attribute.
I advise to look at this answer to learn the subject. For your case, I advise you to develop a method to get the button color value before and after, as your script should operate accordingly.

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/`

refreshing text input value in 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.

Using a single shared element across multiple partial views

I have a basic ASP.Net MVC 3 application which has a number of controllers and a number of actions (and subsequently views)
A common feature of the application is to show a pop-up dialog window for basic user input. One of the key features of this dialog process is a faded mask that gets shown behind the dialog box.
Each of these dialog window controls is in a separate Partial View page.
Now, some view pages may use multiple dialog boxes, and therefore include multiple partial views in them - which as is would mean multiple instances of the "mask" element.
What I am trying to find a solution for is to only need to create one instance of a "mask" element regardless of the number of dialog partial views I include, and then the script in each partial dialog will have access to this element (so basically it just needs to be on the page somewhere)
The only real idea I have come up with so far is to add the "mask" element to the master page (or in the original view page) and this will mean it only gets added once. The problem here is that it will be added even when it is not needed (albeit one small single element)
I can live with this, but I would like to know if there is a better way to handle these kinds of scenarios?
A quick idea that came to mind is some kind of master page inheritance hierarchy, So I may have a DialogMasterPage that inherits from the standard current master page. How does that sound for an approach?
Thanks
To do something like this, where each module can register their need for a certain thing in the master page, you can use HttpContext to store a flag of whether you need to write the mask div, and just set that property in each partial. At the end of the master page, if the flag is set, you can then write the mask div if its set to true.
Obviously to make this cleaner you could wrap it all in an HtmlHelper extension or something.
My initial thought is for you to use something like jQuery UI where it handles the masking for you or if you are using something custom you can load the content for the dialog via ajax then show it in the single dialog on the master page.

How to Load the page First and read database

HTML form has some text boxes and a drop down box.
Drop down has huge values, and takes lot of time to fetch from database.
So I want to load the page first and while the user fills the form (text boxes) I want to load the drop down box (without his knowledge :-) ).
But without any event trigger, how do I make call to database again ?
I am using JSF with RichFaces, Servlet.
The following code is not working
<h:selectOneMenu value="#{obj.selectedValue}">
<f:selectItems value="#{obj.allValues}" />
<a4j:support selfRendered="true" action="#{bean.action}"/>
</h:selectOneMenu>
Thanks,
+1 for using Ajax - but if you have a very large number of values,t hen you might want to consider using an auto completion dropdown - where the the user starts typing what they need and after they have typed a few characters, you kick off your ajax reqeuest and just load those requests that match.
have a look at "google suggest" if you want to see this in action
-Ace
As already mentioned you can use AJAX to load the dropdown items asynchronously, but I would suggest redesigning the form so that the huge dropdown is not required. Perhaps let the user search for the correct value on a previous or subsequent screen? Long dropdowns are not easy to use as they require lots of scrolling and it can be hard to find the correct value on a large list.
At the bottom of your page put the following:
<a4j:jsFunction name="yourJsFunction" action="#{bean.fetchSelectItems}"
reRender="yourDropdown" />
window.onload = yourJsFunction();
You will have to use AJAX. When the page loads display a empty select box. Then write some JavaScript that will call some URL on your server that will return the options for the select box. And when you get that just populate the select box with those values.
Be advised that your form will be useless to those without JavaScript.