redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

returning undefined


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



Joined: 19 May 2006
Posts: 113
Hey.. I am trying to use createTextRange on a textarea object but it keeps returning undefined, the textarea is not null though.. anyone know what I'm forgetting?
  Reply with quote


montanarry



Joined: 13 May 2006
Posts: 175
did you define it?
  Reply with quote
optomeb



Joined: 19 May 2006
Posts: 113
Defined which of them? the textrange?
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
Your textrange var
  Reply with quote
optomeb



Joined: 19 May 2006
Posts: 113
Ah.. well yea.. I got a var rng = tbx.createTextRange; doesnt that qualify as defining it?
Hmm.. or do I have to define it on the textarea somehow first?
  Reply with quote
montanarry



Joined: 13 May 2006
Posts: 175
You did use name on the textarea right
Mandatory
Just sayinn
  Reply with quote
optomeb



Joined: 19 May 2006
Posts: 113
Well.. I got it like this.. var tbx = document.getElementById("textareaId").. then I used tbx.createTextRange
Er.. or what do you mean? =)
I'm quite a rookie at javascript..
  Reply with quote
Poolkop



Joined: 01 Jun 2006
Posts: 123
Have you set the id and name for form (textarea) ?
  Reply with quote
optomeb



Joined: 19 May 2006
Posts: 113
Hmm not the name
  Reply with quote
Poolkop



Joined: 01 Jun 2006
Posts: 123
I never do that in textarea, but let me share similiar case:
<form name="add_tour" action="tour.php" method="post" onSubmit=showSelected()> <input id="add_tour_category" name="add_tour_category" type="hidden"> <select id="Enabled_Category" name="Enabled_Category" size="5" multiple style="width: 100px;"><option blah blah></select><input type="submit" value="Submit"></form>
In javascript:
Var optionList_Category = document.getElementById("Enabled_Category").options; var data_Category = ''; var len_Category = optionList_Category.length; etc
That will get all value in Enabled_Category :)
About this: <input id="add_tour_category" name="add_tour_category" type="hidden"> i will send the processed value to tour.php
So there will be something like this: document.getElementById('add_tour_category').value = data_Category;
Maybe this can give you an idea of your problem
  Reply with quote
Page 1 of 3 Goto page 1, 2, 3  Next
Post new topic   Reply to topic    Web Design 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