Your max bid hasn't surpassed what someone else was willing to pay. I don't believe it's an issue of scripts.
Suppose you see an item with no bids. You could bid 1000 gold, but the highest bid would be set at 1 gold since you aren't battling with anyone else.
If someone else wanted to bid 500 gold, since you already bid 1000 gold you would still retain highest bid at 501 gold. It does this automatically. If someone else were to bid 2000 gold they become high bidder and the highest bid would show up as 1001 gold, beating your previously high bid.
I'm probably making this sound complicated, but basically you will never be forced to pay more than you have to to win an item. If you win something and pay 5001 gold, you beat someone else who bid 5000 gold.
Also I don't think you can cancel a bid, which is too bad.