i'm currently developing a simple GUI for my mozilla plugin using JSP. In that Gui,i want to create a prompt box with two input fields with drop-down list option. Is it possible with javascript prompt box option?
Not possible with the default window.prompt(); function but you can roll your own overlay or use something like the jQuery UI dialog.
It isn't possible to do this with pure JS prompt boxes, but you can use a library like jQuery UI or Bootstrap.
Related
How to show alert box without "OK" button and close after 2 seconds
setTimeout(function() {
alert("$premium$");
}, 1);
It's not possible to amend the dialog shown by the standard alert() method as the buttons are controlled by the browser/OS.
If you need this behaviour you'll need to use a library which builds alert notifications in HTML which can be amended exactly as you require.
You should create your own alertbox I think in vanilla CSS
You cannot hide buttons from native JavaScript dialogs. Your options depends on frameworks you are using. You can create custom dialogs with jQuery UI, Bootstrap and many other frameworks.
How to make searchable dropdown in html using any library or simple javascript like this? Because this searchable dropdown is very elegant.
you can use jqueryui combobox auto complete plugin as well, the link below gives the functionality and below fiddle also gives a working code
You can try Chosen. This plugin contains the element which you want. It is simply jQuery plugin with advanced options.
Thanks.
My bet is Select2 which can be customised to the extent you want and is easy to learn and use... It also has support for call back function like integrating user input if not present in dropdown.
Using the jquery plugin : confirmon
I would like to find a way to position this confirmation box dynamically.
But the classic jquery way is not working :
$('.confirmon-box').css('top','800');
Are there any alternatives?
Since no alternatives are available, changed from plugin, using a more customizable now: Zebra_Dialog
I am developing a simple web application using javascript.
I want to know that how to add multiple inputs in a single prompt box using javascript.
Go to this website, they have a full code, explanation, and example for you to learn how to achieve what you wanted.
https://www.w3schools.com/howto/howto_css_contact_form.asp
Summary of what you should do:
Create a form, just like usual
hide the form using display:none
Then create a button
Create a JS script, that "onclick" on the
button, will unhide the form.
as simple as that
I'm trying to create a website and I've been trying to create something which will open new content when clicked on, somewhat like Facebook has on the pictures: You click, Get a window with the picture and text area for commenting. I'm specifically trying to avoid popups because I don't find them very neat.
Does anybody know how i could create this/ have any tutorials? Is this extremely complex?
Have a look at jquery ui:
http://jqueryui.com/demos/dialog/
You can not avoid a popup. The only difference is that using a javascript framework like jquery you can have a beautiful popup.
So use the jquery dialog box to display the image and textbox for commenting. Using ajax you can save the comment and exit the dialog box. The trick is to make good use of css and opacity on the dialog box.