Solved

Newbie Q: Dynamic content inside tables

Posted on 2001-07-03
6
231 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 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Scheduled IIS .Net2 AppPools recycle and SQL connection Hangs 33 182
Problems using Provider=OraOLEDB.Oracle via VBScript/Classic ASP 5 129
CREATE DATABASE 3 45
Boolean 13 50
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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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