NorthStarDA
IS-IT--Management
Hi,
I have built part of a web application that allows users to build scripts to handle certain functions. (skip logic for a survey). Users don't know it's javascript they're building, they build something like this:
i go through and replace things like Q:5 and P:3 with the proper javascript variable at the time the survey is rendered.
Point being, I have a group of buttons that insert all of these values into a text area to allow users to build these scripts without actually typing code. I need to know how to put the cursor in a certain position when a command is inserted. So when a user is adding an IF condition, i need the cursor to be in the parens so they can click the next buttons to start to build the expression.
Let me know if this is not clear and i'll explain further, but long story short- i need to add text to a textarea (not necessarily at the end) and i need to control where the cursor goes after.
thanks
=========================================
Don't sweat the petty things and don't pet the sweaty things.
I have built part of a web application that allows users to build scripts to handle certain functions. (skip logic for a survey). Users don't know it's javascript they're building, they build something like this:
Code:
if(Q:5 == 'a. first choice'){
goToPage(P:3);
}
i go through and replace things like Q:5 and P:3 with the proper javascript variable at the time the survey is rendered.
Point being, I have a group of buttons that insert all of these values into a text area to allow users to build these scripts without actually typing code. I need to know how to put the cursor in a certain position when a command is inserted. So when a user is adding an IF condition, i need the cursor to be in the parens so they can click the next buttons to start to build the expression.
Let me know if this is not clear and i'll explain further, but long story short- i need to add text to a textarea (not necessarily at the end) and i need to control where the cursor goes after.
thanks
=========================================
Don't sweat the petty things and don't pet the sweaty things.