HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 14th, 2009, 03:17 PM
milkyway milkyway is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 10 milkyway User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 34 m 12 sec
Reputation Power: 0
DOM and asp

I have a table that looks like this. All the data from the database is put into a table, through a loop

I am using ADO, in beginner asp



1 ABC 12
2 DDD 14
3 GHI 78
4 JKL 77
5 PLS 22
6 QWE 22
7 OOO 55


When i click any of the names like JKL, or PLS

i want a text box to appear in the same row, with the values written in the text boxes, for updating

so my question is how do you do that, do you use DOM (innerHTML property) ?

if so, how do you do that?

Reply With Quote
  #2  
Old October 15th, 2009, 03:59 AM
Jonathan8146 Jonathan8146 is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Posts: 1,708 Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level)Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level)Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level)Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level)Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level)Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level)Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level)Jonathan8146 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 3 h 50 m 45 sec
Reputation Power: 177
Quote:
Originally Posted by milkyway
I have a table that looks like this. All the data from the database is put into a table, through a loop

I am using ADO, in beginner asp



1 ABC 12
2 DDD 14
3 GHI 78
4 JKL 77
5 PLS 22
6 QWE 22
7 OOO 55


When i click any of the names like JKL, or PLS

i want a text box to appear in the same row, with the values written in the text boxes, for updating

so my question is how do you do that, do you use DOM (innerHTML property) ?

if so, how do you do that?


Yes, you would use DOM, but it would make much more sense if you were doing this to edit a value to have your list in a select with the option value set to the record id and the display set to the text value. You would then have an empty text field that you could put the new value in.

When yoy submitted the form the ID of the record and the new value would be passed back to the server for you to update your db table.

Reply With Quote
  #3  
Old October 15th, 2009, 07:10 AM
milkyway milkyway is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 10 milkyway User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 34 m 12 sec
Reputation Power: 0
i have a slight problem.

i am trying to change innerHTML of a table row through a function.

but because on of my update function involves, submitting the form.

the innerHTML goes away.

any idea how to fix that.

see here

Code:
function dosubmit(itm,row){
 	frmInfo.opr.value = itm
 	frmInfo.submit(); 	 
document.getElementById('list').rows[row].innerHTML=document.getElementById('update').rows[0].innerHTML

 }

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > DOM and asp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek