|
-
input boxes - problems
Hey,
If anyone could help me with these two things, I'd be very grateful.
Firstly, the arrow keys don't work for navigating around the text as the user inputs the text. Anyone know what's happening here?
Secondly, the line-breaks are getting lost. My variables are: textBox1 and textBox2 and I am passing them to a pop-up by the following script:
getURL
("javascript:window.open('dataSubmit.php?textArray 1="+textArray1+"&textArray2="+textArray2+"&active= "+active+"','popped','width=300,height=200,top='+( (screen.height/2)-100),left='+((screen.width/2)-150)+',toolbar=no,scrollbars=no,resizable=no,menub ar=no,status=no,directories=no,location=no'); void(0);");
I have tried: textArray1 = textBox1.split("\n"); also, but this isn't working. Can anyone suggest anything?
ps - putting "GET" at the end seems to stop the pop-up from working.
-
Hey,
I've sorted it. Here's what I did in case anyone has similar problems:
1. The arrow keys didn't navigate around the text because I had a button with on(keyPress <arrow?>) which overrid it.
2. The line breaks are stored in Flash as "\r", not "\n" as I previously though. So this bit of code replaces "\r" with "<br>":
textArray1 = text1.split("\r");
textArray2 = text2.split("\r");
text1 = "";
text2 = "";
for (var i = 0; i<textArray1.length; i++) {
text1 += textArray1[i]+"<br>";
}
for (var i = 0; i<textArray2.length; i++) {
text2 += textArray2[i]+"<br>";
}
Hope this helps anyone in similar difficulty.
-Chris
-
It's a long way to the middle
Yep, that's how you do it! Nice work Chris.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|