No announcement yet.

Help With External Data Provider Javascript Code

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help With External Data Provider Javascript Code

    Hi, I'm trying to get the a headline feed on another HTML site from my forum. I'm using the code from this thread. I've edited the url on the first part of the Java to reflect the location of the forums I want headlines from.

    However, the code is not displaying the HTML on the page at the external site. I think I need to alter the java code for the thread's URL also, but I'm not sure how (I'm not a coder).

    Can someone tell me what's going wrong. I tried the Java code in the manual and it worked, it pulled the thread titles, but without the thread URLs. I know the first url with the forum IDs is fine in the javascript, but I'm lost with the more complicated Java syntax below it. I can see the Href but aren't sure how to customise to work - I've tried a couple of variations. Any help welcomed.

    <script type="text/javascript" src=",28,31,34"></script> 
    <script language="" type="text/javascript"> <!-- for (x = 0; x < 10; x++) { document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />"); } //--> </script>

  • #2
    A hopeful bionk


    • #3
      I would like to do this too if anyone has any more info


      • #4
        Originally posted by malljack
        I would like to do this too if anyone has any more info
        I just did a bit of a trawl around here and found the answer (I keep missing the releted threads bit at the bottom of these posts! )

        What I needed was this code:

        <script src=",28,31,34" type="text/javascript"></script>
        <script type="text/javascript">
        for (i = 0; i < 5; i++)
        document.writeln("<a href=\""+threads[i].threadid+"\">"+threads[i].title+"</a>&nbsp;("+threads[i].poster+")<br />");
        Works a treat now!


        • #5
          This worked great. Very cool.

          Does anyone know how I would do the same exact thing with the “new posts” link


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