473,394 Members | 1,887 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,394 software developers and data experts.

Safari crashes while executing JavaScript!

Our team have extracted code sample that caused abnormal Safari
termination. The crash seems to happen any time, when user selects an
option and closes alert popup. The version of Safari is 10.4.6.

Source code of html:

<html>
<body>

<div id='popup'>
<select size="10"
onchange="document.getElementById('popup').style.d isplay = 'none';
alert('aaa');">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</div>

</body>
</html>

Apr 17 '06 #1
4 2314
mr*********@gmail.com wrote:
Our team have extracted code sample that caused abnormal Safari
termination. The crash seems to happen any time, when user selects an
option and closes alert popup. The version of Safari is 10.4.6.

Source code of html:

<html>
<body>

<div id='popup'>
<select size="10"
onchange="document.getElementById('popup').style.d isplay = 'none';
alert('aaa');">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</div>

</body>
</html>


Not in a position to test on Safari, but I would guess that it's trying
to resume execution from a point that has become unreadable or
otherwise inacessible. If you must use silly screen effects like that,
it may help to save the value of the select before hiding it:

<script type='text/javascript'>
function myFunc(v)
{
document.getElementById('popup').style.display = 'none'

//alert here or do something useful with 'v'
}
</script>

<div id='popup'>
<select size="10"
onchange="myFunc(this.options[this.selectedIndex].text)">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</div>

Apr 17 '06 #2
Guys, remember that JS is a client-side function, so what induces you to
think that Safari is the culprit here?. If you haven't already tried it,
I'd try a different browser on that html to see if the pblm travels or not.

AS
<mr*********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Our team have extracted code sample that caused abnormal Safari
termination. The crash seems to happen any time, when user selects an
option and closes alert popup. The version of Safari is 10.4.6.

Source code of html:

<html>
<body>

<div id='popup'>
<select size="10"
onchange="document.getElementById('popup').style.d isplay = 'none';
alert('aaa');">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</div>

</body>
</html>

Apr 17 '06 #3
Arnold Shore wrote:
Guys, remember that JS is a client-side function,
???
Javascript is NOT a client side function, but a language.

so what induces you to think that Safari is the culprit here?.
Because the JS makes the browser crash??
JS should never make a browser crash.
It can produces errors, complain, makes angry sounds, but not crash.
I think that is reason enough to ask for help.

If you haven't already tried it, I'd try a different browser on that html to see if the pblm travels or
not.
I say the question of OP still stands, even if it doesn't happen on other
browsers. At least it is (another) bug in Safari worth mentioning.

Regards,
Erwin Moller

AS
<mr*********@gmail.com> wrote in message
news:11**********************@j33g2000cwa.googlegr oups.com...
Our team have extracted code sample that caused abnormal Safari
termination. The crash seems to happen any time, when user selects an
option and closes alert popup. The version of Safari is 10.4.6.

Source code of html:

<html>
<body>

<div id='popup'>
<select size="10"
onchange="document.getElementById('popup').style.d isplay = 'none';
alert('aaa');">
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
</select>
</div>

</body>
</html>


Apr 17 '06 #4
mr*********@gmail.com wrote:
Our team have extracted code sample that caused abnormal Safari
termination. The crash seems to happen any time, when user selects an
option and closes alert popup. The version of Safari is 10.4.6.


Happens for me too, and in version 1.0.3 (Mac OS X 10.2) as well. I've
sent a bug report to Apple.
--
Rob
Apr 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bernard | last post by:
Hi, I am suddenly getting Safari script errors with the following user agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8 In a...
5
by: joaopedrogoncalves | last post by:
Hi, I want to load an external javascript file, get its results and stick them inside a <div> block. I also want to do this in several places on a web page. This way the browser doesn't have...
2
by: Lutz Ißler | last post by:
Hi all! I dymically replace the child nodes of a DIV element by image nodes. In IE and Firefox this works properly. In Safari it works properly, too - but only if the site is called locally, eg....
3
by: Joe Cox | last post by:
I am having a problem with style properties for dynamic images in Mac OS X Safari. By dymanic images, I mean images allocated with the javascript 'new Image()' call. With static images (created...
34
by: Simon Wigzell | last post by:
document...focus() will scroll the form to move the specified text field into view on everything I have tried it with except Safari on the MAC. The form doesn't move. Any work around? Thanks.
6
by: robert | last post by:
I get python crashes and (in better cases) strange Python exceptions when (in most cases) importing and using cookielib lazy on demand in a thread. It is mainly with cookielib, but remember the...
2
by: justplain.kzn | last post by:
Hi, I have a table with dynamic html that contains drop down select lists and readonly text boxes. Dynamic calculations are done on change of a value in one of the drop down select lists. ...
7
by: Tom | last post by:
I have an oo-type javascript program running perfectly on IE 6.0+, FF 1.5+, and Opera 7+ on Windows 98+, Linux (RH 9, FC 6), and Mac OS X. 4. As usual, the Safari browser is not working correctly,...
11
by: Stevo | last post by:
I've been using the unload event for a long time. I have this code, which I've abstracted and made into a stripped down simple test case below, and it works fine on the major browsers (IE5+,...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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...

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.