Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Newbie Q: Dynamic content inside tables

Posted on 2001-07-03
6
Medium Priority
?
234 Views
Last Modified: 2012-06-27
I'm just getting started with ASP.  Right now I have a web page that is horribly long.  What I'd like to do is have a Visual Basic object inject content into a <td></td> inside a table based off of button pushes etc.  Can anyone show me a simple example to do this.  Just a single table, a single VB object, and maybe a few lines of ASP to do this?
0
Comment
Question by:tdubroff
[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
6 Comments
 
LVL 7

Expert Comment

by:John844
ID: 6249791
do you mean something like this where your activex dll returns a string?

<%
dim obj
set obj=server.createobject("projectName.ClassName")

%>

<table>
  <tr>
    <td><%=obj.methodCall %>
  </tr>
</table>

0
 
LVL 7

Expert Comment

by:John844
ID: 6249889
sorry, left off a closing td tag
change
    <td><%=obj.methodCall %>
to
    <td><%=obj.methodCall %></td>
0
 
LVL 5

Accepted Solution

by:
russellshome earned 300 total points
ID: 6252808
Why not try using subroutines & functions.

<%
Function Inject(Stuff)
  Dim injected
  injected = "<td>" & Stuff & "<td>"
End function
%>

<table>
  <tr>
<%
For col = 1 to 5
 Response.Write Inject(col)
Next
%>
  <tr>
</table>

OR do you actually want buttons on the same page to change the content of a &lt;td>?

<table>
     <td><div id="t1">Hi</div></td>
</table>

<form name="test">
<input type="button" value="Hello" onClick="doHello(1)">
<input type="button" value="There" onClick="doHello(2)">
</form>

<script>
     function doHello(i){
          switch(i) {
               case 1:
                    t1.innerText = "Hello"
                    break
               case 2:
                    t1.innerText = "There"
          }
     }
</script>
0
Industry Leaders: 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!

 
LVL 2

Author Comment

by:tdubroff
ID: 6252917
I shall try what has been suggested.  It seems that the combination of comments here answer my question.
0
 
LVL 7

Expert Comment

by:John844
ID: 6315488
Do you need more information still.  If not select the comment that assisted you the most.  If you want to split the points between more than one expert, then post a comment in the Community Support area with a link to this question.  They can help you out.

John
0
 
LVL 2

Author Comment

by:tdubroff
ID: 6315526
I went ahead and selected Russelshome as the answer.  He has less points, so John844 shouldn't mind.  Thanks for the help guys!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

715 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