Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
How to use Javascript in the body of the PHP-Nuke page


Goto page 1, 2, 3  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
bunniefuu
Staff Sergeant
Staff Sergeant


Joined: 16 May 2004
Posts: 37

PostPosted: Sun May 16, 2004 11:33 pm    Post subject: How to use Javascript in the body of the PHP-Nuke page
Reply with quote

Hi, I'm a little lost and thought I'd post here since I was following Chris's Manual on how to add this code.

It's Javascript (basically the leaves script from DD) and it has to go into the body section. So, I converted the Java into the php code on each line with echos, and inserted it into the theme.php file right after the body bg line.

Here's the problem, it's there with no errors, it's even in the source code when you pull that up, but nothing is happening. Just as if I had never added the code. Why would it not be working?

Is there someone I could email the code too that could help me or can I post it here?

Thanks in advance,
Jennifer
Back to top
View user's profile Send private message Send e-mail AIM Address
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Mon May 17, 2004 1:34 pm    Post subject:
Reply with quote

Why does it have to be in the body part of the page? Can't you put it in the includes/javascript.php?

Anyway, maybe your JS code is just buggy... Wink
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bunniefuu
Staff Sergeant
Staff Sergeant


Joined: 16 May 2004
Posts: 37

PostPosted: Mon May 17, 2004 3:12 pm    Post subject: Java help
Reply with quote

Hi Chris!!

Thank you for answering.

Actually, originally I did have the code in the includes/ javascript.php file and it did the same thing-- nothing happened! That's when I figured out that the includes/java writes the code to the "header" and this code states it must be in the "body" to work. So, then I read the steps on adding it to the theme.php after the body tag and still nothing is happening?

I don't understand it at all. What else could I be doing wrong?
And I know the code works because I have it working on my html site just fine, I just can't get it to work on the phpsite.

Please help?
Back to top
View user's profile Send private message Send e-mail AIM Address
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Mon May 17, 2004 6:02 pm    Post subject:
Reply with quote

Just by having the script code in the body (or header) will not help. You must call that script somewhere in the HTML code (as echoed by your PHP code). Is your JS script called somewhere and you still don't see any response from it?
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bunniefuu
Staff Sergeant
Staff Sergeant


Joined: 16 May 2004
Posts: 37

PostPosted: Mon May 17, 2004 7:15 pm    Post subject: Thank You
Reply with quote

Quote:
Open quoteYou must call that script somewhere in the HTML code (as echoed by your PHP code). Is your JS script called somewhere and you still don't see any response from it?
_________________ Close quote


OMG. Now see... that's exactly what I was thinking earlier-- but the problem I had on that is that I couldn't find any instructions on how to do it. Please, forgive my ignorance as I'm new to PHP and I've been merely reading the manuals and going from that.

So, than it wouldn't matter which one it's in? Body or Header? And let's say since it's in the body now-- where would I go to find out how to write the call line and where I put the call line in at??

Thank you so much Chris!!!!
Back to top
View user's profile Send private message Send e-mail AIM Address
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Mon May 17, 2004 10:54 pm    Post subject:
Reply with quote

You got the script from another site, O.K.? Just check the HTML code of that site. You will see the script, of course. In the script, there will be some function(s) defined. Search the code (with a search function of your browser at best) for occurences of those function names elsewhere down the file. If you don't find any, then there is probably a call to another function that uses those functions, or there is another JS file included...something like that. Try to understand how things work, it will help you localize the call to that (yet unknown) Javascript function.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bunniefuu
Staff Sergeant
Staff Sergeant


Joined: 16 May 2004
Posts: 37

PostPosted: Tue May 18, 2004 1:02 am    Post subject: I'm sorry-
Reply with quote

Chris--

I am so sorry. Maybe I should have been a little clearer. I didn't get the code from another site (php persay). I actually got that script from dynamicdrive.com (It's the falling leaves one) -- so there isn't a way to for me to know where the "call line" is. I just took that script, added the echo lines and so forth and now I'm completely stuck.

You say I should have a call line in the html section-- so
1. What do I write for a call line?
2. What html section? Which folder are we talking about? Because I've searched and I'm a little lost on this.
3. I've searched google seven thousand times and I don't see any help on the second part of this (only the part on writing the echos) and then it says just call it like any other html document. Great except I don't get that part.??

Thanks,
Jennifer
Back to top
View user's profile Send private message Send e-mail AIM Address
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Tue May 18, 2004 9:33 am    Post subject:
Reply with quote

O.K., by now I hope it is clear to you how important it is to give exact infos on what you use and what the problem is. Wink

Arrow If nobody gives exact infos while describing his own problem, then no search engine can help you because there are no adequate keywords in the texts!

For example, you said you got it from "DD". What is DD? Do you think I know? Do you think a user who is having a problem with a Javascript from www.dynamicdrive.com will find a solution through a search engine if everybody writes "DD" in the texts?

Then, you don't tell us where you got it exactly from, the HTTP address. This is also important, because I went to "DD" ( Wink ) and typed "leaves" in the search box - and got 6 results:

http://search.freefind.com/find.html?id=6299074&pageid=r&mode=ALL&n=0&query=leaves

Which one is it?

If I find the script, maybe I can find an example for you.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bunniefuu
Staff Sergeant
Staff Sergeant


Joined: 16 May 2004
Posts: 37

PostPosted: Tue May 18, 2004 2:47 pm    Post subject: Again My Apologies
Reply with quote

Chris--

Firstly, I am sorry again-- but to my defense I was actually playing by the "rules". I am aware that the majority of every site (and maybe not yours so I apologize) states to please not post links to other sites, to advertise or promote even by code and so forth.

And if you noticed I asked you permission in my very first post if it would be okay to post the code, email the code, ect.--
Quote:
Open quoteIs there someone I could email the code too that could help me or can I post it here?
Close quote


But that's my fault and I am really sorry for the confusion.
Specifics are it's the falling leaves javascript from
http://www.dynamicdrive.com

The exact script is:
http://www.dynamicdrive.com/dynamicindex3/leaves.htm

I have it in the theme.php right after the body tag and no place else. I do not have a "call" line to it yet (because I don't understand this part and cannot find any tutorials on it.

Again, if you would like to see the exact code that I have written I can paste it here as well. (theme.php file) I can also give you a link to my html site where the code is working perfectly.

Thank you Chris,

Jen=)
Back to top
View user's profile Send private message Send e-mail AIM Address
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Tue May 18, 2004 4:42 pm    Post subject:
Reply with quote

No problem bunniefuu. Nothing bad happened. Smile

The "call" of the function occurs on the line:

Code:

window.onload=fall


which in plain english means: "when you load the window, call the fall function of the script!". You see the fall() function, don't you?

Where did you put the images of the leaves? The way it is written, you should put them in the Nuke root, which is the same directory where also config.php is in.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 3
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

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


Powered by phpBB © 2001, 2005 phpBB Group