Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Add Client side button to HTML table

Posted on 2004-08-15
5
Medium Priority
?
311 Views
Last Modified: 2006-11-17
I have an html string that is inserted into my aspx page.  The html is generated dynamically.  I attempted to add a client side button to this dynamically generated html but when I open the page it crashes internet explorer.

I only have access to the html inside the <Table></Table> and I attempted to add the button as so...

<INPUT class='btnUpdate' style='Z-INDEX: 115; LEFT: 77px; POSITION: absolute; TOP: 457px' onclick='UpdateVV();' type='button'>

Prior to this tag is the <Table> tag and 4 hidden text boxes.

How can I make this button work?
0
Comment
Question by:billy21
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Author Comment

by:billy21
ID: 11803422
So the HTML looks like this...
<Table>
    <asp:textbox id='SupplierId' value:HM*SupplierId style='DISPLAY: none; Z-INDEX: 102; LEFT: 636px; POSITION: absolute; TOP: 9px' runat='server' Width='1px' Height='330px'></asp:textbox>
     <asp:textbox id='SPId' style='DISPLAY: none; value:HM*SPId; Z-INDEX: 102; LEFT: 636px; POSITION: absolute; TOP: 9px' runat='server' Width='1px' Height='330px'></asp:textbox>
     <asp:textbox id='VariationReason' style='DISPLAY: none; Z-INDEX: 102; LEFT: 636px; POSITION: absolute; TOP: 9px' runat='server' Width='1px' Height='330px'></asp:textbox>
     <asp:textbox id='VariationNote' style='DISPLAY: none; Z-INDEX: 102; LEFT: 636px; POSITION: absolute; TOP: 9px' runat='server' Width='1px' Height='330px'></asp:textbox>
     <INPUT class='btnUpdate' style='Z-INDEX: 115; LEFT: 77px; POSITION: absolute; TOP: 457px' onclick='UpdateVV();' type='button'>
     <TR>...
0
 
LVL 8

Accepted Solution

by:
shovavnik earned 2000 total points
ID: 11803451
You should always put controls inside table cells and not in the table itself.

This is especially true of serverside controls, as you never know how they'll render.

Either take all the <asp:textbox> controls out of the table or put them in a
<tr><td>{Your code here}</td></tr>
block.

If you want to make sure the boxes and the button are always on the same row, put them in their own table:
<table>
<tr>
<td><asp:textbox #1></td>
<td><asp:textbox #1></td>
<td><asp:textbox #3></td>
<td><input type="button"></td>
</tr>
</table>


Btw, what exactly do you mean by dynamically generated html?  (There are several possible meanings.)
1. Do you generate the html code *with* the <asp:textbox> controls?  (With xslt for example?)
2. Do you type the html code exactly as you've specified here in an .aspx file (not in codebehind)?
3. Is this code inside a repeating object, like a DataRepeater or some other data bound control?

0
 
LVL 6

Author Comment

by:billy21
ID: 11803456
Yes i'm using the html inside a repeater control bound to a datatable object.
0
 
LVL 6

Author Comment

by:billy21
ID: 11803459
Thanks shovavnik.  That did the trick!
0
 
LVL 8

Expert Comment

by:shovavnik
ID: 11803465
Glad to be of service.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question