T
Tayna Taylor
Ok, here goes -- I don't know if this is too complex to figure out,
but let's give it a shot!
I have a SQL loop around a bunch of HTML code:
///*START SQL LOOP*
<html>
PHP, graphics, code & stuff
</html>
///*END SQL LOOP*
So, ok this runs and spits out however many result sets (sections) on
the screen. Fine so okay, it works -- but here is the clincher & what
I want to do --
Each HTML result set has two tabs... if someone clicks on a tab it
shows different data in the HTML result set -- so what I want to do
for elegance rather than having the screen refresh is to use some kind
of DHTML <div> technique to statelessly go between each screen in each
section when a user clicks back and forth on a tab.
So below is something I was thinking about how in theory it could
work, but I don't know how I would implement it...
///*START SQL LOOP*
//(I want this displayed initially)
<div ID="StateOne">
<html>
PHP, SQL, graphics, other code & stuff
</html>
</div>
//(I want this displayed when a tab two <a href> button is clicked)
<div ID="StateTwo">
<html>
PHP, SQL, graphics, other code & stuff
</html>
</div>
///*END SQL LOOP*
(FYI - above you can assume that the database has already been queried
before this, so the entire dataset needed is all ready to plug in
wherever its needed)
I've seen various techniques on how you can change stuff on the screen
using <div> tags and javascript - but the SQL loop around this,
compounded by the fact that there may be more than one of these at any
given time seems to make this a very difficult boggle for me.
If anyone can solve this I will be so so so happy, because my life as
a developer seems to now depend on it!!!!
Sincerely,
Tayna Taylor
but let's give it a shot!
I have a SQL loop around a bunch of HTML code:
///*START SQL LOOP*
<html>
PHP, graphics, code & stuff
</html>
///*END SQL LOOP*
So, ok this runs and spits out however many result sets (sections) on
the screen. Fine so okay, it works -- but here is the clincher & what
I want to do --
Each HTML result set has two tabs... if someone clicks on a tab it
shows different data in the HTML result set -- so what I want to do
for elegance rather than having the screen refresh is to use some kind
of DHTML <div> technique to statelessly go between each screen in each
section when a user clicks back and forth on a tab.
So below is something I was thinking about how in theory it could
work, but I don't know how I would implement it...
///*START SQL LOOP*
//(I want this displayed initially)
<div ID="StateOne">
<html>
PHP, SQL, graphics, other code & stuff
</html>
</div>
//(I want this displayed when a tab two <a href> button is clicked)
<div ID="StateTwo">
<html>
PHP, SQL, graphics, other code & stuff
</html>
</div>
///*END SQL LOOP*
(FYI - above you can assume that the database has already been queried
before this, so the entire dataset needed is all ready to plug in
wherever its needed)
I've seen various techniques on how you can change stuff on the screen
using <div> tags and javascript - but the SQL loop around this,
compounded by the fact that there may be more than one of these at any
given time seems to make this a very difficult boggle for me.
If anyone can solve this I will be so so so happy, because my life as
a developer seems to now depend on it!!!!
Sincerely,
Tayna Taylor