Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » Adding javascript code to a php doc (Adding javascript code to a php doc)
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Adding javascript code to a php doc [message #167178] Tue, 08 May 2012 07:18
sorcerer2066 is currently offline  sorcerer2066
Messages: 1
Registered: May 2012
Location: United Kingdom
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user

I am NOT a coder unfortunately so please bear with me

I have a php script designed for me that is a form. It works fine but I would like to include a javascript based accordion next to this form that will include instructions but I have no idea how to go about doing this and would sooo value a couple of pointers!

I have added the css files no problem [well ish! Smile ] but have no idea how to add the .js

echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"create.css\" />";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"SpryAccordion.css\" />";

But how on earth do I tell it where to find the .js code? In an html doc is is as simple as this:
<script src="SpryAccordion.js" type="text/javascript"></script>

I have tried a number of possibilities but they are simply guessing and hoping that something somewhere along the lines work. I haven't been lucky yet Confused Can anyone help?

Thanks so much

Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Problems with cron jobs - php or SQL ??
Next Topic: Google Analytics
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 28 15:38:13 EST 2021

Total time taken to generate the page: 0.00704 seconds