Page 1 of 1
Form Button
Posted: Sun Apr 17, 2005 3:05 pm
by anthony88guy
I have my code display for example 20 items in rows. I want each row to have a update button that is linked to something like 'users.php?mode=whatever' How do make a button link to a page, I could always use an image. But just wondering. Do i have to make a whole <form> for each button?
Posted: Sun Apr 17, 2005 3:12 pm
by Cinder
I think you can use some JavaScript
Code: Select all
<script language="e;JavaScript"e; type="e;text/javascript"e;>
function Goto(value)
{
window.laction="e;index.php?page="e;+url;
}
and then add:
Code: Select all
<input type="e;button"e; onClick="e;item025"e;>
Posted: Sun Apr 17, 2005 3:13 pm
by feyd
there are many ways. A form for each is one. A simple image linked is another. There are some variations that can do Javascripted stuff, but the basics remain the same. You set of the form to use that button as a submission in some fashion.
Posted: Mon Apr 18, 2005 5:01 am
by Phoenixheart
I encountered this before, and this is how I dealed: For each row I echoed:
Code: Select all
echo("<a href='deletepage.php?code=" .$row['CODE']. "' target=_blank><img source='delete.gif'></a>");
Then when you click on that "delete" image, it will open a new window that contains the file deletepage.php. This file will accept the code and then do deleting the product with that code.
I think your problem should be solved similiar.

Posted: Mon Apr 18, 2005 6:07 am
by anthony88guy
thxs, But thats how I am doing it, with images.
