Chris C
|
| Posted: 03/28/2002, 1:03 AM |
|
I am trying to figure out how to replace buttons with images using the example given in tips and articles, but I am having a problem.
I am able to get the example to work with update and delete but NOT cancel. I also get javascript error when I try to put them together in form footer and the buttons don't go anywhere.
Here is what I have:
Form Open Event
SetVar "MembersUpdate" , "<a href=""javascript:update()""> <img src=images/icon_sign.gif> </a>"
SetVar "MembersDelete" , "<a href=""javascript:delete()""> <img src=images/icon_reg.gif> </a>"
SetVar "MembersCancel" , "<a href=""javascript:delete()""> <img src=images/icon_shop.gif> </a>"
and
Form Footer
<SCRIPT Language="JavaScript">
function update() {
document.Members.FormAction.value = 'update';
document.Members.submit();
}
function delete() {
document.Members.FormAction.value = 'delete';
document.Members.submit();
}
function cancel() {
document.Members.FormAction.value = 'cancel';
document.Members.submit();
}
</SCRIPT>
I have also tried using the example to change the insert button on the registration page but I can't seem to get insert or cancel to work at all.
Please help with this it is driving me nuts.
Chris C
|
|
|
 |
Nicole
|
| Posted: 03/28/2002, 1:33 AM |
|
Chris,
try to use following code to replace Cancel button:
SetVar "FormNameCancel" , " <input type=""hidden"" value=""cancel"" name=""FormAction""> <a href=""javascript:make_cancel()""> <img src=images/icon_admin.gif> </a>"
And do not forget about JavaScript code
|
|
|
 |
Chris C
|
| Posted: 03/28/2002, 9:56 PM |
|
Nicole,
I have tried the following but I cant get it to work. Please help.
I have in form open event
SetVar "MembersCancel" , " <input type=""hidden"" value=""cancel"" name=""FormAction""> <a href=""javascript:make_cancel()""> <img src=images/icon_admin.gif> </a>"
Footer
<SCRIPT Language="JavaScript">
function make_cancel() {
document.Members.FormAction.value = 'cancel';
document.Members.submit();
}
</SCRIPT>
Thanks
|
|
|
 |
Elena
|
| Posted: 03/29/2002, 1:22 AM |
|
Chris,
I faced with similar problem and was able to handle with it. I've created small example for you with 'Cancel' button substituted with image. Download it from http://www.gotocode.com/UserImages/Elena/CancelImage.ccs
|
|
|
 |
Chris C
|
| Posted: 03/29/2002, 3:39 AM |
|
Thanks cancel is working but still can't get insert to work.
Any more help would be appreciated
|
|
|
 |
|