473,569 Members | 2,611 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 918

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

Similar topics

3
2400
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, isCenter) { //v3.0 if(window.screen)if(isCenter)if(isCenter=="true"){ var myLeft = (screen.width-myWidth)/2; var myTop =...
2
2376
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 we modified the links that invoke the javascripts from: <a href=javascript: top.doSomething> text </a> To: <span...
7
1128
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? -- .~. Might, Courage, Vision. In Linux We Trust. / v \ http://www.linux-sxs.org
4
2339
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 functions through onload=function() in the body tag or through window.onload=function name in a script, the host's advertising javascripts disrupt my...
7
1692
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 need to prompt the users with a modal box (with "Yes" and "Cancel" button on it); 2) When the user clicks "Yes" button, I need to do some further...
1
1494
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 javascripts , php comments and html comments ? It is most urgent. Please post your replies. Thanks in advance somaskarthic
2
2214
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 how I can load a script dynamically: function loadScript(scriptname) { var e = document.createElement("script"); e.src = scriptname+".js";
1
1479
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
1780
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
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5513
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
938
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.