JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old January 22nd, 2004, 02:34 PM
nemoz nemoz is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 nemoz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
calling javascript in php

Hi,
Iam trying to call javascript from php on mosemove event.
When i use the script in html file it works fine but when i use it with php it gives object expected error.
Iam new to all these stuff
Any help is appreciated.
Thanks in Advance
nemoz

Reply With Quote
  #2  
Old January 22nd, 2004, 02:55 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Try posting some code.

Reply With Quote
  #3  
Old January 26th, 2004, 03:59 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
PHP and Javascript aren't related. Javascript is a Client-side technology, and PHP is server-side. They cannot interact at the same time.

Reply With Quote
  #4  
Old January 26th, 2004, 07:07 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
I figured he was asking about generating javascript dynamically using PHP code.

Reply With Quote
  #5  
Old February 6th, 2004, 07:14 PM
almcnicoll's Avatar
almcnicoll almcnicoll is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Montargis, France
Posts: 6 almcnicoll User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to almcnicoll
...

Would def. be a help if you posted code - but first thing is check, check, recheck your quotes - if you're using echo to output your javascript then chances are you've forgotten to backslash a quote or two.

Also: try loading the page in Netscape then loading the (very helpful) Tools->Web Development -> JavaScript Console, which will tell you where the script is failing (assuming it's sproinging an error)

Remember what Stumpy posted - PHP is server-side, which means that by the time your browser is doing Javascripty-things, the PHP has finished running (that might not technically be correct, but think of it that way). The process is: browser requests PHP page from server, PHP script runs on server and sends lines back to the browser (plain HTML or HTML & Javascript or whatever) - there is no way for the javascript on the page to interact with the PHP that created it.

Al

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > calling javascript in php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway