This topic is locked

Link to Button

2/3/2009 12:38:03 AM
ASPRunnerPro General questions
M
mengo author

Let's say you want to add a Save and back to list button on the Edit page which should take you back to the list page after record is saved.

Here is how this can be done:

  1. In Visual Editor create a copy of the Save button

    Switch to HTML mode and modify new button label and ID
  2. Implement AfterEdit event:
    This is it.


Hi,

How can I transform edit link in List page into edit button ?
Regards,

J
Jane 2/4/2009

Hi,
I'm not sure that I understand your question.

Do you want to point "Back to list" button on the edit page to the edit page again?

M
mengo author 2/4/2009

Hi,

I'm not sure that I understand your question.

Do you want to point "Back to list" button on the edit page to the edit page again?


Hi,

Thanks for reply
In list page there is Edit link({$editlink_attrs}>Edit</A> {END edit_link}) to edit each individual record. Now I want to replace hyperlink with button.
How can I do it?

J
Jane 2/5/2009

Hi,
here is a sample:

  1. find this code:
    {BEGIN edit_link}<A class=tablelinks {$editlink_attrs}>Edit</A>{END edit_link}



and replace it with this one:

{BEGIN edit_link}<input type=button class=button value=Edit {$editlink_attrs}>{END edit_link}


2. then add List page: After record processed event on the Events tab.

Here is a sample:

editlink= "editid1=" & my_htmlspecialchars(SafeURLEncode(rs("RecordID")))

record("editlink_attrs")="onclick=""window.location.href='TableName_edit.asp?" & editlink & "';"" "



where RecordID is your actual field name, TableName is your actual table name.

M
mengo author 2/5/2009

Hi,

here is a sample:

  1. find this code:
    and replace it with this one:
  2. then add List page: After record processed event on the Events tab.

    Here is a sample:
    where RecordID is your actual field name, TableName is your actual table name.


Jane,

Thanks. It worked