473,657 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

looping through an HTML

29 New Member
Hi. Everyone
I’m trying to loop through an html document to perform some tasks. The html document contains a couple of input boxes which gather the data from the user. However, to complete my task I need to get the name of each input box and the value of entered data. The former is archived by these statements:
var myelements=docu ment.getElement sByTagName("inp ut");
for (var i=0;i< myelements.leng th;i++){
var boxname=myeleme nts[i].name
var boxvalue=
Unfortunately, I stuck with how to get the input box’s value.

Any help is much appreciated

Cheers
Apr 20 '07 #1
3 1077
korinth
5 New Member
have you tried using .value?

it seems like if you're trying to get whatever is in the input field, myelement[i].value should work. at least if it's a text field.

if it is another form of input, like a radio button or a checkbox, you have to specify the value in the tag.
Apr 20 '07 #2
elsheh
29 New Member
Thanks Korinth
Actually it’s a text field. But, unfortunately element[i].value doesn’t work. any clue?
Cheers

have you tried using .value?

it seems like if you're trying to get whatever is in the input field, myelement[i].value should work. at least if it's a text field.

if it is another form of input, like a radio button or a checkbox, you have to specify the value in the tag.
Apr 23 '07 #3
elsheh
29 New Member
thanks alot Korinth
got it.
cheers
Thanks Korinth
Actually it’s a text field. But, unfortunately element[i].value doesn’t work. any clue?
Cheers
Apr 23 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3986
by: ensnare | last post by:
Hi all, I'm using a database session handler and am looking to loop through data residing in the sessions table to make a 'Users online' array. I've found that using urldecode on the data column gives me a serialized string of varname|datatype:data; for each variable. I'm having a bit of trouble with deserializing the data. I could always use regexps to grab the specific data I want, but I'm
2
2161
by: jason | last post by:
What is the best way to build a dynamic html body message if one is looping through a customer table (=/=500 customers) and corresponding inventory table: 1. FSO html template with paramters 2. Build the thing in the .HTMLbody of CDO while looping 3. Another elegant method.... The customer email (TO: john@catco.com) would look something like this:
3
1422
by: HenryW | last post by:
I have a section of ASP code that dynamically builds a table. And per usual it writes out to the table like so: Response.Write("<td><font face=""Verdana"" size=""2""><b> Status </b></font></td>") Response.Write("<td><font face=""Verdana"" size=""2""><b> Description </b></font></td>") ' make a couple of column headers
5
3003
by: Jonboy | last post by:
Hi all, I have a .swf file...and thats all i have. A relic. I am wondering how I can make use of it in a webpage? I don't have the associated html to go with it. Also in thehtml is it possible to make it play only once....or maybe play once...then lead onto the home page after its finished??
1
6431
by: Jozef | last post by:
Hello, I'm trying to loop through forms by doing a "For Each" in the Currentdb. I'm doing this like the following; Dim db as dao.database Dim docLoop as document Dim ctrl as control Set db = CurrentDb
6
1812
by: Luke - eat.lemons | last post by:
Hi, Im pretty new to asp so all light on this question would be great. Basically i need to test to see what value is set (where to retrieve the data from) so ive done it like this: If Request.Querystring("id") = "" then TidF=Request.Form("TidF") Else
3
1283
by: Luke - eat.lemons | last post by:
Sorry for the post in this NG but im short on time to get this working and i haven't seem to of got a response anywhere else. Im pretty new to asp so all light on this question would be great. Basically i need to test to see what value is set (where to retrieve the data from) so ive done it like this: If Request.Querystring("id") = "" then TidF=Request.Form("TidF")
5
1924
by: talktozee | last post by:
Hello, everyone! Here's are the basics: 1. The query looks at all positions that are active and haven't been filled. 2. It then has to look at every single position and determine three things: Does the person running the query (via an ASP page) have certain rights? a. Recruit rights b. Enlist rights c. Take rights
1
1845
by: assgar | last post by:
Hello I have changed the process code abit so it receives the data from the form and ensures the data in array format. This has eliminated my previous error. The problem I am experiencing is the looping is not displaying the all contents of the arrays. Do you have any idea what the problem is and how to fix the problem?
3
1948
by: chiku1523 | last post by:
Hi, Please find the following code. In function setAnswers, I am looping with each question. I have inner loop, which is looping for each answers of the questions. If any of the answer for question 1 and question2 is selected this code is working fine. But if None of answer of either question selected, it is not iterating through outer loop. Please help me to point out the error. <html> <head> <style type="text/css"> body...
0
8323
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1969
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.