473,503 Members | 12,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Javascripts In PHP Codes

1 New Member
I'm a newbie coder in fact I'm pretty bad.

So I was wondering if anyone know how to execute a javascript file in php. Is it the same as html where I just dump the code into the php code?

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. header("Status: 301 Moved Permanently", false, 301);
  3. header("Location: http://www.domain.com; Refresh: 5;");
  4. @include_once $GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT'].'/twatch_include/logger.php';
  5. ?> 
  6.  
  7.  
  8. <!-- Google Code for signup Conversion Page -->
  9. <script language="JavaScript" type="text/javascript">
  10. <!--
  11. var google_conversion_id = IDNUMBER;
  12. var google_conversion_language = "en_GB";
  13. var google_conversion_format = "2";
  14. var google_conversion_color = "FFFFFF";
  15. if (1) {
  16.   var google_conversion_value = 1;
  17. }
  18. var google_conversion_label = "signup";
  19. //-->
  20. </script>
  21. <script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
  22. </script>
  23. <noscript>
  24. <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/1068748880/?value=1&label=signup&script=0">
  25. </noscript>
  26.  
  27.  
  28. <?php
  29. exit();
  30. ?> 
  31.  
This is a normal 301 redirect using PHP header however I"m trying to put a refresh of 5 sec's is that correct?

Plus the javascript Google Tracking code this is the right way to insert javascrpts? Withou PHP brackets?

Thanks!

BEN
Feb 1 '07 #1
0 912

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2388
by: Kerberos | last post by:
When I deliver a page as text/html, the javascripts work, but if delivered as application/xhtml+xml, the javascripts don't work: function OpenBrWindow(theURL,winName,features, myWidth, myHeight,...
2
2373
by: sdvoranchik | last post by:
We have an application that contains links that run javascripts to create pages in a separate frame. When these links open an external site, it causes the javascripts to no longer function. When...
7
1125
by: toylet | last post by:
On the link below: http://www.zytrax.com/books/dns/ I couldn't find the javascript codes (mouseover) needed for the Dynamic HTML menu at the top of the page. How did the site hide those codes?...
4
2332
by: David Virgil Hobbs | last post by:
My web host inserts banner ads into my html pages. The javascript in these banner ads interferes with the onload triggered javascript functions in my pages. Whether I trigger my javascript...
7
1691
by: Tigger | last post by:
Dear Experts, I am working on ASP.NET. I have got a problem related to the usage of Javascript in ASP.NET. Please help. The story is the following: 1) I am developing an ASP.NET application. I...
1
1488
by: somaskarthic | last post by:
Hi In my PHP page while viewing the page source , it shows all the javascript codings and php comments. I don't want these comments and javascripts visible . Is there any methods to hide the...
2
2203
by: stroumf | last post by:
Hey, My problem is the following: I need to use functions from different javascripts and I don't want to load all the javascripts initially. So I need to load the scripts on demand. Now I know...
1
1471
by: Ale | last post by:
how can i connect to the database using javascripts?...First of all...is it possiible to connect to the database(SQL/oracle/MySQL/..)
1
1777
by: vickygoelk | last post by:
Hey my question is how we disable the firefox drag feature using javascripts?. if it possible then please solve this problem. Thanks, vivek Kumar
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.