Forums: Adding an additional button to the Edit page - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Adding an additional button to the Edit page

#1 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 16044
  • Joined: 03-February 03

Posted 29 June 2007 - 04:10 AM

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

Quote

<INPUT class=button id=submit2 type=submit value="Save and back to list" name=submit2>


2. Implement AfterEdit event:

Quote

if GetRequestForm("submit2")="Save and back to list" then
response.redirect "cars_list.asp"
response.end
end if


This is it.
Best regards,
Sergey Kornilov
0

#2 User is offline   mengo 

  • Member
  • PipPip
  • Group: Members
  • Posts: 17
  • Joined: 26-November 08

Posted 02 February 2009 - 12:37 PM

View Postadmin, on Jun 29 2007, 08:10 AM, said:

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

Quote

<INPUT class=button id=submit2 type=submit value="Save and back to list" name=submit2>


2. Implement AfterEdit event:

Quote

if GetRequestForm("submit2")="Save and back to list" then
response.redirect "cars_list.asp"
end if


This is it.



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


Regards,
0

#3 User is offline   dmulberry 

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 22-November 08

Posted 22 November 2010 - 08:25 PM

View Postadmin, on 28 June 2007 - 11:10 PM, said:

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

Quote

<INPUT class=button id=submit2 type=submit value="Save and back to list" name=submit2>


2. Implement AfterEdit event:

Quote

if GetRequestForm("submit2")="Save and back to list" then
response.redirect "cars_list.asp"
end if


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.
0

#4 User is offline   Jane 

  • Advanced Member
  • PipPipPip
  • Group: Admin
  • Posts: 7495
  • Joined: 13-June 06

Posted 25 November 2010 - 08:33 AM

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 Events tab 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

best regards,
Jane Endaltseva
e-mail: support@xlinesoft.com
0

#5 User is offline   BigBill 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 27-July 12

Posted 14 August 2012 - 02:17 PM

View PostJane, on 25 November 2010 - 08:33 AM, said:

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 Events tab 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?
0

#6 User is offline   BigBill 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 27-July 12

Posted 14 August 2012 - 03:06 PM

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

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic