Closed Bug 144885 Opened 22 years ago Closed 13 years ago

JavaScript Error: SetOkCode is not defined

Categories

(Core :: JavaScript Engine, enhancement)

x86
Windows 2000
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID
Future

People

(Reporter: flori, Unassigned)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:0.9.8) Gecko/20020204
BuildID:    2002020406

Above URL presents some search function, when the button is pressed, nothing
happens; no wonder, obviously some proprietary function "SetOkCode" is used (IE
5.x seems to have it)


Reproducible: Always
Steps to Reproduce:
1. go to the above URL
2. enter some search term right to "Produktsuche"
3. click on the binocular

Actual Results:  nothing ;-)

Expected Results:  after some while search results should appear on the lower
right frame.

the link is <a href="javascript:SetOkCode('global_search','searchText','','')"
onmouseover="status='Los!'; return true;"    onmouseout="status=' '; return true;">

???? never seen that before....
Confirming bug using Mozilla trunk binary 2002051408 on WinNT.
When I load this site, I see numerous errors in the JavaScript Console:

Error: illegal character
Source File: 
http://www.conradcom.de/sap/its/mimes/zprt_con_glb/99/banner_conrad.js
Line: 50, Column: 152
Source Code:
}                                                                                                                                                       

Error: preload is not defined
Source File: 
http://www.conradcom.de/scripts/wgate/zcop_b2c310b5bd5/~flNlc3Npb249UDkwV0dBVEU6
Q19BR0FURTAxOjAwMDAuMDQ3OC45M2UyNTVhMSZ+aHR0cF9jb250ZW50X2NoYXJzZXQ9aXNvLTg4NTkt
MSZ+U3RhdGU9MjQzMTg5Nzk1MQ==?~template=pcat_area_s&direkt_einstieg=&p_selected_a
rea=%24ROOT&p_max_parent_index=1&Urlgo=9
Line: 27



When I load again using exception and error tracing in the 
Mozilla JavaScript Debugger, I see a bit more detail:


Error ``setting a property that has only a getter'' [xs] in file ``(null)'', 
line 0, character 0.

Error ``SyntaxError: illegal character'' [xs] in file 
``http://www.conradcom.de/sap/its/mimes/zprt_con_glb/99/script/bbpscript.js'', 
line 611, character 55.

Error ``preload is not defined'' [xs] in file 
``http://www.conradcom.de/scripts/wgate/zcop_b2c310b5bd5/~flNlc3Npb249UDkwV0dBVE
U6Q19BR0FURTAxOjAwMDAuMDQ3OC45M2UyNTVhMSZ+aHR0cF9jb250ZW50X2NoYXJzZXQ9aXNvLTg4NT
ktMSZ+U3RhdGU9MjQzMTg5Nzk1MQ==?~template=pcat_area_s&direkt_einstieg=&p_selected
_area=%24ROOT&p_max_parent_index=1&Urlgo=9'',
line 27, character 0.


Stopped for error handler.
function (null)() in 
<http://www.conradcom.de/scripts/wgate/zcop_b2c310b5bd5/~flNlc3Npb249UDkwV0dBVEU
6Q19BR0FURTAxOjAwMDAuMDQ3OC45M2UyNTVhMSZ+aHR0cF9jb250ZW50X2NoYXJzZXQ9aXNvLTg4NTk
tMSZ+U3RhdGU9MjQzMTg5Nzk1MQ==?~template=pcat_area_s&direkt_einstieg=&p_selected_
area=%24ROOT&p_max_parent_index=1&Urlgo=9> line 27


CONTEXT AROUND LINE 27:

025: <script language=JavaScript 
src="/sap/its/mimes/zprt_con_glb/99/script/bbpscript.js"></script>
026: <script language="javascript">
027: preload('on','/sap/its/mimes/zprt_con_glb/99/dot_on.gif')
028: off=new Image()
029: off.src="/sap/its/mimes/zprt_con_glb/99/dot.gif
Status: UNCONFIRMED → NEW
Ever confirmed: true
The "illegal character" error is occurring on the last line of
the file, somewhere after the last closing brace "}". I've never
seen this type of problem before. 

Furthermore, when I save locally the file
  http://www.conradcom.de/sap/its/mimes/zprt_con_glb/99/script/bbpscript.js,
I can load it just fine in the JavaScript shell or in a local HTML page.

Therefore, let me reassign this to the Networking component.
Do your logs show what this character is? It looks like it might
be the last character in the bbpscript.js file -(?)

Also, cc'ing rginda for his Venkman expertise. Can I do more
in Venkman to see what the above getter/setter error is,
or what the illegal character is? 
Assignee: rogerl → darin
Component: JavaScript Engine → Networking: HTTP
QA Contact: pschwartau → tever
mass futuring of untargeted bugs
Target Milestone: --- → Future
I get the same error but SetOkCode is replaced with frmNota. frmNota is an HTML
form defined in the page http://www.infobae.com/interior/home.html, there is a
script tag in that page that source ../js/publico.js wherein is defined a
function called MostrarNota (To Show a News) that reference the form. This
function is called, assigning values to the form and submiting it when a link is
clicked.
The same behaviour is obtained, that is the new page with the news wanted is not
called, using Mozilla and netscape in linux and netscape in windows, the
MSexplorer in windows works ok.
I'm using Mozilla 1.0 Release Candidate 3 Mozilla/5.0 (X11; U; Linux i686;
en-US; rv:1.0rc3) Gecko/20020523
Sorry, the problem that I jast told is solved adding the word "document." (that
is the object from where the form was derivated) before the name of the form.
The explorer and Netscape 6 work like if "document." were there.
The SetOKCode() function that's failing (see top of this report) is in:
http://www.conradcom.de/sap/its/mimes/zprt_con_glb/99/script/bbpscript.js,
which had those "illegal character" errors above.

Because of these errors, the file is not loading properly, and so 
the SetOKCode() function never gets loaded. That's why it doesn't work
in Mozilla.

We still need to identify what the "illegal character" is, in order
to solve this bug -
*** Bug 150822 has been marked as a duplicate of this bug. ***
Update: The behaviour has changed a bit with the latest builds, that means the
error message has changed now. Also if I click on the search button, thus
triggering the broken function, the mozilla icon starts to spin for 1/10 sec and
then stops doing nothing. I made a wget on the file and noticed non-ASCII
characters on the end (approx. 4 lines of dots when viewed with editor).
Could someone make a hex dump of the file and scan for non-ASCII?
Probably the illegal character stop should be downgraded to a warning so that
execution can continue
A similar error occurs when usinf Windows XP. On www.ntlworld.com the top line
(Home, Chanels, Services, Help, Broadband) should give a drop down menu on a
mouseover. Instead nothing appears and the JavaScript Console gives an error -
OAS_RICH is not defined. It works fine using IE on a mac and a PC and using Opera.
-> back to javascript.

Unless I've overlooked something, HTTP is just going to stream data to
javascript. If JavaScript hickups, that is either an exception handling problem
for the engine, or a content problem w/ the web server.
Assignee: darin → general
Component: Networking: HTTP → JavaScript Engine
QA Contact: tever → pschwartau
-> default qa
QA Contact: pschwartau → general
Can't reproduce anymore.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.