Results 1 to 7 of 7

Thread: Newbie needs HELP....

  1. #1
    Join Date
    Nov 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Newbie needs HELP....

    I have a simple table based HTML webpage. 3 rows, 4 columns.

    Top column is a image/logo
    Second row is a nav bar with image buttons (jpg) and a java based rollover script

    third row is where i need help. I want to be able to click on one of my nav buttons and instead of an entire page loading, i just want whats in the third table row to change. Text, images, what ever.

    I want it to act just like this.....
    http://www.dynamicdrive.com/dynamici...tabcontent.htm
    but instead of a tab, have a image button with mouse over and when you actually click on the button, it behaves just like the above link, but in a different table row.


    Am I in the right place?

  2. #2
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hi Using the script you quoted, I modified a line ot show you a button replacing the text etc. rgds,Simonf

    <li><a href="http://www.dynamicdrive.com" class="current" onClick="return expandcontent('sc1', this)"><img border="0" id="img1" src="button7.jpg" height="20" width="100" alt="Dynamic Drive" fp-style="fp-btn: Embossed Capsule 1" fp-title="Dynamic Drive" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button8.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button7.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button9.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button8.jpg')"></a></td></li>
    <li><a href="new.htm" onClick="return expandcontent('sc2', this)" theme="#EAEAFF">What's New</a></li>
    <li><a href="hot.htm" onClick="return expandcontent('sc3', this)" theme="#FFE6E6">What's Hot</a></li>
    <li><a href="search.htm" onClick="return expandcontent('sc4', this)" theme="#DFFFDF">Search</a></li>

  3. #3
    Join Date
    Nov 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i found this about 15 mins ago....

    http://dynamicdrive.com/dynamicindex...tchcontent.htm


    I have made it work almost how i want it, but I have 1 weird thing i dont understand, 1 REALLY weird thing happen, and 1 I just need knowledge about.

    I replaced <A HREF="home.html" onMouseover = ect ect with ...

    <h3 onClick="expandcontent('sc1')" style="cursor:hand; cursorointer" onMouseover = "filter('im

    Put my Div where i wanted it, all good.... HOWEVER......

    Problem (semi weird thing) #1. If i close the </h3> at the end, it makes the buttons misalign and i cant move then at all. But it works perfectly even with 5 open tags!

    Problem (REALLY weird thing) #2 ...but i think its realted to 1.... page loads, the first time I click on a "nav" button....and it does its rollover perfectly, pulls up Div correctly... but it SHIFTS my logo.jpg at the top! Just does it 1 time, and then its locked... but it still looks fine.

    Problem #2.... I want the page to load with 1 of the Div already being open, like a "home" and heres its content. Right now, I load page, nothing is showing until i push a button. I saw in the script it had this....

    function do_onload(){
    uniqueidn=window.location.pathname+"firsttimeload"
    getElementbyClass("switchcontent")
    if (enablepersist=="on" && typeof ccollect!="undefined"){
    document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0"
    firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
    if (!firsttimeload)
    revivecontent()
    }

    but have no clue what to do

  4. #4
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Hi

    Try this.. rgds,Simonf

    <body onload="FP_preloadImgs(/*url*/'button1A.jpg', /*url*/'button1B.jpg')">
    <h3 onClick="expandcontent('sc1')" style="cursor:hand; cursorointer">
    <img border="0" id="img1" src="button19.jpg" height="30" width="150" alt="What is Java Script" fp-style="fp-btn: Embossed Capsule 1" fp-title="What is Java Script" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button1A.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button19.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button1B.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button1A.jpg')"></h3>
    <div id="sc1" class="switchcontent">
    JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
    </div>

  5. #5
    Join Date
    Nov 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Multiple Javascripts on same page and in same tables

    Hi,

    I am not technical but enjoying the learning experience. why is it that when I get one script to work (such as menus etc) and then install another that they effect each other or one stops working?

  6. #6
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    With menus, it doesn't usually work by default. Ever.

    There's a link in my signature *points* which can help you though.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  7. #7
    Join Date
    Nov 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    www.reynardmodifications.com

    thats the site I am working on for a friend.

    The tables wont span column right either. I know the code is sloppy right now. The <h3> tags arent closed, and when I do, it throws the nav bottums off and I cant move them.

    any ideas?

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
  •