on click add text at I beam in a input filed
#1
Posted 19 July 2009 - 01:01 AM
Can anyone tell me how to achive this, maybe I am trying to use the wrong language?
Note: My site uses PHP & MySQL so if I have to use another language I need it to work well with it.
|
|
|
#2
Posted 19 July 2009 - 01:51 AM
Neowin Forums > [JavaScript] Appending text to an HTML Textbox
EDIT:
Another handy link;
Java Script Tutorial - innerHTML
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#3
Posted 19 July 2009 - 04:27 AM
Oh and how does JS know were the I beam is?
#4
Posted 19 July 2009 - 04:36 AM
It's all good, I will continue to Google till I find the answer you are looking for unless someone that knows posts. I did a search on that but I can't think of the name for the beam you are talking about. I tried i-beam, beam, text beam... Can't think of anything else.
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#5
Posted 19 July 2009 - 04:40 AM
#6
Posted 19 July 2009 - 04:47 AM
JavaScript: Caret Index - ZeroSleep
This one doesn't look like it would work in IE according to the comments;
Vishal Monpara’s Blog Javascript : Getting and Setting Caret Position in Textarea
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#7
Posted 19 July 2009 - 05:07 AM
#8
Posted 19 July 2009 - 05:53 AM
#9
Posted 19 July 2009 - 07:10 AM
So I decided to cheat. I set up a yabb forum and I took there code that does what i am wanting to do. I am about to print it out and study it to see how it works.
Thanks Guys ^_^
Edit: bah to much code not enouph coments nor enouph meaningful veriable names, I fail
edit2: Haza. I can use a split like in this code
<script type="text/javascript">
var myString = "123456789";
var mySplitResult = myString.split("5");
document.write("The first element is " + mySplitResult[0]);
document.write("<br /> The second element is " + mySplitResult[1]);
</script>
replace the value 5 with the number returned from the example in the secondlink of that post brandon made. that should work. Wont be able to test until tommorow cause I can't concentrate right now. but still it should work ^_^
Edited by zeroradius, 19 July 2009 - 11:23 AM.
#10
Posted 19 July 2009 - 03:14 PM
zeroradius said:
WingedPanther said:
zeroradius said:
So I decided to cheat. I set up a yabb forum and I took there code that does what i am wanting to do. I am about to print it out and study it to see how it works.
Thanks Guys ^_^
Edit: bah to much code not enouph coments nor enouph meaningful veriable names, I fail
edit2: Haza. I can use a split like in this code
<script type="text/javascript">
var myString = "123456789";
var mySplitResult = myString.split("5");
document.write("The first element is " + mySplitResult[0]);
document.write("<br /> The second element is " + mySplitResult[1]);
</script>
replace the value 5 with the number returned from the example in the secondlink of that post brandon made. that should work. Wont be able to test until tommorow cause I can't concentrate right now. but still it should work ^_^
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!
#11
Posted 20 July 2009 - 03:44 AM
#12
Posted 20 July 2009 - 03:46 AM
Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


Sign In
Create Account


Back to top









