Results 1 to 2 of 2

Thread: Horizontal Scroller Hyperlink

  1. #1
    Join Date
    Jul 2009

    Horizontal Scroller Hyperlink

    Hi I'm new here and I was hoping someone could help me. I have a horizontal scroller and I'm trying to create a hyperlink so that whereever you click on the scroller you will be taken to a particular external web page.

    Here is the current code that works with the exception of the hyperlink:

    function writeJS(){

    var str='';

    str+='<marquee onmouseover="this.scrollAmount=3" onmouseout="this.scrollAmount=6" scrollamount="1"><?php

    $news = $this->db->query("select * from psn_news order by news_id desc limit 0,5");

    foreach($news->result() as $row)


    echo $row->news_title."&nbsp;&nbsp;|&nbsp;&nbsp;";








    Can anyone possibly tell me how to allow hyperlinks in this scroller?

    Thanks, Pat

  2. #2
    Join Date
    Jul 2009
    This should work:

    PHP Code:
    foreach ($news->result() as $row) {

    "<a href='" $row->news_link "'>" $row->news_title "</a>&nbsp;&nbsp;|&nbsp;&nbsp;";

    Replacing " $row->news_link " with whatever that variable happens to be of course.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center