Jump to content


Photo

Dynamic Buttons


  • Please log in to reply
4 replies to this topic

#1 jPaulB

jPaulB

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 24 March 2013 - 11:25 PM

Hi everybody,

I am trying to figure out my first PHP script, but have no idea how to logic it out. I hope someone will help me find the right logic pattern to do this the right way.

It ought to be pretty simple....

I can make unique buttons for navigation [ buttonUP and buttonDOWN, even buttonHOVER? ]

BUT! I will need to find a script that will perform as a navigation tool, and allow me to put these buttons where I want them to be.

Of course, I also need to know what such a script is doing, so that I learn something valuable

Anyone interested in helping me learn how to make such a navigation thing?

Many thanks,

 

-Paul-



#2 DaveyK

DaveyK

    Advanced Member

  • Members
  • PipPipPip
  • 288 posts
  • LocationThe Netherlands

Posted 25 March 2013 - 04:34 AM

You dont need a script to handle :hover and :active events, you can just style it in css.



#3 jPaulB

jPaulB

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 25 March 2013 - 01:18 PM

Thanks DaveyK,

 

I see that in the CSS documentation, but I was trying to learn how to apply pretty much the same thing to using images rather than text links.

 

I'll try a pseudo code explanation

 

If Mouse is over a navigation button then

    Show MouseOverButtonImage.jpg

    If MouseClick then

        Show MouseClickButtonImage.jpg

       <a href="">Page12.html</a>

    Endif

ElseIf Show MouseNormalButtonImage.jpg

END

 

Sort of like that (If I've made any sense)

 

I want to use images to manage a clients navigation and I want to learn my first PHP script.

 

Thanks anyhow,

-Paul-



#4 DaveyK

DaveyK

    Advanced Member

  • Members
  • PipPipPip
  • 288 posts
  • LocationThe Netherlands

Posted 26 March 2013 - 03:31 AM

Are you sure images are required? You can do a bunch with CSS (seriously, a lot). Images will slow down and keep in mind: the user will see them load which is kinda ugly, right.

 

Also, with CSS you can change the backgound-image on :hover. Needless to say, you can also use images and still keep to pure CSS



#5 jPaulB

jPaulB

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 27 March 2013 - 11:53 PM

Hi Again, DaveyK

 

Thank you for answering.

 

In truth, I don't know if I need images or not. This would be the first script I ever write in PHP. I chose the button approach only because I had done similar things using JavaScript and it was a simple enough task that I can understand what "is happening" and fool around with it enough to learn a bit more about PHP. This whole notion was more of an easy way to get started on something that would produce a result quickly so I could feel better about it.

 

I have to admit, I've seen some CSS navigations that are easily superior, and will probably choose to utilize CSS.

 

Thanks again,

-Paul-






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com