473,396 Members | 1,814 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,396 software developers and data experts.

Problem With Button In Table

http://www.igearonline.com/subscribe/admin.asp

I have an html table that is loaded with database records. I have edit
and delete options inside the table that edit or delete a given row.
They all work fine except for the very first Edit option (the one that
corresponds to the first row of data). Can anyone help me out. I have
provided part of my code below.
<%
Do Until rs.EOF
%>
<tr>
<% Dim x, bgcolor
if x = 1 then
bgcolor="#E0E0E0"
x = 2
else
bgcolor="#D0D0D0"
x = 1
end if
%>
<td bgcolor = <%=bgcolor%> align="left">
<table><tr>
<form method="post" action="edit.asp" name="EditForm">
<td>
<input type="hidden" name="Edit" value= "<%=rs.Fields(0)%>" >
<input type="submit" class="modifyLink" name="Modify" value="Edit" />|
</td>
</form>
<form method="post" action="admin.asp" name="DeleteForm">
<td>
<input type="submit" class="modifyLink" name="Modify" value="Delete"
onclick="return confirm('Are you sure you want to delete this
record?')" />
<input type="hidden" name="Delete" value= "<%=rs.Fields(6)%>" >
</td>
</form>
</tr></table>
</td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="name"> <%=rs.Fields(1)%>,
<%=rs.Fields(2)%>
</td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="company"> <%=rs.Fields(7)%></td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="email"> <%=rs.Fields(6)%></td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="phone"> <%=rs.Fields(4)%></td>
</tr>
<%
rs.MoveNext
Loop
%>

Sep 2 '05 #1
5 1696
The FORM tags all have to go inside the TD tags. Only a TR can contain a
TD, and a TR can contain only TD or TH.

brian4cards wrote:
http://www.igearonline.com/subscribe/admin.asp

I have an html table that is loaded with database records. I have edit
and delete options inside the table that edit or delete a given row.
They all work fine except for the very first Edit option (the one that
corresponds to the first row of data). Can anyone help me out. I have
provided part of my code below.
<%
Do Until rs.EOF
%>
<tr>
<% Dim x, bgcolor
if x = 1 then
bgcolor="#E0E0E0"
x = 2
else
bgcolor="#D0D0D0"
x = 1
end if
%>
<td bgcolor = <%=bgcolor%> align="left">
<table><tr>
<form method="post" action="edit.asp" name="EditForm">
<td>
<input type="hidden" name="Edit" value= "<%=rs.Fields(0)%>" >
<input type="submit" class="modifyLink" name="Modify" value="Edit" />|
</td>
</form>
<form method="post" action="admin.asp" name="DeleteForm">
<td>
<input type="submit" class="modifyLink" name="Modify" value="Delete"
onclick="return confirm('Are you sure you want to delete this
record?')" />
<input type="hidden" name="Delete" value= "<%=rs.Fields(6)%>" >
</td>
</form>
</tr></table>
</td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="name"> <%=rs.Fields(1)%>,
<%=rs.Fields(2)%>
</td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="company"> <%=rs.Fields(7)%></td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="email"> <%=rs.Fields(6)%></td>
<td bgcolor = "black"></td>
<td bgcolor = <%=bgcolor%> name="phone"> <%=rs.Fields(4)%></td>
</tr>
<%
rs.MoveNext
Loop
%>

Sep 2 '05 #2
Everything works except the first edit button. I moved the FORM tags
inside the TD tags and the same problem still occurs.

Sep 2 '05 #3
I figured out a way around it. I submitted the form to the same page
and then sent it to another page with url parameters.

Sep 2 '05 #4
I figured out a way around it. I submitted the form to the same page
and then sent it to another page with url parameters.

Sep 2 '05 #5
brian4cards wrote:
Everything works except the first edit button. I moved the FORM tags
inside the TD tags and the same problem still occurs.


I just looked at it and it's where it was yesterday, with the table
inside the form.
Sep 2 '05 #6

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

Similar topics

4
by: George K | last post by:
Hi, i have a very irriting problem that i have written a short piece of code to demonstrate. The problem is that my aspx page is not fully refreshed after an event, which is delegated to an...
6
by: mike | last post by:
I have a page that uses a some javascript and it works fine in IE but fails to work in Firefox. Basically what I'm trying to do is have 3 iframes on a page but only displaying one of them at a...
1
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say...
10
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page...
0
by: Luis Esteban Valencia | last post by:
Hello I wrote a program with code behind in C# to add row into table dynamically and the program worked very well in .Net Framework 1.1. When I run this program in .Net Framework 2.0 beta...
5
by: comshiva | last post by:
Hi all, I have converted my existing ASP.NET project from 1.1 to 2.0 and i have found that everything works fine except the linkbutton control in my datagrid which throws an javascript error when...
1
by: C D Wood | last post by:
To whom this may concern, Below is the source code, which demonstrates a problem I am having making a GUI for my python project work. 'table.txt' is a file that is read from the same folder....
2
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button...
9
by: QCLee | last post by:
Sir can you help me to transfer my Access Query to MS excel? i have a command button on the form to export the parameter query named "HVACWindwardQuery" to excel spreadsheet and i got the codes...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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...

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.