Old 03-04-2009   #1 (permalink)
Registered User
 

Join Date: Mar 2009
Posts: 1

Question Javascript using PHP functions

Hi to all that reads,

I'm new with HTML, PHP, JS, and CSS. I just want to know if you can use PHP functions in JS. I have little experience with JS.
Please knowtify me if it can be done.

Thanks,
Reevo
Reevo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-04-2009   #2 (permalink)
Registered User
 
U'ziel's Avatar
 

Join Date: Sep 2005
Posts: 88
Images: 1

You can call PHP functions from Javascript with an XHTTP request you want to look into AJAX for that but I would suggest you learn both languages before attempting that.
U'ziel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-07-2009   #3 (permalink)
Registered User
 

Join Date: Apr 2009
Posts: 12

Here is the code hope this is useful for you..
Code:
// .... here some php lins... variables o some functions....

//... maybe some post variables an some new values.... proccessed over post variables....


<script type="text/javascript">
function test(){
document.getElementById("php_code").innerHTML="<?php for($i=0; $i<10; $i++) echo $i; //maybe a function ?>";
}
</script>

<a href="#" style="display:block; color:#000033; font-family:Tahoma; font-size:12px;" onclick="test(); return false;"> test </a>
<span id="php_code"> </span>
harish is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-29-2009   #4 (permalink)
Registered User
 

Join Date: Apr 2009
Posts: 1

PHP with javascript

Hi,

Do one thing, read AJAX carefully and learn how to call javascript withing php. PHP doesn't provide support from outside so it could be better if you do all thing in .ASP.
Grant Flower is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Functions problem thecubed HTML / PHP / ASP / JS 9 05-30-2006 08:26 AM
How can i combine Javascript with PHP? ParaSnake HTML / PHP / ASP / JS 2 06-29-2005 01:46 PM
JavaScript Frank Jaeger HTML / PHP / ASP / JS 1 12-23-2003 03:18 AM


All times are GMT +1. The time now is 07:40 AM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT