Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax for pics 1

Status
Not open for further replies.

gc1234

Programmer
Mar 4, 2004
94
0
0
GB
Hi

Can anyone tell me the syntax for adding an image to a input type?

INPUT TYPE=BUTTON VALUE=

instead of text, pictures
 
try this...
Code:
<INPUT TYPE="IMAGE" SRC="images/myImage.jpg" WIDTH="20" HEIGHT="10" BORDER="0" VALUE="SUBMIT"></INPUT>

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Cheers

what about the text on hover over?
 
Any idea whats wrong with this... its wrapped in asp

<INPUT TYPE=IMAGE SRC='images/next.gif' alt='Next' ONCLICK="document.location.href='pt_listcategoriesandproducts.asp?idCategory=100&curPage=2';">


this is missing last bit of url

&curPage=2'
 
Can you post the exact ASP code aswell please.

Out of interest, why are you using <INPUT TYPE="IMAGE"> for this. Can't you just use the standard <A HREF=""></A> method??

Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
if curPage > 1 then
response.write("<INPUT TYPE=BUTTON Value='Previous' ONCLICK=""document.location.href='pt_searchitem.asp?strSearch=" &pstrSearch& "&curPage="& curPage - 1 & "';"">&nbsp;&nbsp;&nbsp;")
end if

if CInt(curPage) <> CInt(totalPages) then
response.write("<INPUT TYPE=BUTTON Value='Next' ONCLICK=""document.location.href='pt_searchitem.asp?strSearch=" &pstrSearch& "&curPage="& curPage + 1 & "';"">")
end if
 
Now i change it to

code
if curPage > 1 then
response.write("<INPUT TYPE=IMAGE SRC='IMAGES/PREVIOUS.GIF' ALT='Previous' ONCLICK=""document.location.href='pt_searchitem.asp?strSearch=" &pstrSearch& "&curPage="& curPage - 1 & "';"">&nbsp;&nbsp;&nbsp;")
end if

if CInt(curPage) <> CInt(totalPages) then
response.write("<INPUT TYPE=IMAGE SRC='IMAGES/NEXT.GIF' ALT='Next' ONCLICK=""document.location.href='pt_searchitem.asp?strSearch=" &pstrSearch& "&curPage="& curPage + 1 & "';"">")
end if

..... url did not ammend &curPage=2 .. on it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top