additional pop-up menu with special characters

Associate
Joined
13 Feb 2008
Posts
1,033
Location
Glasgow
Do you guys know what would be the best way to create some kind of popup menu, or even static menu with buttons with special characters (for example french language letters)?
I need it for test website - imagine test page with input fields where user put his answer, but sometimes they need to add special character and then they choose one from the small menu next to it.
That letters menu would be simply buttons with letters and when you click one of them it will be added as a next character in the input field below.

Something like this: http://quizlet.com/test/1319399/

It jumps under every active field when you change them.

How can I do sth like that? How to tell button to put that character to active (focused) field?
 
It's all done is Javascript from what I can tell - the author doesn't seem to be a fan of IE either. Unfortunately this isn't something I'm that familiar with so I can only offer some sort of general outline.


  • Create your special character display first. All the buttons will probably use the same function to add text so it should be straightforward.
  • When an input box is clicked using onClick or similar check if the "Special Characters Tab" has been activated by the user. If so pass the caller or it's name so we can tell which inputbox we need to append our special character to.
  • Modify the pages InnerHTML to insert your special character display below the input box.
I'd work on getting everything working with the panel constantly displayed, at the top for instance, and then work on how you're going to go about updating it's position. I suppose you could parse the innerHTML until you reach the end of calling elements tag... :confused:

I am sure someone here will have a quicker way of doing it or a good idea where to find one already made.
 
Back
Top Bottom