Drop Down With Text Input Option [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to implement onto my website a drop down style menu of which also has a text input field to add your own option aside from the predefined provided options. I have an example of this via the images below;
Drop Down Example - Closed
Drop Down Example - Open
What is my best solution to achieve this result for my website?

Select2
Selectivity (formerly Select3)
fSelect (lightweight)

There's a jquery plugin called chosen by harvest that handles this well. It allows free form input on the dropdown, and many other options. It's docs are here: https://harvesthq.github.io/chosen/
Once it's installed you can use something like this to initialize it on your select box.
$(".chosen-select").chosen();

Related

logic to create pop up menu in html - not working [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am having a button on my html page, i want a pop-up menu to be appear when button is clicked.
Please see the attached image.
I am not javascript expert.
Please suggest how can i create a pop up menu in html ?
You can use dropdowns from bootstrap framework, you can check this link
http://getbootstrap.com/components/#btn-dropdowns
HTML is only used to structure the page, so you can't make something appear/disappear using only html.
You will have to use javascript for that.
I did find a html 5 way of adding stuff to the context menu (right-click):
http://www.w3schools.com/tags/att_global_contextmenu.asp
but it's currently only supported in firefox.

How to use grid in HTML [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a assignment.
I want to create a grid with list of friends with their name and photo add search bar on top of it whenever you type their name, it should filter and show only that by default it should show all.
This can be easy achieved using JQuery and a 3rd party javascript library called "Datatables".
Basically you only need to create an HTML table with all the names and photos, then add JQuery and Datatbles libraries to your HTML and initialize it.
On this link:
https://www.datatables.net/examples/basic_init/zero_configuration.html
you will find the most basic code example to configure datatables.
As comment, this solution will indeed give you the results you look for, but if this is a homework maybe your professor is expecting to you to code this functionality from scratch and not using 3rd party libraries.
Regards.

Programmatically filling a file chooser form field [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Note:
The answers & comments below reflect the state of legacy browsers in 2009. Now you can actually set the value of the file input element dynamically/programatically using JavaScript in 2017.
See the answer in this question for details as well as a demo:How to set file input value programatically (i.e.: when drag-dropping files)?
I'm currently working on programmatically filling an HTML/CSS/jquery form on another website using JavaScript. I'm able to fill all textboxs and click necessary buttons easily,but I'm stuck trying to set the value of the file chooser. I'm aware JavaScript doesn't have permissions to set the value of a file chooser, and it appears I can't control the dialog that appears when the button is pressed.
Is there some other way I can automate this? Or is there a solution in JavaScript?
Thanks!

Styling individual lines in textarea [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm making a php mysqli forum, and i would like users to be able to style their posts so it doesn't look so dull.
I want some basic buttons, like [Header1,Header,Header3,Normal,] and also [italic,bold,underlined]
I now have two questions,
1.
How do I make the buttons and style the textarea?
How do i get styled text into a mysql db?
Thanks in advance.
Daniel Holst
Use things like TinyMCE, it as all the things you need and manymore. It will make you textarea a full richtext editor.
You can't do it as is without any javascript.
You can use another editor.
To get styled texte from you database, you need to save the text with the formatting before restoring it.

I want to modify a jquery plugin for bootstrap [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am in need of using a mini calendar for picking up dates. I cannot find a suitable plugin for twitter bootstrap but what i have found is a plugin for selecting dates (http://www.eyecon.ro/bootstrap-datepicker/) which involves firing up a calender when the calender button is clicked. I want to know whether is there any way possible that we do not need to click a button; rather the calendar is displayed permanently and we can then select a date and use its info. There must be!
Would really appreciate any help.
Sure, you can use .datepicker('show') to display datepicker without clicks. Also there are events('hide') you can track to prevent its hiding. All needed info you can find on the page you provided(http://www.eyecon.ro/bootstrap-datepicker/). Hope it helps!

Categories