This topic is locked

Link a field value to another field

7/21/2008 7:53:10 PM
PHPRunner General questions
F
fid author

Hi everybody
I have a add page wich have a popup window of a list page.

In this popup window i have field1 and field2 and i want this fields to be linked to field_a and field_b on the add page.
First of all i have to transform the field1 and field2 values of the popup on links.

Than, when i click the link the value must go to field_a and field_b on the add page.

And finaly when i click the link the popup window closes.
Any ideas?

Thank-you in advance.

J
Jane 7/22/2008

Hi,
I'm nore sure how this question is connected with PHPRunner.

Please clarify.

C
chaz 7/22/2008

hi i think i have similar problem LOL
table: account

field: imageID

.

.
table photo

field: imageID

field: imageURL
when i look at the account table i would like to display the URL to the image (ie display the image instead of the imageID)
eg < img src="imageURL" > instead of a number
any help thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=31284&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />

J
Jane 7/22/2008

Hi,
use custom format on the "View as" settings dialog on the Visual Editor tab for this purpose.

Here is a sample:

global $conn;

if ($value)

{

$str = "select imageURL from photo where imageID=".$value;

$rs = db_query($str,$conn);

$data = db_fetch_array($rs);
$value = "<src href=\"".$data["imageURL"]."\">";

}

C
chaz 7/22/2008

global $conn;

if ($value==1){

$value = "<IMG alt=Online src=\"images/online\.gif\" />";

}

if ($value==0){

$value = "<IMG alt=Offline src=\"images/offline\.gif\" />";

}


hi why wont this work??

J
Jane 7/22/2008

Try to use this one:

if ($value==1){

$value = "<IMG alt=Online src=\"images/online.gif\" />";

}

if ($value==0){

$value = "<IMG alt=Offline src=\"images/offline.gif\" />";

}

C
chaz 7/22/2008

hi all my images dont show !! what did i miss ?? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=31294&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />

$value = "<img src href=\"https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=31294&image=2&table=forumreplies\"; />";


LOL i see the error the moment i posted it <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=31294&image=3&table=forumreplies' class='bbc_emoticon' alt=';)' />
i will try the other one

C
chaz 7/22/2008

Try to use this one:



hi this one gave me the online icon ONLY
i tried the if /else as well

J
Jane 7/22/2008

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.