Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to add HTML table with XML.

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,26393
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> How to add HTML table with XML.
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to add HTML table with XML. - 9/27/2005 3:16:13 AM   
  akkua123

 

Posts: 15
Score: 0
Joined: 6/21/2005
From: USA
Status: offline
Hi

I have an issue to add information along with XML

The scinario is  I have " Chart.asp" which select a name from a dropdown select box .While I change a name It will go and create a chart on perticuler change. The code is as follows....

<object id=CSpace classid=CLSID:0002E556-0000-0000-C000-000000000046
style="margin:0.5cm;display:none"></object>

<SCRIPT LANGUAGE=VBScript>
Dim c
Set c = CSpace.Constants
Sub cboCategory_OnChange()
  n = CInt(cboCategory.Value)
  If n <>0 Then
     CSpace.Style.Display="inline"
     CSpace.Clear
     CSpace.EnableEvents = False
     CSpace.Load "http://abc/MakeChart.asp?Category=" & cboCategory.options(n).Text
      CSpace.EnableEvents = True
     CSpace.Width = 600
     CSpace.Height = 400
     CSpace.Refresh
  Else
     CSpace.Style.Display="none"
  End If
End Sub
Sub CSpace_SelectionChange()
   If CSpace.SelectionType = c.chSelectionPoint Then
       'Set the series color to the default color.
       CSpace.Charts(0).SeriesCollection(0).Interior.Color = "RosyBrown"
       'Change the color of the selected point.
       CSpace.Selection.Interior.Color = "CornSilk"
   End If
End Sub
</SCRIPT>

I wish to add a table regarding more information about the selected  catogory  after Cspace.Load
which is a Dynamic HTML table.

How we can do that...Please help.

_____________________________

Amaran
 
 
Post #: 1
 
 RE: How to add HTML table with XML. - 9/27/2005 5:47:14 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
Hiya,

from a HTML point of view it would be:

code:
[...]
     CSpace.EnableEvents = False
     CSpace.Load "http://abc/MakeChart.asp?Category=" & cboCategory.options(n).Text
     CSpace.EnableEvents = True
     divTxt.innerHTML = "<table><th>Information</th><tr><td>" & CSpace.MoreInfoHere  & "</td></tr></table>"
     CSpace.Width = 600
     CSpace.Height = 400
     CSpace.Refresh
[...]


html:
<DIV ID="divTxt"></DIV>  <!-- create empty DIV b/c it will be dynamically filled //-->

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to akkua123)
 
 
Post #: 2
 
 RE: How to add HTML table with XML. - 9/28/2005 4:35:45 AM   
  akkua123

 

Posts: 15
Score: 0
Joined: 6/21/2005
From: USA
Status: offline
Hi Snipah..

Thank you verymuch for your help.I tried using <DIV> tag.But the problem is The information on the selection catogory item is a "Server name",which goes and creates a dynamic disk growth chart using makechart.asp.Below the chart I am trying to create a Table of information which is getting data from a "Resultset".I could not bring the Resultset data in to innerHML ..may be it is my poor ASP knowledge..as I do Database dev/admin..:).

thanking you again

_____________________________

Amaran

(in reply to Snipah)
 
 
Post #: 3
 
 RE: How to add HTML table with XML. - 9/28/2005 6:01:08 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
how does you resultset come about? eather show the output or / and the way of providing the resultset....

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to akkua123)
 
 
Post #: 4
 
 RE: How to add HTML table with XML. - 9/28/2005 6:47:48 AM   
  akkua123

 

Posts: 15
Score: 0
Joined: 6/21/2005
From: USA
Status: offline
Hi..

I am trying to bring bring Information in a table format  about a server name say "SVR001" which is selected from a drop down.
When I select the server or "onchange"  the above subroutine will load a "Dynamic chart" about the "Disk growth of the server.
The server have four disks  C,E,F and G I am trying to dispaly The maximum capacity,Available disk space,Last week usage etc..
Which are stored in a table called "svr_master"  in a HTML table format below my chart using Connection object and Recordset.
Can we mix Serverside and client side scripts ?
Sub cboCategory_OnChange()
  n = CInt(cboCategory.Value)
  scat = cboCategory.options(n).Text
  If n <>0 Then
     CSpace.Style.Display="inline"
     CSpace.Clear
     CSpace.EnableEvents = False
     CSpace.Load "xyz//2.asp?Category=" & cboCategory.options(n).Text
     CSpace.EnableEvents = True
     divTxt.innerHTML = "<h3>The summary of Server :" & scat & " on <%=date() %></h3>"
     divTxt.innerHTML = divTxt.innerHTML +"<table border = 1><tr><th>  Disk Name  </th><th>  Maximum Capacity(MB)  </th><th>  Available Space(MB)  </th></tr>"
<%
    
    rs.Open "SELECT *from disk_master where svr_name ='dsdsd99'", conn, 3
'  rs.Open "SELECT *from disk_master where svr_name ='" & sServ & "'", conn, 3
   %>
divTxt.innerHTML = "<h3>The summary of Server :<%=sServ %> on <%=date() %></h3>"
divTxt.innerHTML = divTxt.innerHTML + "<table border = 1><tr><th>  Disk Name  </th><th>  Maximum Capacity(MB)  </th><th>  Available Space(MB)  </th></tr>"
<%
   While not rs.EOF
   %>
      divTxt.innerHTML = divTxt.innerHTML +"<tr><td>"<%= rs("disk_name") %>"</td><td>" <%= rs("disk_capacity") %>"</td><td>"<% = rs("disk_free") %>"</td></tR>"
<%
     rs.MoveNext
     WEND
     rs.Close
  %> 

Else
     CSpace.Style.Display="none"
  End If
  
End Sub

_____________________________

Amaran

(in reply to Snipah)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> How to add HTML table with XML. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts