Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 14th, 2004, 05:34 AM
eaton eaton is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 73 eaton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to eaton
javascript function call inside the php code(echo)

im having problem to put the javacsript function call inside the php code. please give me some ideas on how to do it. this is my sample code:

echo('<p><input type="text" name="name" onClick="myfunction();"></p>');

javacriptcode
<!--
function myfunction(){
//my code
}
-->

your help is appreciated. thankz..

Reply With Quote
  #2  
Old July 14th, 2004, 03:54 PM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'Client Side Things' by notepad.

Reason: php looks fine

Reply With Quote
  #3  
Old July 14th, 2004, 03:55 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: javascript function call inside the php code(echo)

what's to click on a text field? ..perhaps you mean onFocus?

Reply With Quote
  #4  
Old July 14th, 2004, 05:10 PM
trippleweb's Avatar
trippleweb trippleweb is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Victoria, BC, Canada
Posts: 702 trippleweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 26 m 5 sec
Reputation Power: 2
RE: javascript function call inside the php code(echo)

Instead of this:
echo('<p><input type="text" name="name" onClick="myfunction();"></p>');


escape the quotes by doing this:

echo "<p><input type="text" name="name" onClick="myfunction();"></p>";

Reply With Quote
  #5  
Old July 14th, 2004, 05:37 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: javascript function call inside the php code(echo)

how would that make any difference?

Reply With Quote
  #6  
Old July 15th, 2004, 07:48 PM
pickleman78 pickleman78 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Dallas,TX,USA
Posts: 582 pickleman78 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to pickleman78
RE: javascript function call inside the php code(echo)

Try defining the JavaScript function before you call it. Define the JavaScript in the head, then call it later. Also, try making it
onClick="javascript:myfuntion()" or whatever it was called

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > javascript function call inside the php code(echo)


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 6 hosted by Hostway
Stay green...Green IT