I have a script showing words one by one on the screen. This works OK as I have entered the word list to be displayed in an array like var words = []; words.push({ name: 'wordlist1', words: [ 'I','like','to','think','I','can','program' ] }); Code (markup): I have several such wordlist in the same array, but now I like to have the user to add their own text in an input field. Is it possible to have some kind of a long text input field where the entered text is put into this array? If this is possible I ca use my existing script without too much modification. Thanks!
Hi, // Get the text from a textarea var userList = $('textarea.user-text').val() // create a new item userWordsData = { name: 'userList', words: userList.split(' ') } // add it to the words array words.push(userWordsData) Code (markup): also you and use concat method to append new array to exists one: words[0].words.concat( $('textarea').val().split(' ') ) Code (markup):
I wonder I I can have help to implement this? I'm too newbie to solve this myself. I can pay for the help (Paypal). What I need is some modifications at my test site www.limesurvey.no/ord/ where an option is added to the Options menu. There is a dropdown menu called "ordliste". I want the user to be able to add own words here via e.g. an option "own list" popping up a text input field where the user can enter og paste a list of word. Making them into a cookie belong the other cookie setting is great as the word list can be preserved. Anyone able to help me with this one?
I can help you out.. Looks like it doesnt need to cost you much (in the order of 10 or 20 euros or something , let me know at how you want this done..