This topic is locked

Hyperlinks on the view page instead of the list page?

8/4/2008 3:41:26 AM
PHPRunner General questions
S
swanside author

Hello.
I have a Job table, Labour table and Material table.
The job table is the master to both the Labour and material on Job_No
What I want to do is be able to click on View on the Job_List.php page and this opens the view field.
I then want to be able to have the links for the labour and material tables asscociated with the Job_No so you can open the labour of material from the view page.

Can this be done?
Thanks

Paul.

J
Jane 8/4/2008

Paul,
to create links to the detail pages on the view page of master table use custom events (Insert PHP code snippet option on the Visual Editor tab).

Here is a sample:

if (@$_REQUEST["editid1"])

echo "<a href=\"Labour_list.php?mastertable=Job&masterkey1=".$_REQUEST["editid1"]."\">Labour</a>";

S
swanside author 8/4/2008

Thanks Jane, That works a treat.
Just another question, is it possible to get it to show a popup similar to it does on the job_list page when you roll over it?
Thanks a million
Paul

J
Jane 8/5/2008

Paul,
yes, It's possible. But this task requires a lot of custom coding in the generated files.

You will need to open generated list and view pages, compare it and add code for Ajax popup manually.

Unfortunately we don't have a ready to go solution for this.

S
swanside author 8/5/2008

Paul,

yes, It's possible. But this task requires a lot of custom coding in the generated files.

You will need to open generated list and view pages, compare it and add code for Ajax popup manually.

Unfortunately we don't have a ready to go solution for this.


OK Thanks anyway. I have now been able to put new shortcuts to the material, edit basic and full invoice from the view page.
In this code

if (@$_REQUEST["editid1"])

echo "<a href=\"labour_list.php?mastertable=job&masterkey1=".$_REQUEST["editid1"]."\">Labour</a>";



Where could I put > target_blank

to open it up in a new window?
Thanks

again

Paul.

N
nicolagrimshaw 10/24/2008

This is almost what I am looking for BUT my problem is that my master key is not the value I want to request. It would work if country-name was my primary key (it isn't for purpose of seo).... accommodation is my master table and country the child. The fields which link them together are country(accommodation) and country-name(country)
[codebox]if (@$_REQUEST["editid1"])

echo "<a href=\"country_list.php?mastertable=accommodation&masterkey1=".$_REQUEST["editid1"]."\">Country Information</a>";[/codebox]
I assume the part which needs to be changed is "editid1" but I'm unable to work out what it should be!!!!!
Thanks in advance