Coding Questions

taekwondokid42

New Member
Messages
268
Reaction score
0
Points
0
1. Is there a way using php to have the page update without completely refreshing?

2. Does php have functions like on.mouse.click, or on.hit.key?
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
you can use javascript/ajax in your php website to have the on.click

why?
 

taekwondokid42

New Member
Messages
268
Reaction score
0
Points
0
I was just thinking of some things I could do with it.


Now I have a new question. If I want to insert javascript into my php file, do I just go

echo "javascript code";

or do I have to do something more complex?
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
You could
PHP:
echo "JS";

Or even
PHP:
<?php
//do some stuff here 
?>
<script = "javascript">
// Do some JS here
</script>
<?php
//continue processing here
?>
 
Top