Solved

Stylesheets ( css ) and enclosed view in IE

Posted on 2002-05-18
16
251 Views
Last Modified: 2013-12-18



For the webinterface of all my applications i use style sheets to do the biggest part of the html formatting.
I seem to have one issue when there is an enclosed view in my form :
the html of the enclosed view ( <TABLE> ) doesn't take the settings of the style sheet. This seems only to be a problem for IE , Netscape inherits the css settings.

Anyone any ideas ?
0
Comment
Question by:Steamer
  • 7
  • 4
  • 3
  • +1
16 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7019079
How is css defined ??? Usual prcatice is creating the stylesheet as a resource in a page (i.e the styles will be defined in a page as html) and insert it into the form with REL tag of style sheet.

If you have any hide-when, the style doesn't apply for some cells. A bug in R5.

~Hemanth

0
 

Author Comment

by:Steamer
ID: 7019592
I link my style sheet in the head of my form like :

<link rel="stylesheet" href="../homepage/style/global.css">

It's the company style sheet , so it contains all company standards regarding the look-and-feel of the company intranet.

So i guess that's OK , I don't have the style sheet with me , but i'll paste some code one of the next days.

Like i said , it works well with Netscape.
 When i generate the code manually it works when i add

<TABLE>
<TR class="x">
<TD class="y"></TD></TR>

Only i don't know how i can change the <TABLE> definition of an enclosed view.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7019699
Why don't you use view applet, to avoid the tables totally.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7020205
Hello Steamer,

there is an answer how to manipulate the generated html code produced for a view, but not for 50 points.

How about 300 points? ;-)

Cheers,
zvonko

PS: only a joke :-)

The answer is really not simple but there is a way. Whit the trick I want to tell you I have even managed to merge two views into one html page. Merge meen embeding one view at certain position into another view) :-)

The trick is not basically my idea but I con not find the source where I found the trick.

Basically you have to define the html code surrounding the $ViewBody to be the content of a JavaScript variable. After receiving the view html code in this var assignment you can traverse the content of this variable (the view html code) and print all the parts as you like it with the JavaScript function: document.write()
When writing the code you are of course allowed to change any html tag as you like it.
In this example I got this trick was the purpose to change the output of search result view and exchange the ugly images on this result view.

This was for 50 points :-)

Good luck,
zvonko

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7023266
I suppose you have a default definition for text defined to the BODY element in the stylesheet.
In IE, if you want text inside tables to be displayed the same way, you also have to use the same styles to apply to the elements TD (for table cells) and TH (for table headers).

By default notes will display view titles in a table header and content rows in regular table cells.

Therefore I always include the following on my stylesheets :

BODY {
     color : Black;
     font-family : Arial, sans-serif;
     font-size : 9pt;
     font-weight : bold;
}

TH {
     color : Black;
     font-family : Arial, sans-serif;
     font-size : 9pt;
     font-weight : bold;
     padding-right: 25px;

}

TD {
     color : Black;
     font-family : Arial, sans-serif;
     font-size : 9pt;
     padding-right: 25px;
}

The BODY style is to define default text on my pages/forms. The TH style makes the table headers use the same format except for the bold text and the TD style will make sure that text inside tables is displayed the same way as regular text.

The padding-right is to make sure there is some white space between columns to make the view more readable.

To apply a certain style to a column of your view, just include the passthru HTML in the formula to display the value using the wanted style.

An example:
"[<DIV CLASS=\"myStyle\">]" + ColumnValue + "[</DIV>]"
The square brackets as you probably know are used to mark the DIV-tags as passthru HTML coce and will apply the style to the element in this column.

Hope this helps.

JM
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7023351
there goes my 300 points JM.... :-)
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7023356
Just thought I'd post a simple solution, before you started complicating things with JavaScript >:-)
0
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 50 total points
ID: 7023468
Oops, noticed a little error in copy/pasting from my stylesheet :

The regular text in BODY shouldn't be bold, but normal so it would read like this :

BODY {
    color : Black;
    font-family : Arial, sans-serif;
    font-size : 9pt;
    font-weight : normal;
}

TH {
    color : Black;
    font-family : Arial, sans-serif;
    font-size : 9pt;
    font-weight : bold;
    padding-right: 25px;

}

TD {
    color : Black;
    font-family : Arial, sans-serif;
    font-size : 9pt;
    font-weight : normal;
    padding-right: 25px;
}
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Steamer
ID: 7025218
I'll give it a go , the easy way.
The javascript solution can be handy for other implementations, but i like easy solutions , esp. since it works in Netscape.

I'll keep you posted.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7025442
Why do you think does view html code redirection not work in Netscape?

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7026140
If I post a second question for the JavaScript solution to see two views on one page, would you post it there? (I've got plenty of points to spent)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7026349
You misunderstood my explanation JM :-)

To show two views on one page I would prefer frames.

My problem was this: we have a Helpdesk application with 300000 tickets and 8 Gigabyte data in single database. The whole application contains over forty databases and this eight gig are in spite of all efforts to keep the main databases small. Mail problem arise from the fact that this application was basically a Notes client application distributed over thirty locations and concentrated to one mainframe with a web interface. They demand for converting the application was not to change anything on the user interface (bum!)

To shorten the story: starting point of web usage was a view with nine categories representing 300000 documents. Opening this view and expanding every level of categories lasted every step approximate one minute. There where four level of categories for the tickets. User had to expand four categories level until finally he/she sow the tickets. This was not usable.
My idea was to make new sort documents in this database representing only the category levels (about 900 category item documents). To show such a view showing only category item documents lasted few seconds. To show the ticket view at forth level lasted also a few seconds (I can explain this paradoxes on the phone or on Groove in detail)
So the last problem was: how to combine this two views into one view?!?
I solved this with frames and view merging. One frame was invisible and was used only for forth level view display. So when the browser user expanded the fourth level of category items view was the background view filled with ticket view documents and transferred into category items view in special position.

But this all was only necessary on OS/390 Domino. When migrating to SUN Solaris the whole application become ten times faster and the whole hocus pocus was abandoned :-)

So JM learn from my failures: do not merge two views; speed up your application in better ways :-)

Anyway thanks for the points offer buddy :-)

You can call me in the office or send me an email if you have special needs to discuss.

So long,
zvonko


0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7026395
Ah okay. I was just curious, that's all. No special requirement at this point (I too use frames to display multiple views or even applications in one window).
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7043746
Hello Steamer,
Did you have any luck with this or do you need further assistance?
0
 

Author Comment

by:Steamer
ID: 7049824
I defined the behaviour of the table elements twice and now it works , still kinda weird Netscape takes it the first time and IE not.
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7050448
Don't know why that is either.
Maybe you used a style property that IE does't support?

Anyways, glad you got it working and I could be of some help.

Regards,
JM
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now