|
I realise "Seperating style from content" is the CSS credo, but it struck me as a good idea to take it one step further in my current project and try and bring XML, XSL and CSS together to seperate things out that little bit more.
The idea is that an admin with no coding or html knowledge can use an online editor to change information presented on the site in a user friendly manner.
To this end I figured, stick all the text data in XML, leave the XSL files that the admin wont touch to format all the lists tables, etc and have the CSS (again not touched by admin) apply the sites over all look to the data the XSL chucks out.
Now i can get the XSL to do my formating and the CSS to handle my style.... my problem is I'm not sure how to go about a layout for an XML document that will hold text to be displayed on a web site AND also handle some degree of formatting.
I know how to make an XML file but its more the "theory behind building a good template for web content" that im after.
At the end of the project I want my admin user to open up a text editor page, parse the exiting text for the selected page into an on page text editor box and be able to edit it, add formatting, semantics, carridge returns, etc then save the work and have it parsed back into the XML file as valid HTML.
At the moment i have no editor for the content built and the data sits in the XML as HTML between CDATA tags... which just looks messy and difficult to pass into an editor.
Can any one link me to any good artivles on building xml to hold web site data?
|
|
|
|
|
This sounds like a nice project. But, if I were you, I wouldn't want to invest all that work because it's hard and when it breaks, it comes back to you. Instead, I'd rather use something like DotNetNuke (www.dotnetnuke.com[^]). An administrator has the ability to go in and use a MS Word-like interface to create page content. It also has lots of other wonderful modules and a whole list of stuff out there you can buy/download to expand it.
FYI, DotNetNuke saves all the page content in a database instead of in files and makes heavy use of CSS for skins and other stuff.
Logifusion[^]
|
|
|
|
|
Thanks Dustin as far as the project goes, it's more a learning experience than somthing I have to consider on a time/money basis. So getting my hands dirty is more the point than the drawback...
Still its nice to know about products like this for when i go pro so thanks for the link
|
|
|
|
|
I have a (main) table with a background image in which are cells that contain (internal) tables with their own background images. The main table's background image shows up just fine, but the internal ones down't show up at all.
Here's the code:
<style type="text/css">
.LogoTable
{
font-family:arial;
font-weight:bold;
font-size:12px;
color:#FFFFFF;
background-color:transparent;
background-attachment:fixed;
background-image:url(pcplus_logo_2.png);
background-repeat:no-repeat;
background-position:right top;
}
.LogoLinks
{
display:block;
clear:left;
float:right;
position:static;
margin-top:96px;
margin-bottom:2px;
text-align:right;
z-index:100;
}
</style>
<table (with it's own background image)><tr><td>
<table class="LogoTable" width="100%" height="110" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
[span class="LogoLinks"]
Welcome so and so to this web site <br />
[a style="color:#FFFF00;" href="blah.html"]Logoff [/a]
[a style="color:#FFFF00;" href="blah.html"]Support [/a]
[a style="color:#FFFF00;" href="blah.html"]Help [/a]
[/span]
</td>
</tr>
</table>
</td></tr></table>
Can't nested tables each have their own background image?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
In the style tag the statement
background-image:url(pcplus_logo_2.png);
shoudl be modified like
background-image:url('pcplus_logo_2.png');
Try It.
|
|
|
|
|
Hi..
Is there a way to make an HTML textbox read only? how can i do so?
|
|
|
|
|
Set the readonly property to "true".
---
b { font-weight: normal; }
|
|
|
|
|
<input type="text" readonly="readonly" />
|
|
|
|
|
|
Since AJAX is being discussed every where in cyberworld,there is requirment of handling typical session managmnet issues in AJAX applications,speically if they are maintaing session on some other server.
Would anyone shed light on this topic? that how could it be achieved?
|
|
|
|
|
|
Hello to all,
I have Datagrid which is bind with an Arraylist.Now I want to Restrict display of Datagrid.I am getting all the elements of the properties in the Arraylist so when I bind Arraylist with Datagrid it displays all the columns which are properties of my class.I just need to display few columns from that.
Also I need to save all the rows of datagrid into the database when save button is click.
|
|
|
|
|
Go to datagrid property builder and deselect the autogenerate columns flag. Then add in bound columns for each of your properties that you want to see.
|
|
|
|
|
My pervious record is getting erased.How do I handle this???
|
|
|
|
|
Save it first
Without seeing your code or really knowing the steps you are taking it's hard to say.
|
|
|
|
|
Hi,
Thanks for ur reply.I am saving all the values in hidden textbox everytime when a new record is added.Next I store that new record in arraylist using properties of class.Finally I bind arraylist with datagrid.
Following is the code:
private void ibtnAdd_Click(object sender, System.Web.UI.ImageClickEventArgs e){
int cnt;
if(lbISOClauseNo.Items.Count > 0 && lbISODesc.Items.Count > 0 && txtExpected.Text != "" && txtTimeAllocated.Text != "")
{
for(cnt = 0 ; cnt < lbISOClauseNo.Items.Count ; cnt++)
{
if(cnt == lbISOClauseNo.Items.Count -1)
{
htxtFISOClauseNo.Value += lbISOClauseNo.Items[cnt].Value;
htxtFISOClauseDesc.Value += lbISODesc.Items[cnt].Value;
}
else
{
htxtFISOClauseNo.Value += lbISOClauseNo.Items[cnt].Value + "," ;
htxtFISOClauseDesc.Value += lbISODesc.Items[cnt].Value + "," ;
}
}
htxtFExpected.Value = txtExpected.Text;
htxtFTimePlanned.Value = txtTimeAllocated.Text;
cnt = Int32.Parse(htxtFChecklistNo.Value);
cnt++;
htxtFChecklistNo.Value = cnt.ToString();
}
ArrayList arrValues = new ArrayList();
arrValues.Add(new Classes.CChecklist(Int32.Parse(htxtFChecklistNo.Value),htxtFISOClauseNo.Value,htxtFISOClauseDesc.Value,htxtFExpected.Value,htxtFTimePlanned.Value));
dgChecklist.DataSource = arrValues;
dgChecklist.DataBind();
}
Finally I need to store all the records of Datagrid into the Database.
Please help me.
Thanks and Regards.
|
|
|
|
|
reading a file in javascript without using activex componenets withsample code
|
|
|
|
|
I suppose that you were trying to ask a question?
If you are trying to ask how one would do to read a file using Javascript, the answer is that it can't be done.
The sample code for that is:
---
b { font-weight: normal; }
|
|
|
|
|
|
Hi,
I have a class. this class do not have any function or procedures except for the initialization code in it
Code Snippet:
---------------------------------------------------
Class Init
Private Sub Class_initialize
msgbox ("INitialization class called")
If BRAND = "O" Then
URL = "http://ooo.com"
End if
If BRAND = "C" Then
URL = "http://ccc.com"
End If
End Sub
End Class
------------------------------------------------------
I tried instiantiate this class by
Set init = New Init.initialize() - Throwing an error message "Object doesn't support this property or methode 'Init.initialise'"
Set init = New Init - Throwing an error message "Illegal assignment: 'Init'"
--------------------------------------------------------
But both of this did not work. Can any one please let me know to instiantiate this type of class?
I am trying to use this class as a initialization class for my script.
Thanks,
Karthikeyan A
|
|
|
|
|
I don't understand what you are trying to accomplish. How does the variable BRAND get set to a value? How does anything access the URL that is set?
Mike Lasseter
|
|
|
|
|
HI,
The variable BRAND and URL are global variables and BRAND is assigned a value (O or G) out side this class. All i am trying to do inside the class is depending upon the BRAND value, i am trying to set value for the variable URL. I have only constructor and do not have any function or procedure. I tried instiantiate the class so that this constructor will be called, and was getting error during class instiantiation.
Hope i am clear in explaining my requirements.
Thanks,
Karthikeyan A
|
|
|
|
|
What language are you using? And why are you accessing global variables inside of a class? The values should be passed from the class using let/get propereties.
Mike Lasseter
|
|
|
|
|
I am using VBScript. Please let me know if you have an better ideal of implementation.
Thanks,
Karthikeyan A
|
|
|
|