Forums: Attaching a hyperlink to a database image - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Attaching a hyperlink to a database image Rate Topic: -----

#1 User is offline   runey 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 22-October 06

Posted 02 November 2006 - 09:26 AM

I've had a look around the forum, but haven't found a solution to this one yet... If one is available...

Basically I want to attach a hyperlink to a database image (Organiser Logo)... So when the user clicks on the image it will open a website (Organiser Website) in a seperate page...

I have been able to do this with text (Organiser Name) but when I select organiser_logo instead of organiser_name, all I get is gibberish... I'm doing this in the 'View As' Hyperlink setting by the way...

Any help will be appreciated :)
0

#2 User is offline   Jane 

  • Advanced Member
  • PipPipPip
  • Group: Admin
  • Posts: 7097
  • Joined: 13-June 06
  • Gender:Female

Posted 02 November 2006 - 10:14 AM

Jason,

try to do the following:

1. select nothing for the OrganiserWebsite field on the "View as" settings dialog on the Visual Editor tab.

2. select Database image for the OrganiserLogo field on the "View as" settings dialog.
Then highlight this field on the Visual editor tab, switch to HTML mode and replace highlighted text with something like this:

Quote

<A href="http://{$row.1OrganiserWebsite_value}">{$row.1OrganiserLogo_value}</A>

best regards,
Jane Endaltseva
e-mail: support@xlinesoft.com
0

#3 User is offline   runey 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 22-October 06

Posted 02 November 2006 - 10:28 AM

Thanks for that lightning response Jane :D

Worked a treat with a slight change...

<A href="{$row.1OrganiserWebsite_value}">{$row.1OrganiserLogo_value}</A>


Basically just removed the http:// as it showed up twice...

If it's not pushing it I have one more related question... Is it possible to have that hyperlink open in a new window rather than the existing one?

Thanks again
0

#4 User is offline   Jane 

  • Advanced Member
  • PipPipPip
  • Group: Admin
  • Posts: 7097
  • Joined: 13-June 06
  • Gender:Female

Posted 02 November 2006 - 10:37 AM

Sure.
Add target=_blank to your code:

Quote

<A href="{$row.1OrganiserWebsite_value}" target=_blank>{$row.1OrganiserLogo_value}</A>

best regards,
Jane Endaltseva
e-mail: support@xlinesoft.com
0

#5 User is offline   runey 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 22-October 06

Posted 02 November 2006 - 10:41 AM

Answered my own question :)

The following code will open the hyperlink in a new window...

<A href="{$row.1OrganiserWebsite_value}"> onclick="window.open(this.href,'newwin'); return false;">{$row.1OrganiserLogo_value}</A>


Thanks again Jane

EDIT: :lol: Came up with a different answer while you must have been typing... Both work just great :)
0

#6 User is offline   runey 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 22-October 06

Posted 03 November 2006 - 08:19 AM

Me again :blink: Rather than start a new topic I'll just add this question to this one, since it's related...

Basically I changed a bit of code to add an image to the hyperlink that links to the list in a master/detail relationship...

<A href="_event_themes_list.php?{$row.1_event_themes_masterkeys}"><IMG alt="Add Theme" src="images/add_theme.gif"></A>


Changes the text hyperlink to an image one B) However there is an odd side effect... The image is now surrounded by a purple border :huh:

I can't find anything in the HTML code or CSS stylesheet that would account for it... Anybody got any ideas what it is and how to get rid of it?

Thanks again

EDIT: All sorted... Changed the code to this...

<A href="_event_guests_list.php?{$row.1_event_guests_masterkeys}"><IMG alt="Add Guest" src="images/add_guest.gif" border=0></A>


I'm not sure where it was getting the instruction to have a border, but this gets rid of it :)
0

#7 User is offline   Jane 

  • Advanced Member
  • PipPipPip
  • Group: Admin
  • Posts: 7097
  • Joined: 13-June 06
  • Gender:Female

Posted 03 November 2006 - 10:03 AM

Jason,

I'm glad you were able to resolve it!
best regards,
Jane Endaltseva
e-mail: support@xlinesoft.com
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users