| View previous topic :: View next topic |
| Author |
Message |
optomeb Enthusiastic Coder
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 Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
| |
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
| |
montanarry Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
| |
optomeb Enthusiastic Coder
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 Enthusiastic Coder
Joined: 13 May 2006 Posts: 175
| |
optomeb Enthusiastic Coder
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 Enthusiastic Coder
Joined: 01 Jun 2006 Posts: 123
| |
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
| |
Poolkop Enthusiastic Coder
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 |
|