This topic is locked

View custom pages from list from view page

4/8/2008 2:31:08 PM
PHPRunner General questions
S
swanside author

WHen I open my project, I have the master page, with a view link that takes me to the details for that page.
I have on the master page links to custom pages.
The URL for the main list page is
http://localhost/Leymac/job_list.php
On this page the link for the view page is
http://localhost/Leymac/job_view.php?editid1=1000000
Also on the List page as well as a link to view the main details, I have a link for the 3 custom views
http://localhost/Leymac/Full_Invoice_list....terkey1=1000000

http://localhost/Leymac/Part_Invoice_list....terkey1=1000000

http://localhost/Leymac/Basic_Invoice_list...terkey1=1000000
I would like to move these links and put them on the main details page.
WHat does the URL have to end in?
http://localhost/Leymac/Full_Invoice_list....asterkey1=??????
Thanks

Paul.

A
alang 4/8/2008
S
swanside author 4/9/2008

I would use a custom field for this eg:

$value="<a href=http://localhost/Leymac/Full_Invoice_list.php?mastertable=job&masterkey1=".$data["yourfieldname"].">Full Inv</a>";


Thanks Alan.
Tried that, but took me to an empty page.

A
alang 4/9/2008

You can check details of the custom field link when you move your mouse over it - in IE, the generated URL displays in the status bar. Make sure the $data variable is getting picked up correctly. ie
http://localhost/Leymac/Full_Invoice_list....terkey1=1000000

S
swanside author 4/14/2008

You can check details of the custom field link when you move your mouse over it - in IE, the generated URL displays in the status bar. Make sure the $data variable is getting picked up correctly. ie

http://localhost/Leymac/Full_Invoice_list....terkey1=1000000


Thanks Alan.
I will try again tonight

S
swanside author 4/14/2008

Na,
Still can not get it to work. When I hover over the link, I get

http://localhost/Leymac/Full_Invoice_list....terkey1=1000000
I need to change the end bit
job&masterkey1=1000000
to pick up each individual page.

A
alang 4/14/2008

Can you post the line of code you are using Paul.

S
swanside author 4/15/2008

Hi Alan.

I tried this on the view page
<select onchange="window.open(this.options[this.selectedIndex].value);"><option value=>Invoice</option><option value="Basic_Invoice_list.php?{$row.1Basic_Invoice_masterkeys}">Basic Invoice</option><option value="Part_Invoice_list.php?{$row.1Part_Invoice_masterkeys}">Intermediate Invoice</option><option value="Full_Invoice_list.php?{$row.1Full_Invoice_masterkeys}">Full Invoice</option></select>
But, it opens the selected invoice for the whole database and not the actual job I was looking at.

A
alang 4/15/2008

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=28035&image=1&table=forumreplies' class='bbc_emoticon' alt=':huh:' /> Paul you lost me along the way somewhere - I thought we were talking about setting up a custom field as per my first suggestion? I generally try and avoid customising the visual editor code as much as possible - you loose everything when you reset the page. However just from a brief look at your statement, I would have thought that you would need to specify a "row.1<yourfieldname>_values" in there somewhere to pick up the particular job you want to look at.

S
swanside author 4/16/2008

Thanks Alan.
The code works OK on the list page, but it falls down on the view page??