473,574 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="#E0E0E 0"
x = 2
else
bgcolor="#D0D0D 0"
x = 1
end if
%>
<td bgcolor = <%=bgcolor%> align="left">
<table><tr>
<form method="post" action="edit.as p" name="EditForm" >
<td>
<input type="hidden" name="Edit" value= "<%=rs.Fields(0 )%>" >
<input type="submit" class="modifyLi nk" name="Modify" value="Edit" />|
</td>
</form>
<form method="post" action="admin.a sp" name="DeleteFor m">
<td>
<input type="submit" class="modifyLi nk" 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 1702
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="#E0E0E 0"
x = 2
else
bgcolor="#D0D0D 0"
x = 1
end if
%>
<td bgcolor = <%=bgcolor%> align="left">
<table><tr>
<form method="post" action="edit.as p" name="EditForm" >
<td>
<input type="hidden" name="Edit" value= "<%=rs.Fields(0 )%>" >
<input type="submit" class="modifyLi nk" name="Modify" value="Edit" />|
</td>
</form>
<form method="post" action="admin.a sp" name="DeleteFor m">
<td>
<input type="submit" class="modifyLi nk" 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
8431
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 ImageButton during runtime, is fired. Any suggestions would be great. This code is the c# behind a webform with 1 panel and 2 buttons on it. I can see...
6
6084
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 time. A button is displayed for the two iframes that are not displayed and when the button is clicked, the corresponding iframe is shown and the other...
1
3535
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 black for example). I am dynamically creating the LinkButton controls and adding them into the table cell and I've also hooked up an event handler for...
10
3071
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 like it tried to do it but errored... I thought changeing the max size for the file input box to about 100mb would fix it but nope here is my page...
0
2393
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 version, the program is not working as in version 1.1. So what is the problem? Microsoft declared that the version 2.0 is fully backward support, but...
5
2588
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 clicked. I thought the control might be the problem, so i deleted the old control and binded the new linkbutton control but am still getting the...
1
2656
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. My code writes to a text file 'table.txt', and 'table.txt' is displayed in
2
3141
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 then the calender gone actually i want if i click outside off the calender then it should me removed ..How kan i do this ... Pls inform me as early...
9
2764
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 from searching on the internet and books but the problem is when i run the command button "Export" it just only open the Blank Spreadsheet, no ...
2
3139
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 message as in alert box as " Internet Explorer cannot open the Internet site http://google.citycarrentals.com.au/viewalllocations.php . Operation...
0
7794
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7710
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...
0
8225
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...
1
7800
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...
0
6437
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...
0
5296
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...
0
3738
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2230
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 we have to send another system
0
1051
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.