No announcement yet.

cant display 'active threads' javascript

  • Filter
  • Time
  • Show
Clear All
new posts

  • cant display 'active threads' javascript

    follow this tip by Floris:
    HowTo Display Latest Active Threads on ANY normal HTML page
    on a page outside vb.

    I changed the code to read
    <a href=""><strong>Latest Forum Discussions</strong></a></div></td> </tr> </tbody> <tbody> <tr> <td width="100%"> <div> <script type="text/javascript" src=""></script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 10; x++) { document.writeln("<a href=\""+threads[x].threadid+"\">"+threads[x].title+"</a>
    all that shows is a hyperlink to the page latest threads in the forum site.

    see page at - halfway down the page in the center in table.

    please help
    ~ consciousness changes everything ~

  • #2
    Html problem?

    Try this:

    document.writeln("<a href=\"oracle/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+" (Posted By: "+threads[x].poster+")<br />");

    Not elegant perhaps, but it works for me
    I just added the poster bit on the end, though I think you just want to show thread title. Important thing is to close the expression " and )
    Last edited by Profaders; Thu 19th Jan '06, 9:37am.


    • #3
      Thanks Profaders,
      I pasted in the source code, but the code shows up on the webpage (2nd box down)

      did i put it in the wrong place?
      ~ consciousness changes everything ~


      • #4
        Expression problem

        Your expressions between threadid and threadtitle are wrong

        (""+threads[x].title+" (Posted By: "+threads[x].poster+")

        By the look of it you've got an extra ( in there, and a missing < between " "

        Change to:

        document.writeln("<a href=\"yourforumfolder/showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+" (Posted By: "+threads[x].poster
        +")<br />");

        Make sure this line is corrected first.

        I use the <br at the end because my column widths are fairly narrow. Looks like your text box is fairly wide, so you might not need it. But get the expressions in that line of code right first


        • #5
          Appreciate ur help Profaders,
          Its strange.
          1. I paste exactly what u gave me into Dreamweaver and then I tried Text edit. The code changes once it displays on the screen even though it looks fine in DW/TE.
          I dont know what to make of it...
          ~ consciousness changes everything ~


          • #6
            sorry, i notice this thread is very old but I also get the same hyper link problem

            this is my temp file:


            not sure whats going wrong

            edit-- figured it out, delete the spaces and carrage returns, copying and pasting this text seems to lead to errors with line returns
            Last edited by mikep; Tue 3rd Oct '06, 1:22pm.
            ai-stockmarketforum vbulletin-faq vbulletin-fans


            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.