473,511 Members | 15,503 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

alert("document.all.txtbox"+".value")

Hi All,

// code start

alert("document.all.txtbox"+valueA+".value")

// end code

could you please advice,
can it show the value of txtbox ?

Best regards,
Boki.

May 3 '06 #1
2 3645
Boki said the following on 5/3/2006 1:23 AM:
Hi All,

// code start

alert("document.all.txtbox"+valueA+".value")

// end code

could you please advice,
can it show the value of txtbox ?


IE only code or cross-browser?

document.forms['formID'].elements['txtbox'+valueA].value;

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 3 '06 #2
Randy Webb wrote:
Boki said the following on 5/3/2006 1:23 AM:
Hi All,

// code start

alert("document.all.txtbox"+valueA+".value")

// end code

could you please advice,
can it show the value of txtbox ?


IE only code or cross-browser?

document.forms['formID'].elements['txtbox'+valueA].value;


Aside from the fact that the OP's code wouldn't give the desired result
anyways. Assume valueA = '1'. The alert would read, literally:

document.all.txtbox1.value

....not the value of the element. It's in quotes.
May 3 '06 #3

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

Similar topics

11
4560
by: Alistair Saldanha | last post by:
I'm looking for the event that is fired by Internet Explorer to an "alert": <SCRIPT> Alert("You already have a session open") </SCRIPT> The event would be webBrowser.Document.???? Much...
6
10093
by: adamrfrench | last post by:
Let it be mentioned that Javascript is not my forte, so the solution to this could very well be a simple one. I am working on an AJAX function where I can pass a URL and the target ID in, and...
2
1540
by: Bryan | last post by:
Hello all, Can anyone explain when one should use the "document" object and when one should use the "this" object? Also, is the "self" object the same as the "document" or "this" object?
3
1715
by: Harvey Triana | last post by:
Hi-- Sample. When i write something like: <input type="button" name="btnSend" value="Send" onclick="callSomeTask(getElementById('myControl').value );return false; /> I can run some cliente...
4
2606
by: dr1ft3r | last post by:
Hey guys, I'm building a site for a landscaping business down the street and can't seem to get part of the code functioning correctly. The code fails on line 68 where I make a reference to an...
2
1996
by: ratcateme | last post by:
I have this script function getname(){ <script type="text/javascript"> var name = prompt('What is your name?'); while(name==''){ name = prompt('We need your name?'); } alert(name);...
6
2044
by: maminx | last post by:
hello all, i have this html below <input type="text" name="items" size="3" value="1" onchange="javascript:showNameObject();"/> and i want to alert that object of name with this script ...
6
7119
by: cepera | last post by:
Hi guys! How I can retrieve "option value" info from select tag? I am using this code, but it is only let me get "name". I need to pass this value to second select tag. I found this code here:...
24
8179
by: Jeremy J Starcher | last post by:
While reading c.l.j, I've noticed that some people prefer and indeed even recommend the use of "window.alert()" over "alert()". I can't find any technical reason to make this distinction, and...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7418
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...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.