Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-24-2012, 06:30 AM   PM User | #1
paradive
New to the CF scene

 
Join Date: Jun 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
paradive is an unknown quantity at this point
Question simple menu

all i have so far is: http://paradive.comli.com/

the menu (paradive) is one div.
the center (where it says "more" right now) is another.

the simple thing i'm trying is....

for each of the letters in the menu ("paradive") a more accurate description of the target link is gonna display at the center div ("more") when the relevant letter is moused over.

now, it's been a good decade since i coded anything (long story).
but my instincts tell me the key is gonna be in a variable i pass to the center div that also will change it from "hidden" to "visible" (onmouseout will just send a signal to clear it).

i'm not expecting anyone to do it FOR me, but maybe someone knows of a relevant tutorial they can point me to?

please?

Last edited by paradive; 06-24-2012 at 06:34 AM..
paradive is offline   Reply With Quote
Old 06-24-2012, 04:41 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,395
Thanks: 18
Thanked 351 Times in 350 Posts
sunfighter is on a distinguished road
You have two divs ID="center" Remove the last one
Code:
<div id="center">
	more
</div> THIS ONE
</body>
<html>
Anchors
Code:
<a href=".html" onmouseover="disc('p');" onmouseout="document.getElementById('center').innerHTML = 'more';">p</a>
javascript
Code:
function disc(letter)
{
	if (letter == 'p') document.getElementById('center').innerHTML = "back it up";
}
sunfighter is offline   Reply With Quote
Old 06-24-2012, 09:47 PM   PM User | #3
paradive
New to the CF scene

 
Join Date: Jun 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
paradive is an unknown quantity at this point
Quote:
Originally Posted by sunfighter View Post
You have two divs ID="center" Remove the last one
Code:
<div id="center">
	more
</div> THIS ONE
</body>
<html>
Anchors
Code:
<a href=".html" onmouseover="disc('p');" onmouseout="document.getElementById('center').innerHTML = 'more';">p</a>
javascript
Code:
function disc(letter)
{
	if (letter == 'p') document.getElementById('center').innerHTML = "back it up";
}
oops.
yeah. i hastily slapped it together, messing around.
so, the ".innerHTML" is what passes the text (even tho it's not HTML)?
i don't remember that.

thanks.

ok.
now, i want that center div to reload on click in the menu (not the whole page).
should i go with an iframe or would it be more elegant to just target that div to refresh.
inserting regular frames seems like it would be so crude.
paradive is offline   Reply With Quote
Old 06-25-2012, 01:32 PM   PM User | #4
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,395
Thanks: 18
Thanked 351 Times in 350 Posts
sunfighter is on a distinguished road
Regular frames are no longer valid and there is no need for iframes here. Design your second page and we'll figure something out. When you have some free time look into AJAX. http://www.w3schools.com/ajax/default.asp

Also try to re-code this without the absolute positioning. This will normally just get you into trouble.

Last edited by sunfighter; 06-25-2012 at 02:59 PM..
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:36 AM.


Advertisement
Log in to turn off these ads.