68 users online (0 members and 68 guests)  


Page 2 of 2 First 1 2
  Results 16 to 30 of 30

Related

  1. Scroll bar for part of page    Forum: HTML Forum
    Replies: 1
  2. Replies: 1
  3. Table Woes part 2    Forum: HTML Forum
    Replies: 9
  1. #16
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: How to override CSS styling in one part of webpage

    In order for that code to work, the ID must be unique on the page. From looking at the code you posted, I believe all of the links have the same ID (I could be wrong on that). Could you post the rendered HTML for the associated links (not the JSP code)?

  2. #17
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    Do you mean what you get by loading the page into IE then using the menu: View-->Source? I tried that to see what HTML was rendered, the way this site was written it looks like it scripts everything.

    When I pull the source it's a small html doc with one javascript function.

  3. #18
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: How to override CSS styling in one part of webpage

    Quote Originally Posted by wcipolli View Post
    Do you mean what you get by loading the page into IE then using the menu: View-->Source? I tried that to see what HTML was rendered, the way this site was written it looks like it scripts everything.

    When I pull the source it's a small html doc with one javascript function.
    Yes, that is what I mean. I am not interested in the javascript function right now, but if you would like to post the full source rather than trying to figure out what I am asking for, that would be fine as well.

  4. #19
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <link rel="stylesheet" href="../../theme/Master.css" type="text/css">
    <title>Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <meta name="GENERATOR" content="Rational Application Developer">
    </head>
    <SCRIPT type="text/javascript">
    window.onbeforeunload = function(){
    	window.location.href = "/forms/faces/jsp/searchforms/Logout.jsp";
    	unloadPage();
    }
    function unloadPage()
    {
    	var now = new Date();
    	var exitTime = now.getTime() + 500;
    	while (true) {
    		now = new Date();
    		if (now.getTime() > exitTime)
    		break;
    	}
    }
    </SCRIPT>
    <FRAMESET cols="100%">
    <FRAME name="main" src="faces/jsp/searchforms/SearchForms.jsp">
    <NOFRAMES>Your browser doesn´t support frames!</NOFRAMES>
    </FRAMESET>
    </html>

  5. #20
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: How to override CSS styling in one part of webpage

    ok. now I need to know the source of the file within the frame --> "faces/jsp/searchforms/SearchForms.jsp"

    So if the address of the page you are viewing is:

    www.google.com/index.php

    you need to change it to the following

    www.google.com/faces/jsp/searchforms/SearchForms.jsp

    Then view the source of that page and post it. If this is being done on a live website, you can send me the URL in a PM, and I will take a look at it there.

  6. #21
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    I sent you a pm, let me know if you didn't get it

  7. #22
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: How to override CSS styling in one part of webpage

    After looking at the code you sent me, try adding the following line to the bottom of your CSS file.

    Code:
    a:visited .outputText {color:#FF0000;}
    This should change the color of all visited links on the page to red. If it changes all the links, make sure to go into the Internet Options in IE and delete the Temporary Internet Files. Then click on a link again.

    Let me know what happens.

  8. #23
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    No effect. Links in the page, however, showed red. More specifically the page navigation and sort links. The problem with using outputText is that we use it for a lot of our links because of the purpose it serves in jsp. It also doesnt allow us to use span or div correct?

    Code:
    a:link .outputText {color:blue;}
    a:visited .outputText {color:purple;}
    a:hover .outputText {color:red;}
    a:active .outputText {color:green;}
    I did all just visited first which didn't work for the search results so I wanted to see what was going on a little further so i put all 4 in the bottom. This made the result links blue, they turned red when hovered, they turned green when active but turned right back to blue after the pdf was closed.

    Any other avenues we can take?

  9. #24
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: How to override CSS styling in one part of webpage

    If you are making the changes I have mentioned, and none of the links are being marked as visited, then it is a browser setting. You should be able to refresh the page and see the links as visited. If they are still not showing as visited, then make sure you are storing your history for more than 0 days.

    I have been working in generalities thus far in order to get a handle on how things are working on your page. Once we get links showing up as visited in the color you want them to be, then we can go and narrow down the focus to just specific links.

  10. #25
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    When i make that change the sorting links the search result page navagation (pages of results) and the word document links show red without me doing anything even after i clear the history.

    History is set to keep for 20 days.

    When I click on the search result link it loads the pdf in a new window and doesnt change colors.

    The design of the website JSP/JSF disables you from being able to refresh. It keeps the original URL in the address box while loading new pages. A refresh just brings you to the homepage.

  11. #26
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: How to override CSS styling in one part of webpage

    Quote Originally Posted by wcipolli View Post
    When i make that change the sorting links the search result page navagation (pages of results) and the word document links show red without me doing anything even after i clear the history.
    I don't know what to tell you on this one since I am unable to duplicate it. Make sure you clear both Temporary Internet Files and History (not sure if I told you history as well last time). Other than that I have no idea why all your links are registering as visited.

    Quote Originally Posted by wcipolli View Post
    The design of the website JSP/JSF disables you from being able to refresh. It keeps the original URL in the address box while loading new pages. A refresh just brings you to the homepage.
    This actually has nothing to do with the site being written in JSP/JSF. The site is written using frames in HTML. Go to the address I had you go to before in order to get the code for the links. Then you will be able to refresh without a problem.

  12. #27
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    Thanks for all your help.

    I was reading through that html file and have continued looking at other forums of people who had similiar problems. I have seen a few that said they got it working using the script I was talking about earlier.

    I thought it wasn't possible because I thought they were all set with id 'text7'(highlighted below)

    Code:
    <hx:outputLinkEx styleClass="outputLinkEx" id="formPdfLink"
    onclick="return openPDFWord(this, '#{varsearchResults.targetURLForPDF}');" 
    value="#{varsearchResults.pdfURL}">
    <h:outputText styleClass="outputText" id="text7"
    value="#{varsearchResults.formIdAndEditionDate}" escape="false"
    ></h:outputText>
    </hx:outputLinkEx>

    but really.. after looking at the html they do have individual ids


    Code:
    <td align="left" valign="top"><span id="form1:SearchResultTable:0:text11" class="outputText">CGLC Form (Occurrence)</span><br><br><input id="form1:SearchResultTable:0:hiddenFormTitle" type="hidden" name="form1:SearchResultTable:0:hiddenFormTitle" value="CGLC Form (Occurrence)" /></td>
    
    <td align="left" valign="top"><span id="form1:SearchResultTable:1:text11" class="outputText">CGLC Form (Occurrence) - Chris Was Here for Testing</span><br><br><input id="form1:SearchResultTable:1:hiddenFormTitle" type="hidden" name="form1:SearchResultTable:1:hiddenFormTitle" value="CGLC Form (Occurrence) - Chris Was Here for Testing" /></td>
    To me, this theory makes sense. You seem to be very knowledgable, what do you think?

  13. #28
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: How to override CSS styling in one part of webpage

    Makes sense to me.

    The only thing you want to make sure of is that the ID does not change. Refresh a few times and make sure it remains the same before commiting to anything on the script. But it should do what you are looking for. Nothing else appears to be working. Give it a shot.

  14. #29
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    Code:
    SCRIPT
    <script type="text/javascript"> 
    <!-- 
    window.onload=function(){ 
    document.getElementById('IDGOESHERE').onclick=function(){ 
    this.style.color= '#CC0000'; 
    return false; 
    } 
    } 
    //--> 
    </script>
    Does this look right? Is there anyway to call it instead of it being a listener? This site allows anywhere from 0-5000 search results if i did them individually like this i'd need to put 5000. is there anyway to abstract it?

  15. #30
    wcipolli's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2009
    Posts
    28

    Re: How to override CSS styling in one part of webpage

    Quick update:

    I enetered:
    Code:
    <script type="text/javascript"> 
    <!-- 
    window.onload=function(){ 
    alert("script is running");
    document.getElementById('form1:SearchResultTable:0:text11').onclick=function(){ 
    this.style.color= '#CC0000'; 
    return false; 
    } 
    } 
    //--> 
    </script>
    with the other scripts inbetween <head> and <head/>

    i just used the first id to see if the script worked and i threw the alert in there to make sure it hit.

    I load the page enter my search, go to the result page, while loading the alert pops up

    i hit okay and clicked the link and nothing happend.

    I republished, reloaded etc 3 times and still had the same link id, its associated to the row its in so the same search brings the same results.



Page 2 of 2 First 1 2

Tags for this Thread