Hi guys, I would like to implement a text box using html with preloaded text and auto highlight an entire line when click, and the click line would bring up a pop up next to it, is it do able? Is there any kind suggestions on how I may achieved this??

For example in the attached screen shot, with the highlighted line saying I am learning how to code
It would pop up an image of a cute computer.
And when I introduce myself, it shows a picture of me.

All in a scroll text box.

Thanks guys!! :)

Edited by scarletfire

Attachments Capture.JPG 13.73 KB
4 Years
Discussion Span
Last Post by designershiv

This ends up being several different items, some of which I believe require javascript. HTML supports a text box, and you can put preloaded text into it. Using CSS you can make it a fixed height and scrolling. I don't know how, but I suspect CSS can let you auto highlight an entire line when you click.

But if you want to pop up a window, that will involve some (relatively simple) javascript. You would need to find out which line the user clicked on, and then select what image to load.

All of these you should be able to find online - try doing each one, one at a time.

If you don't have quite so much time, you might look at some of the various javascript toolkits out there. dojo (the one I'm most familiar with, not necessarily the best) supports several types of text box and might make the automation easier, if you can get past their sometimes-impenetrable documentation.

Votes + Comments

All in a scroll text box.

To do the scrolling "effect" you can use an overflow in css...

The popup effect, as said before, is going to require javascript (you can find many of those already made for your usages).

Edited by <M/>


Hi scarletfire,
Yes it is possible, Use jquery, onfocus highlight the line at the same time trigger popup.I hope it will solve your problem.

Votes + Comments
Thanks for you feedback, could you explain more in detail? Am not very clear with the jquery bit that uses onfocuse to highlight the line and trigger popup, would the pop up be customisable? Much appreciated!! :)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.