This topic is locked

HTML links

8/1/2007 7:22:26 PM
PHPRunner General questions
author

Hi! I cannot locate anything that pertains to creating html links. I have a database that lists kennels and the URL to their websites. Can someone point me in the right direction? Thanks!!

Sergey Kornilov admin 8/2/2007

Set View as type to Hyperlink?

501302 8/5/2007

Set View as type to Hyperlink?



I am sorry I did not describe my problem correctly.
This is what I am trying to do. I have been trying to use the properties for hyperlink and following the example in the 'list' page. To the left of each record are the words "edit, inline edit and view". If you click on the word 'view', it brings up the view page for that record.
For the sire and dam, I want to be able to click on their name or their ID and bring up their 'view'page - just like it is on the list page for the ID for the RegName.
thanks!!!

500406 8/13/2007

No Suggestions???? I still have not been able to have a link to each of the dogs in their pedigrees. I tried mimicking the list page but that did not work.
Please help!! THanks!!

J
Jane 8/14/2007

Mary,
try to do the following:

  1. proceed to the Visual Editor tab, switch to the HTML mode


  2. find this code:

    <TD>{$row.1FieldName_value} </TD>


  3. and replace it with this one:

    <TD><a href="TableName_view.php?editid1={$row.1FieldID_value}">{$row.1FieldName_value}</a> </TD>





where FieldName and FieldID are your actual field names, TableName is your actual table name.

500407 8/14/2007

[quote name='Jane' post='20411' date=Aug 14 2007, 01:01 AM]Mary,
try to do the following:

  1. proceed to the Visual Editor tab, switch to the HTML mode
  2. find this code:
  3. and replace it with this one:
    Hi Jane: I cannot find <TD>{$row.1FieldName_value} </TD>

    anywhere - checked all the pages from the view tab - list, edit, add, view, etc.
    Also, would I put this with each field in the print message?
    All my code for view is in the events.
    Thanks for your help!!!

J
Jane 8/15/2007

Mary,
to find this code proceed to the Visual Editor tab, select list page in the left menu, click on the field and switch to the HTML mode. Also please note FieldName in the following code is your actual field name:

<TD>{$row.1FieldName_value} </TD>

500408 8/15/2007

Hi again:
When I go to 'Visual Editor then to the 'view' page [which is my pedigree - is this the wrong page ] then to the html coding, this is what I see:

////////////////////
<BODY bgColor=white>{include_if_exists file="include/header.php"}

<H1>Pedigrees, View record [ ID: {$show_key1}] </H1>{$message}{doevent name="ViewOnLoad"}

<DIV align=left>

<HR width=300 noShade SIZE=1>

</DIV>Â Â Â <A href="Pedigrees_list.php?a=return">Back to

list</A><BR><BR>

<TABLE cellPadding=2>

<TBODY>

<TR>

<TD class=shade width=150>ID</TD>

<TD width=250>{$show_ID}</TD></TR>

<TR>

<TD class=shade width=150>RegName</TD>

<TD width=250>{$show_RegName} </TD></TR>

<TR>

<TD class=shade width=150>Photo</TD>

<TD width=250>{$show_Photo} </TD></TR>

<TR height=50>

<TD align=left colSpan=2>Â Â Â <A

href="Pedigrees_list.php?a=return">Back to

list</A><BR><BR></TD></TR></TBODY></TABLE>{include_if_exists file="include/footer.php"} </BODY></HTML>
And I want the links to be on the RegName for the Sires and Dams so that when I click on their name, it brings up their pedigree. The coding to show these fields is in the 'events' section.

[indent]Sire - clicking will bring up HIS pedigree.[/indent]

Dog

[indent]Dam[/indent]
Am I working on the wrong page [the view page]? Thanks very much for your help!!

J
Jane 8/15/2007

Mary,
I see what you're saying.

You need to edit your BeforeShowView event and replace plain text with links.

Here is a sample:

$message.="<tr><td valign=middle class=shade rowspan=16 colspan=1 width=150><small><small>Sire<br /><b><TD><a href=\"TableName_view.php?editid1=".$row['SireID']."\">".$SireRow['RegName']."</a></TD></b></small></small></td>";

500409 8/15/2007

Mary,

I see what you're saying.

You need to edit your BeforeShowView event and replace plain text with links.

Here is a sample:


Thank you so much, Jane!! That worked great! Another issued solved!!!