HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 1st, 2004, 04:11 AM
NotOnUrNelly NotOnUrNelly is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 11 NotOnUrNelly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASP in Dreamweaver Layers

Hi All

I have an access database in which the main form hold some 30 fields
so I have used a tabbed interface to simply break the fields down over the tabs so the
page does not look cluttered.

The next stage is to transfer the database to the web, I intend to use dreamweaver to carry out my coding.

In the past I created a static dreamweaver tabbed interface using layers. Where I have say five layers
all stacked on top of each other. I then have a button interface, which upon the click of certain buttons simply shows the
relevant layers and hides the ones connected to the disabled buttons. This has worked fine with regards to static html text

Would it be possible for each layer to hold a few of few the datrabase fields coded in asp and the others hold other information
relevent to that layer tab.

Ie can I break the code down over layers rather than pages

Hope someone can help
Thanks
Jamie




on

Reply With Quote
  #2  
Old October 1st, 2004, 10:26 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
I would stronly recommend against using Dreamweaver for any type of coded application.
Generally, the code it creates is bloated, unnecessary and bug ridden.

Reply With Quote
  #3  
Old October 10th, 2004, 10:55 AM
Phoenix's Avatar
Phoenix Phoenix is offline
Web-Standards Evangelist
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Posts: 1,522 Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level)Phoenix User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 23 h 48 m 4 sec
Reputation Power: 9
...Coming from an advocate of MS products

Seriously though

So long as you code the ASP and ADO code yourself there shouldn't be any problem

But if possible, code the positioned <divs> by hand, DW has the habit of messing up semantic code like there's no tomorrow (of course, not as bad as say... FrontPage or NetObjectsFusion)

Try this:

Code:
<%
Dim rsRecordSet, strSQL, strConn
strConn = "" ' Your connection string, be it a DSN name or whatever
strSQL = "SELECT " & Your fields for tab 1 & " FROM tblWhatever WHERE field = 'condition' ORDER BY field DESC "
Set rsRecordSet = Server.CreateObject("ADODB.Recordset")
With rsRecordSet
    .ActiveConnection = strConn
    .Source = strSQL
    .Open
End With
%>

<div id="Container"> <!-- Container for your "form" -->
    <div class="Tab">
        <table>
            <tr>
                <td>ColOne</td>
                <td>ColTwo</td>
                <td>Etc...</td>
            </tr>
<% Do While Not rsRecordSet.EOF = True %>
            <tr>
                <td>ColOne</td>
                <td>ColTwo</td>
                <td>Etc...</td>
            </tr>
<% rsRecordSet.MoveNext 
Loop%>
        </table>
    </div>
<% rsRecordSet.Close
strSQL = "SELECT " & Your fields for tab 2 & " FROM tblWhatever WHERE field = 'condition' ORDER BY field DESC "
rsRecordSet.Source = strSQL
rsRecordSet.Open%>
    <div class="Tab">
        <table>
            <tr>
                <td>ColOne</td>
                <td>ColTwo</td>
                <td>Etc...</td>
            </tr>
<% Do While Not rsRecordSet.EOF = True %>
            <tr>
                <td>ColOne</td>
                <td>ColTwo</td>
                <td>Etc...</td>
            </tr>
<% rsRecordSet.MoveNext 
Loop%>
        </table>
    </div>
</div>

<!-- And so on for each tab, then add the rsRecordSet.Close() method and Set = Nothing as well -->


Oh, and use CSS to set tabs 2 through whatever to invisible, or just z-indexing, but visibility would be eaiser with JavaScript later on...

Code:
#Tab1 {
    display: visible;
}
#Tab2 {
    display: hidden;
}
#Tab3 {
    display: hidden;
}
Etc....


And the JS

Add the "onClick" attribute to any <a> or <li> or <button> you wish

Code:
function showhide(layer_ref) {
	if (state == 'visible') {
		state = 'hidden';
	} else {
		state = 'visible';
	}
	
	if (document.all) {
		eval( "document.all." + layer_ref + ".style.visibility = state");
	}
	
	if (document.getElementById && !document.all) {
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
	}


You will need to modify that code slightly (I copied it from a previous work of mine) to get it to work as you wish

HTH
-1337_d00d

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > ASP in Dreamweaver Layers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT