473,657 Members | 2,451 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 1706
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
8435
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 that the Page controls are correct after the event, but the page does not display it this way. ...
6
6091
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 two are closed and buttons for the closed iframes are then displayed. Firefox says basically...
1
3540
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 each LinkButton's Click event. This all works fine. Now in the Link Button's Click event...
10
3077
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 code and my code behind code... ===============
0
2395
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 it is not. Is that the problem with 2.0 version? I find out the problem in version 2.0. After...
5
2595
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 same error. Am using visual studio 2005. Source code inside my grid:...
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
3147
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 as possible .. I am waiting for ur quick replay ...Here i attached the source code .... <!DOCTYPE...
9
2771
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 data at all that it came from my query named "HVACWindwardQuery" and there's an error on it...
2
3147
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 aborted". It is working in Mozilla . Here i mentioned my code . I am facing this problem several...
0
8392
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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
8823
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
7320
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
6163
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
5632
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();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1944
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.