This topic is locked
[SOLVED]

 Open a new window when a dropdown option is selected

7/6/2010 1:42:38 AM
PHPRunner General questions
I
indigo author

Hi,
I have 2 tables:
[Table1]

Project

ProjID

ProjectName

Date

....

....
[Table2]

Feedback

Project_ID

Project_Name

Date

....

....
ProjID ---> Project_ID

[Master] [Detail] Relationship

  1. When a user ADDS/EDITS a record to 'Feedback' Table, and selects "Project_ID" from a dropdown list (Its a lookup from Master Table), I wanted the information from "Project" Table to be displayed in a popup window.
    I have tried various combinations including a snippet from the Help but it did not work.

    Is there a way?

romaldus 7/6/2010



Hi,
I have 2 tables:
[Table1]

Project

ProjID

ProjectName

Date

....

....
[Table2]

Feedback

Project_ID

Project_Name

Date

....

....
ProjID ---> Project_ID

[Master] [Detail] Relationship

  1. When a user ADDS/EDITS a record to 'Feedback' Table, and selects "Project_ID" from a dropdown list (Its a lookup from Master Table), I wanted the information from "Project" Table to be displayed in a popup window.
    I have tried various combinations including a snippet from the Help but it did not work.

    Is there a way?


Do you mean this?
on the lookup wizard, choose : LIST PAGE WITH SEARCH


Example output :

I
indigo author 7/6/2010

Not really. I already have a lookup value dropdown from master table.

That lookup is a dependent lookup on another field.
Let me recreate the steps to understand it better:

  1. A user goes and adds a record in "Feedback" table
  2. He enters data in various fields.
  3. He 'selects' "1234" from a dropdown field "Project_ID"
  4. Once he selects this, another window should open with "http://www.abc.com/soft/...view.php?edit1=1234";
    Can this be done using a script?

J
Jane 7/6/2010

Hi,
use Add page: JavaScript onload event on the Eventstab to open new window. Here is a sample:

var ctrl = Runner.getControl(pageid, 'Project_ID');

ctrl.on('change', function(e){

if (this.getValue() != ''){

window.open('...view.php?edit1='+this.getValue());

}

});



More info here:

http://xlinesoft.com/phprunner/docs/javascript_api.htm

I
indigo author 7/6/2010

Works... Beautiful!
Thank you so much.