Stylesheet format lost after adding onClick

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Big Moxy

    Stylesheet format lost after adding onClick

    test page - http://projects.missioninternet.com/...ients/test.php.

    When I added the onclick event so that I could employ ajax on this
    page the stylesheet formatting for this <lidisappeare d. If you look
    at the test page you can see what it should look like. The stylesheet
    also defines a:hover behavior (change the font-weight to bold).

    <li onclick="makeRe quest('echo.php ?clientID=<?php echo $clientID; ?
    >')">Reports</li>
    Q1: What happened?
    Q2: How can I resolve this?

    Thank you!
    Tim
  • David Mark

    #2
    Re: Stylesheet format lost after adding onClick

    On Dec 24, 1:53 pm, Big Moxy <bigm...@gmail. comwrote:
    test page -http://projects.missio ninternet.com/proweb/clients/test.php.
    >
    When I added the onclick event so that I could employ ajax on this
    page the stylesheet formatting for this <lidisappeare d. If you look
    at the test page you can see what it should look like. The stylesheet
    also defines a:hover behavior (change the font-weight to bold).
    Why not post a test page that shows the problem?
    >
    <li onclick="makeRe quest('echo.php ?clientID=<?php echo $clientID; ?
    >
    ')">Reports</li>
    Don't post server side code.
    >
    Q1: What happened?
    Who knows?
    Q2: How can I resolve this?
    >
    Post a link to the non-working version and/or the client side markup.

    Comment

    • Big Moxy

      #3
      Re: Stylesheet format lost after adding onClick

      On Dec 24, 11:33 am, David Mark <dmark.cins...@ gmail.comwrote:
      On Dec 24, 1:53 pm, Big Moxy <bigm...@gmail. comwrote:
      >
      test page -http://projects.missio ninternet.com/proweb/clients/test.php.
      >
      When I added the onclick event so that I could employ ajax on this
      page the stylesheet formatting for this <lidisappeare d. If you look
      at the test page you can see what it should look like. The stylesheet
      also defines a:hover behavior (change the font-weight to bold).
      >
      Why not post a test page that shows the problem?
      >
      >
      >
      <li onclick="makeRe quest('echo.php ?clientID=<?php echo $clientID; ?
      >
      >')">Reports</li>
      >
      Don't post server side code.
      >
      >
      >
      Q1: What happened?
      >
      Who knows?
      >
      Q2: How can I resolve this?
      >
      Post a link to the non-working version and/or the client side markup.
      The link I provided doesn't work on IE 7 and FF 2.0.0.11. I always
      assume that it is better to see the problem first hand than look at a
      picture of the problem.

      Nonetheless here is a link that contains the problem as I see it -
      http://projects.missioninternet.com/...s/problem.html.

      I posted an update indicating I added onmouseover to mimic the
      stylesheet definition however I don't know how to restore the default
      format when the mouse moves away.

      Thanks,
      Tim

      Comment

      • David Mark

        #4
        Re: Stylesheet format lost after adding onClick

        On Dec 24, 3:13 pm, Big Moxy <bigm...@gmail. comwrote:
        On Dec 24, 11:33 am, David Mark <dmark.cins...@ gmail.comwrote:
        >
        >
        >
        >
        >
        On Dec 24, 1:53 pm, Big Moxy <bigm...@gmail. comwrote:
        >
        test page -http://projects.missio ninternet.com/proweb/clients/test.php..
        >
        When I added the onclick event so that I could employ ajax on this
        page the stylesheet formatting for this <lidisappeare d. If you look
        at the test page you can see what it should look like. The stylesheet
        also defines a:hover behavior (change the font-weight to bold).
        >
        Why not post a test page that shows the problem?
        >
        <li onclick="makeRe quest('echo.php ?clientID=<?php echo $clientID; ?
        >
        ')">Reports</li>
        >
        Don't post server side code.
        >
        Q1: What happened?
        >
        Who knows?
        >
        Q2: How can I resolve this?
        >
        Post a link to the non-working version and/or the client side markup.
        >
        The link I provided doesn't work on IE 7 and FF 2.0.0.11. I always
        assume that it is better to see the problem first hand than look at a
        picture of the problem.
        I thought when you said it was what it should look like, that meant it
        was a working example (rather than a broken one.) I don't know what
        you mean by a "picture of the problem."
        >
        Nonetheless here is a link that contains the problem as I see it -http://projects.missio ninternet.com/proweb/clients/problem.html.
        >
        Okay. Now I see what you mean by a picture. That doesn't help. I
        tried both of your links. One works and the other is a picture of one
        that doesn't work (I think.) Post a non-working page (i.e. a page
        with the rollover bold effect broken by the insertion of the onclick
        attribute.)
        I posted an update indicating I added onmouseover to mimic the
        stylesheet definition however I don't know how to restore the default
        format when the mouse moves away.
        Set the className property to an empty string onmouseout.

        And BTW, the curved corners are all messed up in IE7 and Firefox (at
        the bottom.) If they look good in your browser(s), you need to adjust
        your font size, window size or something.

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: Stylesheet format lost after adding onClick

          Big Moxy wrote:
          Nonetheless here is a link that contains the problem as I see it -
          http://projects.missioninternet.com/...s/problem.html.
          >
          I posted an update indicating I added onmouseover to mimic the
          stylesheet definition however I don't know how to restore the default
          format when the mouse moves away.
          Your problem is programming overkill. Use a simple a[href]
          element that you format with a `:hover' CSS selector instead.


          PointedEars
          --
          "Use any version of Microsoft Frontpage to create your site. (This won't
          prevent people from viewing your source, but no one will want to steal it.)"
          -- from <http://www.vortex-webdesign.com/help/hidesource.htm>

          Comment

          Working...