Solved

Newbie Q: Dynamic content inside tables

Posted on 2001-07-03
6
228 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
  • 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 100 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now