This topic is locked

Add button on view page to open new page

9/25/2009 1:31:41 AM
PHPRunner General questions
R
ragrim author

im trying to add a button to a view user user info page and id like it to open my newsubscriptions add form and pass the users id to that page to create a new subscriptions for them. i cant seem to find any easy to way to this.

woodey2002 9/25/2009

http://www.xlinesoft.com/phprunner/docs/email_selected_records.htm
Have a look here shows how to create a button in visual editor.
Hope this helps.
JAMES
PHPRUNNERS NO1 IRISH FAN.

D
danaci 9/25/2009

<input type=button value=button1 onclick="window.location.href='yourlink';">

J
Jane 9/25/2009

Hi,
use custom event to add new button.

Here is a sample:

<input type=button value=button1 onclick="window.location.href='tablename.php?parameter={$FieldName_value}';">
T
taumic 10/15/2009

Hallo,
I have questions about parameters (db-fields).

On the listpage i have create a button with following code:



// Put your code here.

$str = "<FORM><INPUT TYPE=\"button\" VALUE=\"Vorschau\" onclick=\"window.location.href='http://localhost/!MT_RgPDF/rechnung.php?rg={$RGK_NR}'\"></FORM>";;

echo $str;


where RGK_NR is the field-name from my database.

I want to give this field as a parameter to the script "RECHNUNG.PHP", but I get an error ==> "undefined variable:RGK_NR".

Now the Questions:

  1. what is the right declaration for the parameter (RGK_NR) in the code above ?
  2. how can i get the content of the field "RGK_NR" in a variable to use it in the script RECHNUNG.PHP ?
    Many thanks in advance !!
    Mike

J
Jane 10/16/2009

Hi,
sorry for my fault.

You can use this code only on the Visual Editor tab directly:

<input type=button value=button1 onclick="window.location.href='tablename.php?parameter={$FieldName_value}';">


Also don't add another form on the page. Form inside another form won't work.

T
taumic 10/16/2009

Hallo Jane,
I do this by the Visual Editor on my ListPage with the option "Insert PHP code snippet" (OnScreen event).

Is it the wrong place?

What do you mean with "Visual Editor directly"?

Please, can you give me an example?
Thank you!
Mike

J
Jane 10/16/2009

Hi,
to add this code switch to HTML mode on the Visual Editor tab.

Also please make sure this code is inside table with values on the list page: create new column for this button for example.