Click to See Complete Forum and Search --> : My custom designed button doesn't work


floppy
01-27-2004, 10:51 AM
Hello

I have a small form ("go to page number x") and I want to replace the default "input" button by my own little gif button but it doesn't work :

----- My failed attempt

<input name="imageField" type="image" src="../images/GoButton.gif" width="25" height="25" border="0"

onclick="var p = this.form.pageNum.value-1; location.href='<?php echo $HTTP_SERVER_VARS["PHP_SELF"] ?>' +
'?pageNum_rsMaster=' + p + '<?php echo $queryString_rsMaster?>';" />

----- the original working button

<input type="button" name="Submit3" value="go"

onclick="var p = this.form.pageNum.value-1; location.href='<?php echo $HTTP_SERVER_VARS["PHP_SELF"] ?>' +
'?pageNum_rsMaster=' + p + '<?php echo $queryString_rsMaster?>';" />


Could somebody please tell me how to make my gif button work ? :confused:

Thank you

crh3675
01-27-2004, 11:11 AM
What doesn't work about it? do you get an error?

floppy
01-27-2004, 11:25 AM
I don't get any error messages, it's just that nothing happens when I click my gif button - If I type page number 3, it reloads the same first page instead of going to page number 3 (like it does with the normal form)

crh3675
01-27-2004, 11:28 AM
Change your code like this:
<input name="imageField" type="image" src="../images/GoButton.gif" width="25" height="25" border="0"

onclick="var p = this.form.pageNum.value-1; location.href='<?php echo $HTTP_SERVER_VARS["PHP_SELF"] ?>' +
'?pageNum_rsMaster=' + p + '<?php echo $queryString_rsMaster?>';return false" />

floppy
01-27-2004, 01:29 PM
Thank you, it works :) :)