Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 11th, 2003, 06:11 PM
myraleen myraleen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ottawa, Ontario, Canada
Posts: 123 myraleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to myraleen Send a message via AIM to myraleen
buttons and mouseevents

I have created buttons, and used a css style sheet to list the color, size, ect.

Problem is the buttons don't do anything, including link to the page I want them to, or change to the hover style when I mouse over.

I have used the forum and found the code that is suposed to work, but umm... I don't think I have the actual function???

here's the code:

button:
php Code:
Original - php Code
  1.  
  2. <input type="button" Value="Accomodations" onMouseOver="formButton(this,'buttonover')" onMouseOut="formButton(this,'button')" class="button">


style:
php Code:
Original - php Code
  1.  
  2. .button {
  3.     font-family: serif, Verdana, Arial, Helvetica, sans-serif;
  4.     font-size: 12px;
  5.     color: #99CC99;
  6.     font-weight: bold;
  7.     background-color: #003300;
  8.     border: #99CC99;
  9.     border-style: solid;
  10.     border-top-width: 2px;
  11.     border-right-width: 2px;
  12.     border-bottom-width: 2px;
  13.     border-left-width: 2px
  14.     width: 100px
  15.  
  16. }
  17.  
  18. .buttonhover {
  19.     font-family: serif, Verdana, Arial, Helvetica, sans-serif;
  20.     font-size: 12px;
  21.     color: #003300;
  22.     font-weight: bold;
  23.     background-color: #99CC99;
  24.     border: #003300;
  25.     border-style: solid;
  26.     border-top-width: 2px;
  27.     border-right-width: 2px;
  28.     border-bottom-width: 2px;
  29.     border-left-width: 2px
  30.  
  31. }


Am I suposed to put a further onClick to send the user to a page when the button is clicked? If so how? And why won't the hover work???

Any help appreaciated.
thanks in advanced.

Reply With Quote
  #2  
Old September 11th, 2003, 06:15 PM
myraleen myraleen is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ottawa, Ontario, Canada
Posts: 123 myraleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to myraleen Send a message via AIM to myraleen
RE: buttons and mouseevents

I got the onClick part
window.location.href='testpage.htm
Now i just need to know why the hover isn't working!

Reply With Quote
  #3  
Old September 27th, 2003, 03:50 PM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: buttons and mouseevents

:laugh:

Reply With Quote
  #4  
Old September 28th, 2003, 03:00 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: buttons and mouseevents

you need to make that js function formButton() that will change the CSS class on mouseOver and mouseOut.

it should go smth like

Code:
function formButton(button, class) {
    button.className=class;
}

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > buttons and mouseevents


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT