473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do I get hold of this element in my web page

Hello

I have this section in my web page:

<div style="top:0;left:0;width:735;height:348">&nbsp;</div>
<div ARID="640000009" ARType="Char" ARDBN="Call ID" class="df dfro
arfid640000009 ardbnCallID" style="z-index:1032;top:53; left:430;
width:248; height:21;">
<label class="label f9" for="arid640000009" style="top:4; left:0;
width:88; height:17;">Call ID</label><textarea class="text sr "
wrap="off" id="arid640000009" cols="" style="top:0; left:89; width:
159; height:21;" readonly rows=1></textarea>
</div>

And I want to get access to the textarea field to insert the data.
Using the document object model how do I get access using eg
GetElementById to the textarea field? What is the syntax and what ID
am I trying to attach to?

Mar 20 '07 #1
2 1387
On 20 Mar, 09:56, "Angus" <anguscom...@gmail.comwrote:
Hello

I have this section in my web page:

<div style="top:0;left:0;width:735;height:348">&nbsp;</div>
<div ARID="640000009" ARType="Char" ARDBN="Call ID" class="df dfro
arfid640000009 ardbnCallID" style="z-index:1032;top:53; left:430;
width:248; height:21;">
<label class="label f9" for="arid640000009" style="top:4; left:0;
width:88; height:17;">Call ID</label><textarea class="text sr "
wrap="off" id="arid640000009" cols="" style="top:0; left:89; width:
159; height:21;" readonly rows=1></textarea>
</div>

And I want to get access to the textarea field to insert the data.
Using the document object model how do I get access using eg
GetElementById to the textarea field? What is the syntax and what ID
am I trying to attach to?
<textarea id="t"></textarea>
<script type="text/javascript>
document.getElementById('t').value = 'dynamically entered text';
</script>
you need to know what attributes a tag can have, and sometimes what
the javascript equivalent id. For that hit google, w3schools or the
w3c's site and check out the doctype for html, where you will find the
succint (designed to be consumed by a computer) definition of html.

Mar 20 '07 #2
On Mar 20, 4:56 am, "Angus" <anguscom...@gmail.comwrote:
Hello

I have this section in my web page:

<div style="top:0;left:0;width:735;height:348">&nbsp;</div>
<div ARID="640000009" ARType="Char" ARDBN="Call ID" class="df dfro
arfid640000009 ardbnCallID" style="z-index:1032;top:53; left:430;
width:248; height:21;">
<label class="label f9" for="arid640000009" style="top:4; left:0;
width:88; height:17;">Call ID</label><textarea class="text sr "
wrap="off" id="arid640000009" cols="" style="top:0; left:89; width:
159; height:21;" readonly rows=1></textarea>
</div>

And I want to get access to the textarea field to insert the data.
Using the document object model how do I get access using eg
GetElementById to the textarea field? What is the syntax and what ID
am I trying to attach to?
The best way (IMHO) would be to assign an id to the textarea
(id='someID') and then use the document.getElementById('someID')
method. However, it appears that this may be some auto-generated html
(am I right?) in which case you may not have much control over that.

If that's the case, you can use
document.getElementsByTagName('textarea') which should return an array
for you of all textareas on your page. The trick is if you have more
than one, you'll need to be sure you've got the right one. IF there is
only one textarea, then use something like:

var myText = document.getElementsByTagName('textarea')[0];

HTH.

Mar 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Johnny Knoxville | last post by:
I've added a favicon to my site (http://lazyape.filetap.com/) which works fine if you add the site to favourites the normal way, but I have some JavaScript code on a couple of pages with a link,...
6
by: lostinspace | last post by:
After four+ years of using FrontPage in a limited capacity and having created over 600 pages on my sites, I've finally (at least for the most part) abandoned FP, to begin the process of converting...
1
by: q2005 | last post by:
Hi, all I have a very simple page and on the page there is a small javascript to create a html element. On one of my PC's runs no problem, the page is displayed and the created element is there....
14
by: Laser Lu | last post by:
Hello, All, I just want to know that generally how to get the HtmlForm element in an ASP.NET Page? Can anybody help? Please:) Best regards, Laser Lu
14
by: Rich | last post by:
Yes, I need to store some values in an array type collection object that can hold 3 or more parameters per index. I have looked at the collection object, hashtable object and would prefer not to...
1
by: bienwell | last post by:
Hi all, I have a problem in ASP.NET program (Web pdevelopment). In VB Sub function, I want to dipslay a message box. The next line of my code is to response.redirect to the next page. My...
4
by: John A Grandy | last post by:
When constructing an RSS 2.0 XML doc , should the <channel><link> element's value be 1. the url of the page the displays the content that the RSS feed describes : fox example:...
7
by: Russell Mangel | last post by:
/* Hi, I am trying to hold a reference to un-managed pointer IStorage. The client/callers will make many accesses to IStorage, but only in-directly. For performance reasons IStorage needs to...
1
by: Sumit1talwar | last post by:
Hi I am working in tool; And for most of the pages i dont have access over then generated html i.e. i cannt modify HTML. but i can append some javascript to it. I want to attach event to one of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.