redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers

Ask your IT question here

returning undefined


Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Programming Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
optomeb
Enthusiastic Coder


Joined: 19 May 2006
Posts: 113
Hmm.. well it's not exactly the same I think.. I'm just trying to put some text at the end of the text in a textarea when I click a button
So, im trying to get the position of the cursor in that textarea..
But it seems to me I should be able to use just the length of the text in the textarea or something.. and put the stuff after there..

Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
Oh sorry, i never do that before..
I think my dumb idea:
Get all the text in the textarea, make sure it works.. you can check it with alert() in javascript

Reply with quote
 
optomeb
Enthusiastic Coder


Joined: 19 May 2006
Posts: 113
Well it started as: Why my createTextRange on my textarea always is undefined
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
Then add your new text in saved text (from textarea) that you already store in javascript variable
Reply with quote
 
optomeb
Enthusiastic Coder


Joined: 19 May 2006
Posts: 113
Yea, but how do I get the text from the textarea ?
Reply with quote
 
Jackil
Enthusiastic Coder


Joined: 24 May 2006
Posts: 97
Formref.elements[textAreaName].value
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
StrFull = strTextarea + strNewTextarea
Reply with quote
 
optomeb
Enthusiastic Coder


Joined: 19 May 2006
Posts: 113
Ah
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
I think something like that
Reply with quote
 
optomeb
Enthusiastic Coder


Joined: 19 May 2006
Posts: 113
Lemme give it a shot..
Reply with quote
 
Page 2 of 3 Goto page Previous  1, 2, 3  Next
Post new topic   Reply to topic    Programming Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group