 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Abbey
Joined: 20 Nov 2007 Posts: 4
|
Posted: Tue Nov 20, 2007 7:15 am Javascript in DIV layer... |
|
|
|
Hi everyone,
I'm trying to get a javascript code (that pulls the latest forum topics from my forum) to appear within a "Latest Forum Topics" box I created using div layers.
If I place <br>blahblahblah</br> within the specific <div class=theboxinfo> </div> area, the text shows up fine within the box.
But if I replace that text with my javascript code, it doesn't work...it shows up after the box.
The box IS composed of images.
Any general help you can offer would be much appreciated!
P.S.
Unfortunately, I cannot post a link to the page for legal purposes.
Last edited by Abbey on Tue Nov 20, 2007 8:10 am; edited 1 time in total |
|
sticks464
Joined: 31 Dec 2006 Posts: 934
|
Posted: Tue Nov 20, 2007 7:42 am |
|
|
|
| Can you post the javascript? |
|
Abbey
Joined: 20 Nov 2007 Posts: 4
|
Posted: Tue Nov 20, 2007 8:07 am |
|
|
|
Hi Sticks -
Here's the script:
| Code: |
<script language="JavaScript" type="text/javascript" src="http://www.thelinkthatoffersthelinks.com">
</script> |
And on that http:// page, you would find:
| Code: |
document.writeln('Title one!
'); document.writeln('Title of post two!
'); |
So on and so forth.
This is a Topics Anywhere script - for a PHPBB forum...
I'm trying to fit it into...
| Code: |
<!-- FEED BOX START-->
<div class="boxhalf-all">
<img src="topics.gif" alt="Latest Forum Topics" width="242" height="26" border="0"></div>
<div class="boxhalf">
<div class="boxhalf-outer">
<div class="boxhalf-inner">
<div class="theboxinfo">
<br>test test test test test test woo hooo!</br>
<br>test test test test test test woo hooo!</br>
</div>
</div>
</div>
</div>
<!-- FEED BOX END--> |
As I said, the text shows up fine. I just want to replace the text with that javascript...
Thanks so much for your help! |
|
sticks464
Joined: 31 Dec 2006 Posts: 934
|
|
Abbey
Joined: 20 Nov 2007 Posts: 4
|
Posted: Tue Nov 20, 2007 9:11 am |
|
|
|
I'm sorry if you misunderstood...
I cannot post the actual link; this is why I used a substitute address.
I was told to place the following code on the page I want my latest topics to appear on:
| Code: |
<script language="JavaScript" type="text/javascript" src="http://www.thelinkthatoffersthelinks.com">
</script> |
Now the ACTUAL address within that javascript (which I cannot post) points to a page and displays only this:
| Code: |
document.writeln('Title one!
'); document.writeln('Title of post two!
'); document.writeln('Title of post three!
');
|
Now I know the actual link and Javascript works...it pulls the links to the topics perfectly well. It just will not appear within the box I've created.
I hope this makes it more clear, sorry again for the confusion. |
|
sticks464
Joined: 31 Dec 2006 Posts: 934
|
Posted: Tue Nov 20, 2007 1:23 pm |
|
|
|
It works for me by putting the script inside script tags
in place of the blah blah text
| Code: |
<script>
document.writeln('Title one!');
document.writeln('Title of post two!');
</script>
|
It does not pull in any blogs but puts the headings side by side. If you want them on different lines put a html line break in after Title one!
| Code: |
| document.writeln('Title one!<br>'); |
|
|
Abbey
Joined: 20 Nov 2007 Posts: 4
|
Posted: Wed Nov 21, 2007 6:13 am |
|
|
|
| Thank you for your time, Sticks! |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|