HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Javascript in DIV layer...
Post new topic   Reply to topic    HTML Help Forum Index -> Javascript
View previous topic :: View next topic  
Author Message
Abbey



Joined: 20 Nov 2007
Posts: 4

PostPosted: Tue Nov 20, 2007 7:15 am     Javascript in DIV layer... Reply with quote

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: 1116

PostPosted: Tue Nov 20, 2007 7:42 am     Reply with quote

Can you post the javascript?
Abbey



Joined: 20 Nov 2007
Posts: 4

PostPosted: Tue Nov 20, 2007 8:07 am     Reply with quote

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: 1116

PostPosted: Tue Nov 20, 2007 8:48 am     Reply with quote

Where did you get the script? I tried http://www.thelinkthatoffersthelinks.com and it doesn't exist and that link is not a javascript file.
Abbey



Joined: 20 Nov 2007
Posts: 4

PostPosted: Tue Nov 20, 2007 9:11 am     Reply with quote

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: 1116

PostPosted: Tue Nov 20, 2007 1:23 pm     Reply with quote

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

PostPosted: Wed Nov 21, 2007 6:13 am     Reply with quote

Thank you for your time, Sticks!
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> Javascript All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial