How to select text in columns in a table - html

Is there anyway to get the text on an HTML table to be selectable like the tables in MS Word? In a normal html table, when the user selects text using the mouse, the text is selected in ROWS. In MS Word, it is selected in COLUMNS. I am using IE8 in standard mode. I don't mind if the solution uses script or css.
Any help would be appreciated.

If you're willing to use script and css, then you could:
Define a CSS rule, associated with a class, which looks like (e.g. is colored like) the text is selected
Track mouse events (using the DOM event API)
Using script attached to mouse events, dynamically set the class attribute of table cells (to make it seem selected, using the CSS rule)
I haven't tested this! It's just an idea (not necessarily a good idea; but an answer to your question as stated).

Related

Input element text prediction

Many sites show suggestions for what you are typing as a drop down, with some showing the most likely result as a "preview" to the right of the cursor in a lighter-gradient font.
For example (this is from Spotlight on my Mac):
spotlight text suggestion
Is there any way to reproduce this within a standard HTML input element, or does it require a more complicated rich text (e.g. Slate) approach?
Unfortunately, this is not possible via the input tag.
However, there are a couple of ways to do that.
Slate is a option but I think you can craft something way easier.
For example, you can make a <div> with the attribute contenteditable. When you type, the div expands and after the "input div" you put another element which has the autocompleted results.
Either way you definitely need JS to accomplish that. Wor splicing the String or for going through your possible results. If you still have this problem, I could write a smapp codepen demo.

Creating multiple mouseovers at once

I want to post an old book on my wordpress website but since the book is so old there are a lot of words that readers may find unfamiliar. So I was thinking of adding a mouseover with the definition when they hover over a certain unfamiliar word. The problem is that the text is huge and a certain word "x" appears many times in different places in the text. Is is possible to somehow write a single program which creates a mouseover to every single "x" in the text? Or do I need to do each of them separately?
You could write some JavaScript that evaluates the text on pageload and wraps each desired word with a specific CSS class. On this CSS class you could define your mouse hover and the function to be executed.

How to add drop down box with information in a table cell using html

I don't know anything about coding and have been tasked to work on a Squarespace site and I've been teaching myself using tutorials. I need to make a unique table. Similar to the table found here: https://www.idtech.com/register/#/reg-flow/avail-charts-filters?lid=78
I'd like to have a feature where when you click a table cell then a drop down box will appear with information written within. I also want the cell to collapse if you click on a different cell.
Is there any way you can make a sample for me? I tried manipulating "input=checkbox" but that failed and isn't compatible with the square space site. I tried accordion but that doesn't work for just particular cells.
There is no way you can achieve that with only html,, you must use css or js.

What control do I use to create an input box with different formatting

I would like to create a web form with something like a text area. The user should be able to type/edit text fonts, colours, and make the text appear in various styles as they type. Also if the user draws an html table, it should appear in the box as they continue to type.
I know that there are simple text boxes and text areas in html but they don't have the above functionality. Is there some component that exists for this purpose or is it something created using one's own code like with Java?
Any inputs on this would really be appreciated.
This may be what you're looking for http://jhtmlarea.codeplex.com/
It's not a form field but with some tinkering you should be able to adapt it.

Access continuous forms -- how to individualize controls per record?

I have an Access form displaying a tiny amount of data for a certain type of record. Basically it just prints the name on the left and on the right has a bunch of Rectangle controls whose background color I change in the form's OnLoad() function, according to results from a query performed using that record's ID as parameter.
This all worked fine, got my ID/name on the left and 31 boxes on the right, colored if that day of the month is reserved :) But needless to say that function can be completely arbitrary since it's code.
Then I decided to switch to 'continuous form' as to display as many records/items as possible. But alas, it was not to be -- all boxes were colored according to the query/function performed for the first record only. I figured that might be because it's the OnLoad() but changing it to OnCurrent() did not do much either. As it turns out, or that's what I read, the Rectangle intances are shared over the entire form and if I change the BackColor for one of them it changes for that box for each record.
I want to be able to change this according to a query performed on a per-record basis. Is there any way? Up until now I've only been able to find conditional formatting (the feature that's nor available for rectangles nor seems to cater my exact needs?) and kludgy Access 97 text-box hacks.
Thanks in advance :)
You may be coming from an HTML background, where rectangles would be a natural solution. They aren't in Access. I don't think they'll work for you (in fact, "kludgy" could describe the attempt in my humble opinion).
You can however display an image. You'll keep an image for each status ready to call up. I've made visual displays this way. A little later I may be able to post some code, but I think you'll find this plays out pretty simply even if I don't.
ADDED NOTE: I'm glad this looks like it will work for you. You are concerned about "instanced only once" in your comment below. Yes, that's true for rectangles which are unbound controls (because they are designed for mere ornamentation). But you'll be using an image control which is a bound control (see Remou).
Change each rectangle to a text box, Control Source:
=Iif(myConditionIsMet,"ÛÛÛÛÛ","")
The "Û" is the Full Block character in Arial (asc 219).
All unbound controls in a continuous form will be the same; bound controls can be varied using conditional formatting.