View previous topic :: View next topic |
Author |
Message |
jemswillam Just Arrived

Joined: 04 Feb 2010 Posts: 0 Location: london

|
Posted: Thu Feb 11, 2010 1:39 pm Post subject: PHP help |
|
|
Hey can some one help me out I'm trying put this on my website but when it's in php code I get errors so can some help me out to make it work in php code
<script type="text/javascript">
$(document).ready(function() {
$("a.zoom").fancybox();
$("a.zoom1").fancybox({
'overlayOpacity' : 0.7,
'overlayColor' : '#000000'
});
$("a.zoom2").fancybox({
'zoomSpeedIn' : 500,
'zoomSpeedOut' : 500
});
});
</script>
|
|
Back to top |
|
 |
peann Just Arrived


Joined: 15 Feb 2010 Posts: 0 Location: Ireland

|
Posted: Mon Feb 15, 2010 8:43 pm Post subject: |
|
|
That's not PHP, so it naturally won't be parsed. What exactly are you trying to do?
|
|
Back to top |
|
 |
Groovicus Trusted SF Member


Joined: 19 May 2004 Posts: 9 Location: Centerville, South Dakota

|
Posted: Mon Feb 15, 2010 10:32 pm Post subject: |
|
|
Just spamming their sig.....
|
|
Back to top |
|
 |
Polina Just Arrived

Joined: 17 Mar 2010 Posts: 0

|
Posted: Thu Mar 18, 2010 5:41 pm Post subject: |
|
|
jemswillam, I had similar problem. These tutorials: http://phpforms.net/tutorial/tutorial.html helped me for decision of this problem.
Last edited by Polina on Mon Aug 29, 2011 11:29 am; edited 1 time in total |
|
Back to top |
|
 |
jake2891 Just Arrived

Joined: 20 Mar 2010 Posts: 0

|
Posted: Wed Mar 24, 2010 9:31 pm Post subject: |
|
|
if your trying to put that exactly between the two opening and closing php tags you will have to echo the content out. otherwise close the php tag where u want to insert that code add the javascript and re open the php tag. heres an example
<?php
//content here
?>
javascript here
<?php
?>
etc.. is that what u meant?
|
|
Back to top |
|
 |
alairauston Just Arrived

Joined: 03 Jul 2010 Posts: 0 Location: lklkl

|
Posted: Wed Jul 07, 2010 8:02 am Post subject: |
|
|
You need to put session_start() at the beginning of your code... there should be no codes before it.There should also be no white spaces after the closing tag ?>...
Moderator note: edited to remove spammy signature - capi
|
|
Back to top |
|
 |
Lyrico Just Arrived

Joined: 02 Aug 2010 Posts: 0 Location: Philippines

|
Posted: Fri Aug 06, 2010 2:31 pm Post subject: |
|
|
PHP codes/tags is definitely different to javascript. But you can insert javascript code inside php codes.
for example:
<?php
echo "<script type='text/javascript'>";
echo "</script>";
?>
just make sure that every javascript line was starts with echo and inside "";
|
|
Back to top |
|
 |
proxy1gratuit Just Arrived

Joined: 16 Dec 2010 Posts: 0

|
Posted: Thu Dec 16, 2010 1:15 am Post subject: |
|
|
<?php
//code php
?>
code javascript or HTML
<?php
//code php
?>
Moderator note: edited to remove spammy signature - - capi
|
|
Back to top |
|
 |
|