Gossamer Forum
Home : Products : DBMan : Customization :

Link target_blank

Quote Reply
Link target_blank
Unimpressed Please informe me if there is the possibility to modify the target of the link in DbMan record from _self to _blank.
What must I modify into the code ?
Regards.
Portal Admin
Filippo E. Araniti
http://www.guitaronline.it
http://www.araniti.it
http://www.araniti.com
Quote Reply
Re: [Araniti] Link target_blank In reply to
If you are linking to a field names URL you could simply use something like this:

<A HREF="$url{'URL'}" target="_blank">$rec2{'URLTile'}</A>

Hope this helps


Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Link target_blank In reply to
You'd want target="newwin"
Quote Reply
Re: [LoisC] Link target_blank In reply to
Dear LoisC,
where I must insert the code ?
Portal Admin
Filippo E. Araniti
http://www.guitaronline.it
http://www.araniti.it
http://www.araniti.com
Quote Reply
Re: [LoisC] Link target_blank In reply to
The code go into sub: html_record {

My Old:

print qq||;
if ($rec{'Web Site'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="25%"><$font_color>Web Site:</FONT></TD>
<TD WIDTH="75%">&nbsp;<$font><a href="$url{'Web Site'}">$rec{'Web Site'}</a></TD></TR>

New:

print qq||;
if ($rec{'Web Site'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="25%"><$font_color>Web Site:</FONT></TD>
<TD WIDTH="75%">&nbsp;<$font><a href="$url{'Web Site'} target="_blank">$rec2{'Web Site'}</a></TD></TR>


Please: why $rec2 and no $rec

Is it different ?

Thanks.


Portal Admin
Filippo E. Araniti
http://www.guitaronline.it
http://www.araniti.it
http://www.araniti.com
Quote Reply
Re: [Araniti] Link target_blank In reply to
Sorry yes, it's just $rec .. i copied the example from a relational setup (that's why the $rec2

For your you would just change:

<a href="$url{'Web Site'}">$rec{'Web Site'}</a>

to:

<a href="$url{'Web Site'}" target="_blank">$rec{'Web Site'}</a>

And with your coding you could use:

|;
if (length($rec{'URL'}) > 7) { print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="25%"><$font_color>Web Site:</FONT></TD>
<TD WIDTH="75%">&nbsp;<$font><a href="$url{'Web Site'} target="_blank">$rec{'Web Site'}</a></TD></TR> |; }
print qq|

This way you can setup your .cfg file to have the default of http:// and not have it display the field unless it contains more than the default value.

Such as:

'Web Site' => [15,'alpha',30,90,0,'http://','^http://'],



Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [RedRum] Link target_blank In reply to
Redrum:

It depends on what HTML standard is being used. Many still use a standard which is viewable in all browsers.

Without making heavy modifications to the basic script it contains for the most part HTML 3.0 standards.




Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/

Last edited by:

LoisC: Jan 6, 2002, 2:59 AM
Quote Reply
Re: [LoisC] Link target_blank In reply to
target="newwin" won't work in all browsers. So newwin is probably a more reliable option.

Last edited by:

RedRum: Jan 6, 2002, 3:23 AM
Quote Reply
Re: [LoisC] Link target_blank In reply to
Sly
Thank you very much.

With kind regards I remain
Yours sincerely.

F. E. Araniti



Portal Admin
Filippo E. Araniti
http://www.guitaronline.it
http://www.araniti.it
http://www.araniti.com