| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | JS - What is wrong here?Code: function menu(what, id){
name = getElementById(id);
if(what == "" || !isset(what)){
alert("Something Wrong");
}
elseif(what == "over"){
name.className = 'menu_over';
name.style.cursor='pointer';
name.style.cursor='hand';
alert("heya babe!");
}
elseif(what == "out"){
name.className = 'menu';
name.style.cursor='default';
}
else{
alert("Something Wrong");
}
}
function click(link){
location.href = link;
} ![]() ????: NamePros.com http://www.namepros.com/programming/118154-javascript-what-is-wrong-here.html What is wrong? Thanks Tom |
| |
| | THREAD STARTER #3 (permalink) |
| Soon to be RICHdoggie! Join Date: Jan 2005 Location: UK
Posts: 2,408
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | can't remember, I have changed it now. Thanks though. For anyone who wants to know - this is the code to do fancy css rollovers: Code: <script>
function change(newClass, id) {
identity=document.getElementById(id);
identity.className='menu_'+newClass;
}
</script>
<style>
.first{
background: #ffffff;
}
.second{
background: #000000;
}
</style>
<div id="1" class="first" onMouseOver="change(second, 1)">Mouse Over Me</div> |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| So what's wrong with hyphens | cera | Domain Newbies | 52 | 11-04-2004 10:29 PM |
| Meta-tags wrong? | FastIcon.com | Marketing Techniques | 5 | 10-27-2004 12:43 PM |
| is it this WRONG? | redhippo | Marketing Techniques | 13 | 09-01-2004 07:47 PM |