This topic is locked

Button on edit page

8/1/2010 6:36:16 AM
PHPRunner General questions
S
swanside author

I need some help with code.

I have a dropdown with this code

$id = @$_REQUEST["editid1"];

$str = "<select onchange=\"javascript: window.open(this.options[this.selectedIndex].value);\">";

$str.="<option value=\"job_edit.php?editid1=".$id."\">Please select</option>";

$str.="<option value=\"Invoice_view.php?editid1=".$_REQUEST["editid1"]."\">Invoice</option>";

$str.="</select>";

echo $str;


I want to use a button instead to do the same job as the dropdown.

Can I?
Cheers

Paul

A
ann 8/2/2010

Paul,
you need to create two buttons since there are two options in the dropdown.

To create button proceed to the Visual Editor tab and switch to the HTMLmode.

Here is a sample code:

<input type=button value=button1 onclick="window.location.href='Invoice_view.php?editid1=".$_REQUEST["editid1"]';">