|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Changing a image with a value
Hi
I'm trying to create some code for an HTML web page which will work as follows:- Current Value's on web page: {stock} - this can be 100-0 {addtoorder} - this is the buy button I'm trying to say the following: If {stock} = 0 change the {addtoorder} (Buy Button) to a gif called nostock.gif else let it be the {addtoorder} (Buy Button) I've tried various things but I just cant get it to work, any help would be much appriciated. |
|
#2
|
||||
|
||||
|
Where are 'stock' and 'addtoorder' stored. Where are they coming from?
|
|
#3
|
|||
|
|||
|
The values come from a shopping cart called Evolve which runs ASP and Java.
If you place the values with the {} marks it displays the number of stock items or displays a Buy button depending which value you use. What I'm trying to do is when the stock = 0 change the default Buy button to a gif which displays Out of Stock. |
|
#4
|
||||
|
||||
|
You would need a server language to do this. You would write a script which would check the stock level before loading the page. If the value = 0, then you'd insert an IMG tag, else, print the amount.
I would've thought that the package you're using would have some kind of facility for this? |
|
#5
|
|||
|
|||
|
Nope not at a product level, only when you buy the item and go to pay for it, it then reports the item is out of stock.
I want it so when you look at a product it has Buy or Out of Stock. I've been given a price of £600 to add the above. |
|
#6
|
||||
|
||||
|
600 pounds sounds ridiculous.
What language is the package wrriten in? - myself, or someone else on this board might be able to take a look @ it for you. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Changing a image with a value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|