Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

a link to do 2 things

  • 10-04-2002 3:40pm
    #1
    Registered Users, Registered Users 2 Posts: 1,684 ✭✭✭


    ok i have a menu system for a web page (not up yet) and have 5 areas with different bgcolors
    1 menu system.
    thing is i want menu system to be same bgcolor as main frame (yeah there in 2 frames left and main)

    i can get it to change to a different menu with different bgcolor tis a long way of doing it but it works but i want it to change to the pages of that colour as well. in one click of a mouse. or two on same button


    ideas would be great well pissed off with it atm.


Comments

  • Registered Users, Registered Users 2 Posts: 476 ✭✭Pablo


    do you want to post the code you have already ?

    onMouseOver and onClick would be the 2 functions i'd use in javasscript


  • Registered Users, Registered Users 2 Posts: 706 ✭✭✭DJB


    Look at the navigation on my site...

    http://www.bmor.com

    Is this what you are looking for?


  • Registered Users, Registered Users 2 Posts: 1,514 ✭✭✭Dermo


    you could have the link going to the page in the main frame and then a onclick javascript function change the bgcolor in the menu frame.


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    <a href="mainpage.htm" target="main" onClick="document.bgColor='COLOUR'">LINK</a>
    
    Simple as that really. Doing it from the main frame is a little different:
    <a href="mainpage.htm" onClick="top.frames.left.document.bgColor='COLOUR'">LINK</a>
    
    adam


  • Registered Users, Registered Users 2 Posts: 4,225 ✭✭✭Scruff


    I'm also trying to do 2 things from one link but its a bit different.

    There are 2 frames on the page. one is a menu frame and the other is the main frame. when you click on some links in the menu frame i need both the menu frame and the main frame to change.

    Its there any way of setting 2 targets or get both the menu frame and the main frame to update at the same time?

    Actually, i'm just after looking at your site DJB and thats the kind of thing i need. I'd like to have the whole menu change as there a number of levels to the site.

    I've only been using frames for a few hours so help would be appreciated!!! ;) Cheers.


  • Advertisement
  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Much like the above Scruff. To change the current frame with the link, and the other frame with JavaScript:
    <a href="THIS_FRAME_URL" onClick="top.frames.OTHER_FRAME_NAME.location='OTHER_FRAME_URL'">LINK_TEXT</a>
    
    Or, to change the other frame with the link, and the current frame with JavaScript:
    <a href="OTHER_FRAME_URL" target="OTHER_FRAME_NAME" onClick="location='THIS_FRAME_URL'">LINK_TEXT</a>
    
    hth,
    adam


  • Registered Users, Registered Users 2 Posts: 4,225 ✭✭✭Scruff


    Cheers Adam.
    Ii figured out a different way to do it myself using the onclick java script .

    <a href="OTHER_FRAME_URL" target="OTHER_FRAME_NAME" onClick="window.navigate("THIS_FRAME_URL"") </a>

    i'll try your code as well becasue i noticed that when you click the "back" button on the browser it will also go back through both the frames in the order they were updated.

    Its not a biggie but is this always the case with frames?


  • Closed Accounts Posts: 108 ✭✭immort4l


    Woah I didn't think I'd learn anything in this thread.I had that problem when I made my first site back in the day :) Thank you!


Advertisement