0

On my site, I have navigation buttons that navigate through results of a search. Basically, what I want to do is to disable certain buttons at certain times (i.e you can't click the next button if you are on the last result). I'm looking for a way to do this. The buttons right now are image buttons and I figure the easiest way would be to switch <input> for <img>. So basically it would look like this.

<input type="image" src="pics/first.png" alt="First Document" name="first" value="First" />
<input type="image" src="pics/previous.png" alt="Previous Document" name="previous" value="Previous" />
<input type="image" src="pics/next.png" alt ="Next Document" name="next" value="Next" />
<input type="image" src="pics/last.png" alt="Last Document" name="last" value="Last" />

would become

<img type="image" src="pics/first.png" alt="First Document" name="first" value="First" />
<img type="image" src="pics/previous.png" alt="Previous Document" name="previous" value="Previous" />
<img type="image" src="pics/next.png"alt ="Next Document" name="next" value="Next" />
<img type="image" src="pics/last.png" alt="Last Document" name="last" value="Last" />

I thought about using str_replace, but I don't necessarily want to change them all, only some of them and different ones at different times. Is there any way I could do this? Or is there another way I could disable them?

Edited by DEAD TERMINATOR

2
Contributors
3
Replies
5
Views
4 Years
Discussion Span
Last Post by diafol
0

Yes sorry. I had been searching on google for a while with no luck. So I posted the question here, but continued searching. I found a solution before a reply came in.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.