473,658 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP script error

5 New Member
Whenever I run the PHP script on the browser, a script error : "Object not found"
is generated. The script I'm working on is syntactically correct.
How can I detect this error in the code?
Mar 27 '08 #1
8 1312
Markus
6,050 Recognized Expert Expert
You've either mistyped the URL, havent saved the file in the folder you thought you had.. you might've saved the file with the wrong extension.

This isn't a PHP 'syntax' error, it's a browser error.

Regards.
Mar 27 '08 #2
TheServant
1,168 Recognized Expert Top Contributor
Whenever I run the PHP script on the browser, a script error : "Object not found"
is generated. The script I'm working on is syntactically correct.
How can I detect this error in the code?
Which browser? And can you post some of your code where it might be occuring? (USING CORRECT CODE TAGS)
Mar 27 '08 #3
jayavidya
5 New Member
Which browser? And can you post some of your code where it might be occuring? (USING CORRECT CODE TAGS)
Hi,
The following is the IE7 browser error, after the form is submitted :

Line: 45
Char: 3
Error: Object expected
URL: http:// (on the local intranet)

These are a few lines of code (lines 36-56) in the php script:
Expand|Select|Wrap|Line Numbers
  1. $value_businessunit = "";
  2.         if(isset($_POST['BusinessUnit']))
  3.                 $value_businessunit = $_POST['BusinessUnit'];
  4.         $value_sponsor  = "";
  5.         if(isset($_POST['Sponsor']))
  6.                 $value_sponsor  = $_POST['Sponsor'];
  7.         $value_proposaldescription = "";
  8.         if(isset($_POST['ProposalDescription']))
  9.                 $value_proposaldescription = $_POST['ProposalDescription'];
  10.         $value_projectid = "";
  11.         if(isset($_POST['ProjectId']))
  12.                 $value_projectid = $_POST['ProjectId'];
  13.         $value_closedon = "";
  14.         if(isset($_POST['ClosedOn']))
  15.                 $value_closedon = $_POST['ClosedOn'];
  16.         $value_serviced = "";
  17.         if(isset($_POST['Serviced']))
  18.                 $value_serviced = $_POST['Serviced'];
  19.         $value_entrydate = "";
  20.         if(isset($_POST['EntryDate']))
  21.                 $value_entrydate = $_POST['EntryDate'];
  22.         $value_entryby="";
  23.         if(isset($_POST['EntryBy']))
  24.                 $value_entryby = $_POST['EntryBy'];
  25.  
The above code is executed each time the form is refreshed.
However, no errors are seen when the form is refreshed. The error arises only when the form is submitted.
Mar 28 '08 #4
jayavidya
5 New Member
You've either mistyped the URL, havent saved the file in the folder you thought you had.. you might've saved the file with the wrong extension.

This isn't a PHP 'syntax' error, it's a browser error.

Regards.
Hi, thank you for letting me know the correct terminology. I'm still working on detecting the browser error. Even the URL is properly typed and the file is also saved in the required folder.

The browser error is generated, everytime the form is submitted.
Mar 28 '08 #5
Markus
6,050 Recognized Expert Expert
Hi, thank you for letting me know the correct terminology. I'm still working on detecting the browser error. Even the URL is properly typed and the file is also saved in the required folder.

The browser error is generated, everytime the form is submitted.
The problem may lay in the form.
So can we see that?
(correct code tags = code=html)

Cheers.
Mar 28 '08 #6
ronverdonk
4,258 Recognized Expert Specialist
Are you using JavaScript either to check the validity of the submitted form fields, to handle a form event or to submit the form? Becaue this is not a PHP error: php does not run in the browser.

Ronald
Mar 28 '08 #7
jayavidya
5 New Member
Are you using JavaScript either to check the validity of the submitted form fields, to handle a form event or to submit the form? Becaue this is not a PHP error: php does not run in the browser.

Ronald
Hi,

Thank you for guiding me on this concept. After reading your reply, I've just begun to understand that if there are any errors in PHP, the parse errors are generated and are displayed.

After reviewing the code, I've been able to avoid the browser error. I'm using JavaScript to check the validity of date fields in the form.
All the functions for checking the validity are defined in the file CheckDate.js
I had used the script tags to include the functions in the current file as
follows:
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript" src="CheckDate.js">
  2. </script>
  3.  
The path of the JS source file is also proper.
But later I modified the code by copying all the functions' code from CheckDate.js to the current file and changed the enclosing script tags as follows:
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript" type="text/javascript">
  2.  # All functions defined in CheckDate.js copied here
  3. </script>
  4.  
Both the methods are equivalent and should work fine. But the first method generated browser errors, while the second method worked fine.
What could be the probable reason for this?
Mar 31 '08 #8
arggg
91 New Member
If you view the html source what is on line 45? It sounds like this is a javascript error.
Mar 31 '08 #9

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

Similar topics

0
6011
by: Will Seay | last post by:
At the end of this message I've pasted a script we're trying to modify slightly. I don't believe it is VBscript or javascript but these are the closest groups I could find with my limited programming knowledge. Basically, we are trying to add a few lines to this script that will execute a few shell commands (see comments at the very end of the code). We think this may be ActionScript2 but aren't sure. If you can offer any help, or know...
6
34136
by: Clay Beatty | last post by:
When you create database diagrams in Enterprise Manager, the details for constructing those diagrams is saved into the dtproperties table. This table includes an image field which contains most of the relevant infomation, in a binary format. SQL Enterprise manager offers no way to script out those diagrams, so I have created two Transact SQL components, one User Function and one User Procedure, which together provide a means to script...
12
2983
by: tshad | last post by:
I am not sure why I am getting this error: I have the following code I want to run from another include file that holds all my functions. functions.inc ************************************************************************************ <Script runat="Server"> Sub fnHeader(client As String) response.write("<!-- #include file = ../includes/staffingHeaders.inc -->")
17
7911
by: comp.lang.tcl | last post by:
The TCL command I am using will do a command-line action on a PHP script: set cannotRunPHP I have to do it this way as both the TCL script and the PHP script run as CLI. However, "info.php" requires user input to run; this causes the TCL script calling the PHP script to hose up and die. Is there a way I can do this so that the TCL script can call the PHP
19
3819
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
5
1996
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On some pages I have applied a small client-script to trap the enter-key beeing pressed and re-route this action. With the new version this little script still works, it traps the enter-key. BUT it causes postback-errors on many other .NET control,...
15
3240
by: Lawrence Krubner | last post by:
Does anything about this script look expensive, in terms of resources or execution time? This script dies after processing about 20 or 25 numbers, yet it leaves no errors in the error logs. This is on a server that handles a fairly demanding site. The defaults, in php.ini, have all been cranked fairly high: scripts get 180 seconds to run, and they can have as much as 256 megs of RAM. The input for this script is coming from a textarea in...
3
4507
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a couple of years, despite having very crude error-trapping (if it finds an error in one of the xml files, the script stops). Recently, the script has stopped working because one of the xml files is badly formed. So I decided to rewrite the script with better error trapping; the script should...
1
47445
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
7
16154
by: jeddiki | last post by:
Hi, As I am in Turkey at present, I can not see vidoes on youtube. So I have tried a few proxies but keep finding them slow or not working. So I have installed myphpProxy on my server under the domain name www.blog-start.com Unfortuantely it is not not working correctly
0
8746
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8523
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8626
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6178
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2749
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 we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.