473,404 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

PHP script error

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 1299
Markus
6,050 Expert 4TB
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 Expert 1GB
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
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
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 Expert 4TB
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 Expert 4TB
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
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
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
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...
6
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...
12
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...
17
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"...
19
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
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...
15
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...
3
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...
1
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...
7
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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,...
0
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...
0
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...
0
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,...

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.