Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Im new and very stuck

  1. #1
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Im new and very stuck

    Im well out of my league at the moment and i was hoping someone could try and help me?!

    An example of what i want to do is here:
    http://www.avfc.premiumtv.co.uk/

    If you look you can see that when you hover over sub articles at the side of the main artilce, the sub article appears where the main article goes.

    Does anybody know how to do this?

    Id much appreciate any help possible.

    Cheers
    Jeff

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    This might help

    Code:
    <html>
    <head>
    <script language="javascript">
    var a = "Article 2"
    var b = "Article 3"
    var c = "Article 4"
    var orig = "Main Article Text"
    function showArticle(which) {
    mainContent.innerHTML = which
    }
    function origArticle() {
    mainContent.innerHTML = orig
    }
    </script>
    </head>
    <body>
    <table width="400" border="1">
    <tr>
    <td width="200" id="mainContent">Main Article Text</td>
    <td width="200" height="200" valign="top">
    <a href="#" onmouseover="showArticle(a)" onmouseout="origArticle()">Article 2</a>
    <br><a href="#" onmouseover="showArticle(b)" onmouseout="origArticle()">Article 3</a>
    <br><a href="#" onmouseover="showArticle(c)" onmouseout="origArticle()">Article 4</a>
    </td>
    </tr>
    </table>
    </body>
    </html>
    - Mike

  3. #3
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Cheers Mike that awesome the only problem is how do i put it into dreamweaver?!

    I put it in the code section of dremaeaver and it didnt work!!

    I then put it in the design page as a script, still didnt work!

    Anybody help??

    Cheers again people

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    How about... USE NOTEPAD. Like the olden days. Then save is as *.htm And if you can't do that, hit Tools > Folder Options> View and uncheck "Hide extensions for known file types". Then you'll be able to save it as whatever you want, *.htm, *.html, *.php whatever. Just ask if there's any more problems.
    - Mike

  5. #5
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Do you mean do my whole website on dreamweaver with the code (which doesnt work in dreamweaver).

    Then copy the whole html for the whole page into notepad save as .php then upload to my site.

    If so i just done that and the code still doesnt work

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Well, If what I said still wasn't the problem I wouldn't know how to help. I still don't think using DreamWeaver is better than Notepad. NOTEPAD IS THE BOMB... Not really, I just had to say that
    But really, I don't know how to help you anymore on this one.
    - Mike

  7. #7
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Forget that last thing I said, do you have a URL of the webpage you're doing this on? I might be able to help.
    - Mike

  8. #8
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No im just testing it on dreamweaver, but ive uploaded a quick test one here:

    http://www.bromleyaces.com/test.php

    AND ive jsut noticed IT DOES WORK BUT only in internet explorer (im using ie 7 beta) and not in firefox, and i hope/want it to work in both internet explorer and firefox

  9. #9
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I just tested this in FireFox. It should work:

    Code:
    <html>
    <head>
    <script language="javascript">
    var orig = "Main Article"
    var a = "Article 2"
    var b = "Article 3"
    var c = "Article 4"
    function showArticle(which) {
    mainContent.innerHTML = which
    }
    function origArticle() {
    mainContent.innerHTML = orig
    }
    </script>
    </head>
    <body onload="origArticle()">
    <table width="400" border="1">
    <tr>
    <td width="200" id="mainContent">
    </td>
    <td width="200" height="200" valign="top">
    <a href="#"  onmouseover="showArticle(a)" onmouseout="origArticle()">Article 2</a>
    <br><a href="#" onmouseover="showArticle(b)" onmouseout="origArticle()">Article 3</a>
    <br><a href="#" onmouseover="showArticle(c)" onmouseout="origArticle()">Article 4</a>
    </td>
    </tr>
    </table>
    </body>
    </html>
    - Mike

  10. #10
    Join Date
    Jul 2006
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    using dreamwever it still doesnt work!

    Did you use notepad or something else?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •