I am using bootstrap tokenfield to instrument my email textbox to support multiple email input.
User types letter a in the email textbox (the one with red font in the picture) . A list of matched emails show up in a selection menu (the box that shows the email abc#gmail.com in black)
After the user clicks and selected an email, the selected value is not captured. At the end I only got a letter a in the email textbox
How can I fix this issue?
It turns out I am also using Fastclick in my project. It swallowed the click event of the selection menu (of css class tt-selectable) used by bootstrap-tokenfield
At the end it is my solution. Fork the twitter typeahead.js project and change the following line from
$el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val,
that.displayFn(suggestion)).addClass(that.classes.suggestion + " "
+ that.classes.selectable);
to
$el = $(that.templates.suggestion(context)).data(keys.obj, suggestion).data(keys.val,
that.displayFn(suggestion)).addClass(that.classes.suggestion + " "
+ that.classes.selectable + " needsclick");
The additional css class needsclick will disable fastclick on this elements
Related
I'm generating a HTML order confirmation email using the TIdMessage Indy component in Delphi XE6.
I can add a line to my TIdMessage using:
IdMessage1.Body.Text := '<P STYLE="margin-bottom: 0.2in"><FONT COLOR="#FF0000"><FONT FACE="Calibri"><B> Order Confirmation for Work Order # ' + MyDatasetNameWorkOrder.AsString + '</B></FONT></FONT></P><P STYLE="margin-bottom: 0.2in"><FONT FACE="Calibri">Hello ' + OrdersForm.Proper(ServiceContact1DBText.Field.AsString) + ',</FONT></FONT></P>';`
and then add my HTML head/body sections after those lines, and the resulting email works. It displays the proper Work Order # and Contact when displayed as a HTML email.
But if I add the code above to the body section of my HTML email it doesn't show the table value for the Work Order #, or the Contact person. It just shows the actual text like + MyDatasetNameWorkOrder.AsString + and + OrdersForm.Proper(ServiceContact1DBText.Field.AsString) + in that area of the email.
Do I have to wrap those lines with some other code when trying to embed or insert a database value in a HTML paragraph or table?
I'm trying to create a website using PrimeFaces and NetBeans,
I'm using the DefaultMenuItem class to dynamically create the menu but when I use either setUrl or setOutcome the site redirects instead of forwarding.
Here's a piece of my code
DefaultMenuItem item = new DefaultMenuItem(obEvet.getcEvent());
item.setUrl(obEveto.getcName());
System.out.println("MenuView:" + obEvet.getcName() + " " + obEvet.getcModule() + " " + obEvet.getcEvent());
item.setAjax(false);
firstSubmenu.addElement(item);
The menu is configured in two parts, the first one loads the companies, the second one loads the available modules depending on what company I selected.
Please note that this problem only happens when I click any of the elements of the second list.
I'm trying to build an HTA app with a textarea box with pre-defined text:
<textarea name="Box1" rows=3 cols=75>Use this area for inputs that require multiple lines of text.
This is an example of pre-defined text.</textarea>
Which works. However, I'm also adding a reset button that clears some of the input boxes and textareas:
Sub ResetSub
Value5.Focus
Value5.Value = "Reset successful"
Box1.Value = "Use this area for inputs that require multiple lines of text.
This is an example of pre-defined text."
End Sub
<input id=runbutton type="button" value="Reset" onClick="ResetSub">
Loading the HTA I get an "Unterminated string constant" error because Box1.Value doesn't have quotes at the end of the line. Does anyone know how I can fix this? NOTE: I can't reload the entire page because I also need to retain data from other text boxes. Thanks for the tips!
You can include a newline like so:
Box1.Value = "Use this area for inputs that require multiple lines of text." & chr(13) & "This is an example of pre-defined text."
I use with the event "okCancelEvents" for validating my form in meteor.
But now, I want to use a textarea. The event "ok" don't work :(
Have you an idea of event with meteor for validate textarea ? :)
Thanks
I assume you're referring to the okCancelEvents function written in the Meteor Todos example, per this SO question. This function is designed to handle the events for an <input>, which is why its trigger for "ok/submit" is the user pressing enter (or blurring the <input>). See lines 59-61:
} else if (evt.type === "keyup" && evt.which === 13 ||
evt.type === "focusout") {
// blur/return/enter = ok/submit if non-empty
This won't work for a <textarea> because as a multiline input a <textarea> accepts enter presses because that's how a user types a new line. Submitting the form based on an enter press would be surprising to your users, to put it mildly. The focusout trigger should still work fine, however.
I am using the following code in the fusion tables 'customize info window' to create hyperlinked URL's from a column in my table:
"{URL}"
This works fine in returning the clickable hyperlink in the info box except fusion maps by default tacks on https: instead of http: when the link is clicked. This causes problems when the user clicks the hyperlink and it tries to take them to a secure site when in fact it is not secure. The browsers throw up all sorts of warnings that will scare the pants off a lot of users who don't know what is happening.
Does anybody know how to remedy this and have the default be http and not the current https?
Thanks, Shep
You may want to abandon the "{URL}" approach and display the hyperlink with some simple HTML. This example from Google shows how to modify the info window's HTML in Javascript:
google.maps.event.addListener(layer, 'click', function(e) {
// Change the content of the InfoWindow
e.infoWindowHtml = e.row['Store Name'].value + "<br>";
// If the delivery == yes, add content to the window
if (e.row['delivery'].value == 'yes') {
e.infoWindowHtml += "Delivers!";
}
});
Changing the e.row['Store Name'] to your URL column name (maybe, e.row['URL']) and surrounding by a couple of hyperlink tags <a> should do the trick:
e.infoWindowHtml = "<a href='" + e.row['URL'].value + "'>Click here!</a>";
There are three ways:
Specify a full URL including protocol in your data
Use Link here in a custom info window layout
Completely override the content as in the answer above
I would recommend #1 because you can choose the right protocol for every link. However #2 is probably easier in that you can leave your data the way it is.