mailto http link problem

A place for users and developers of the Xataface to discuss and receive support.

mailto http link problem

Postby jbrnz » Mon Apr 27, 2009 4:10 pm

I have setup a delegate class for a table in my DB. I have a mailto function that works correctly, however the code for the website field takes me to my URL+www.thesitereferenced.com

(e.g. http://mydomain/myapp/www.thesitereferenced.com.)

Here is the code

function website__renderCell( &$record ){
return $record->strval('website').' (<a href="'.$record->strval('website').'">visit</a>)';

How can I make it so that it only references the site in the field, and does not add my url to the front?

Note: the websites in my DB do not have the http:// in front of the address. Could this be the problem?

Thanks
Last edited by jbrnz on Mon Apr 27, 2009 8:27 pm, edited 1 time in total.
jbrnz
 
Posts: 22
Joined: Mon Apr 20, 2009 11:20 am

http link fix - simple mistake

Postby jbrnz » Mon Apr 27, 2009 8:21 pm

I hope I don't start filling the board with too many dumb mistakes like this. Just in case anyone else can't get their links to work solution below.

In my tables delegate class folder (mytable.php) I did not enter the "http://' after the quote which added my site url to the front of the record:

Code was:
function myfield__renderCell( &$record ){
return $record->strval('myfield').' (<a href="'.$record->strval('myfield').'">visit</a>)';

Changed to:

function myfield__renderCell( &$record ){
return $record->strval('myfield').' (<a href="http://'.$record->strval('myfield').'">visit</a>)';[/b]
jbrnz
 
Posts: 22
Joined: Mon Apr 20, 2009 11:20 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved