Reply
Include Javascript
Old 01-15-2005, 12:44 PM Include Javascript
Webmaster Talker

Posts: 560
Hello, I am currently working on a database and I need to include a random image/link script. Every time the browser is refreshed, I would like a new image (linked to a new link) each time. I have found some Javascript codes that would allow me to do this however for some reason, I cannot include it in the database, maybe because it won't read Javascript inside PHP? I am not sure the reashing but it comes up as error. Is there another way that I can what I would like to do, either by using a different coding language or maybe by using some sort of php "include" script, that would include the javascript page? Please let me know, thanks and I appreciate your time.

Matt
170 Designs is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 01-16-2005, 06:22 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Try doing this:


Code:
<script language="javascript">
alert("This works");
</script>
save this as "javascript_test.php"

Then in your php script add this:
include("javascript_test.php");

if you recieve an alert then you know it works.
__________________
CYTech-services.com - 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 03-07-2005, 01:40 AM
brokensoul2271's Avatar
- - - - - - - - -

Posts: 750
Location: Lancashire, UK
Quote:
Originally Posted by ACJavascript
Try doing this:


Code:
<script language="javascript">
alert("This works");
</script>
save this as "javascript_test.php"

Then in your php script add this:
include("javascript_test.php");

if you recieve an alert then you know it works.
...clever
__________________
Yes, indeed...
WebDevWorld.net | StrangeDarkness.com | MyNEWBlog
brokensoul2271 is offline
Reply With Quote
View Public Profile Visit brokensoul2271's homepage!
 
Old 03-07-2005, 10:43 PM
Average Talker

Posts: 16
I agree with Broken.
Slyser is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Include Javascript
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12631 seconds with 13 queries