Replacing Text With Gifs ?

They have: 14 posts

Joined: Jan 2007

Hi wonder if you could...

I have a product.asp file which as you know displays products.
My problem is at the bottom of the page i have two text links "Next/Back"
Id like to replace them with some small image (gif) buttons i have made.
I'm new to all this so laymans terms would be great.
Here is an example of the code.

next_string="Next ->"
end if
if back_to > 0 then
back_string="<- Back"
end if

%>

<?php
response
.write back_string
?>
 
<?php
response
.write next_string
?>

<?php
    rs
.close()
   
conn.close()
?>

If you could fill in the code where i put my "

Smp Business Hosting's picture

They have: 60 posts

Joined: Aug 2007

Hi Debs,

Here's the new code, everything in bold capitals needs to be changed (the Next and Back alt text doesn't need to be changed it you don't want):

next_string="Next" src="URL TO NEXT BUTTON IMAGE HERE" width="WIDTH" height="HEIGHT" border="0" />"
end if
if back_to > 0 then
back_string="Back" src="URL TO BACK BUTTON IMAGE HERE" width="WIDTH" height="HEIGHT" border="0" />"
end if

%>

<?php
response
.write back_string
?>
 
<?php
response
.write next_string
?>

<?php
rs
.close()
conn.close()
?>

Regards, Steve

They have: 14 posts

Joined: Jan 2007

Oh dear...
I copy pasted the exact txt above and replaced the bold text with the correct path for my images and px size for my images.
Unfortunately after updating and uploading the asp.product file i got this message:

The page cannot be displayed

Technical Information (for support personnel)

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/blah/blahblah/asp/product.asp, line 139, column 153

Sorry to be a pain, i'm 100% sure i edited the script correctly..
Debs x

Smp Business Hosting's picture

They have: 60 posts

Joined: Aug 2007

Hi Debs,

Sorry it was my fault (using double quotes " instead of ') it interfered with the asp code - try this:

next_string="Next"
end if
if back_to > 0 then
back_string="Back"
end if

%>

<?php
response
.write back_string
?>
 
<?php
response
.write next_string
?>

<?php
rs
.close()
conn.close()
?>

Regards, Steve

They have: 14 posts

Joined: Jan 2007

Thank you Steve...
Really appreciate your help, Merry xmas
x x x x

Smp Business Hosting's picture

They have: 60 posts

Joined: Aug 2007

D@K$!;227134 wrote: Thank you Steve...
Really appreciate your help, Merry xmas
x x x x

You're more than welcome!
Merry xmas.

Regards, Steve

They have: 14 posts

Joined: Jan 2007

Steve you're a star, it works perfectly!!
Thank you so much...
Have a good one
x x x x x x x x x x x x

Smp Business Hosting's picture

They have: 60 posts

Joined: Aug 2007

D@K$!;227138 wrote: Steve you're a star, it works perfectly!!
Thank you so much...
Have a good one
x x x x x x x x x x x x

Glad to hear it, you too.

Regards, Steve

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.