Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 04-30-2006, 04:45 PM DOM help
rab
Average Talker

Posts: 21
Trades: 0
I'm having problems with this bit of code.

index.html
Code:
<a href="index.php?id=home" onmouseover="writeinfo('home')">Home   </a>|


<div id="information">
                                modules <br />
                                modules <br />
                                modules <br />
                                modules <br />
                                modules <br />
</div>
js file
Code:
function writeinfo(type)
{
    var info;
    if(type=='home')
    {
       info = "<div align='center'><b>Home Page</b></div><br />
             News is displayed<br />";
    }else if(type=='flash')
    {
         info = "<div align='center'><b>Flash</b></div><br />
             All of my flash creations, good or bad<br />
            I've just started to learn flash.<br />
            If you want to use something, tell me<br />
            Questions and comments are welcome<br />";
    }else if(type=='web')
    {
         ....
    }

document.getElementById('information').innerHTML=info;

return;
}
Any help?
rab is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-30-2006, 04:49 PM Re: DOM help
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
and the problem is ????
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-30-2006, 04:56 PM Re: DOM help
rab
Average Talker

Posts: 21
Trades: 0
it wont work
rab is offline
Reply With Quote
View Public Profile
 
Old 04-30-2006, 05:12 PM Re: DOM help
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
what debugging errors are there ?
have you used FF and the javascript console?

more to the point why oh why are you writing content onto the page with javascript?????!!!
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to DOM help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26879 seconds with 12 queries