This topic is locked

Adding an additional button to the Edit page

6/29/2007 12:10:46 AM
ASPRunnerPro Tips and tricks
admin

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
    <INPUT class=button id=submit2 type=submit value="Save and back to list" name=submit2>


2. Implement AfterEdit event:

if GetRequestForm("submit2")="Save and back to list" then

response.redirect "cars_list.asp"

response.end

end if


This is it.

M
mengo 2/2/2009

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,

D
dmulberry 11/22/2010



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.


Is this technique still supposed to work on ASPRunner 6.3 (Build 6735)? I am trying with code that works on earlier versions fof Aspruning and it is not working.

J
Jane 11/25/2010

Here is a sample code for ASPRunnerPro 6.3:

  1. custom button:

<SPAN class=buttonborder><INPUT id=submit2 class=button value="New value" type=button name=submit2></SPAN>



2. Javascript onload event on the Eventstab to process this button:

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

formObj.baseParams['New value'] = 1;

});
$("#submit2").bind("click", {page: this}, function(e){

var page = e.data.page;

page.saveHn(e);

});



3. After record added/After record updated event:

if GetRequestForm("New value")="1" then

response.redirect "cars_list.asp"

end if
W
willship 8/14/2012



Here is a sample code for ASPRunnerPro 6.3:

  1. custom button:

<SPAN class=buttonborder><INPUT id=submit2 class=button value="New value" type=button name=submit2></SPAN>



2. Javascript onload event on the Eventstab to process this button:

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

formObj.baseParams['New value'] = 1;

});
$("#submit2").bind("click", {page: this}, function(e){

var page = e.data.page;

page.saveHn(e);

});



3. After record added/After record updated event:

if GetRequestForm("New value")="1" then

response.redirect "cars_list.asp"

end if



I have tried this in ASPrunner 7.1 and it doesn't work. Any clues?

W
willship 8/14/2012

UPDATE: I have now discovered that it works in Firefox but not in IE 9.