Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    JavaScript


Javascript Error On Mac With Safari Browser

I have some very strange problem on the Mac (OS-X) with the Safari
browser 1.0 (v85). Some information in my form was not filled in...
after I turned on debugging and checked the console it displayed some
error messages.

The messages displayed were like:

(event handler): value undefined (result of expression trim) is not
object. Cannot be called.

I have no idea what this means!!! Does anyone know where to find the
solution for this problem? The page works fine on Windows with IE (and
probably some more browsers).

The trim function is located in an exteral javascript file which is
referenced in the head of the html. Code:

View 1 Replies (Posted: July 20th, 2005)

Sponsored Links:

Related Forum Messages For JavaScript category:
Javascript And Safari Browser
I am simply trying to set a field value on a form.

e.g. document.form1.stockLevel.value = 99;

This works on all browsers PC & Mac, with the exception of Safari browser on a MAC.

Tried all alternatives:

document.all.stockLevel.value = 99;
document.forms['form1'].stocklevel.value = 99;
.......etc etc

None of these work on the damn safari browser.

Anyone any ideas?

Posted: Jul 21, 2005, 04:04

View 1 Replies!   View Related
Safari Extension Safari Application Error?
I'm making an extension for safari I created a context item with command = showNote

In debugger I get the follwing error TypeError: Result of expression 'safari.application' [undefined] is not an object on line 8(the last line)are there any things you need to include or call before this works?


function showNote(event){
if(event.command == "showNote"){
addElement = document.createElement('<div id="safExtNote"><textarea id="safExtNoteText"></textarea><button[code]....

Posted: Jun 20 10 at 9:06

View 1 Replies!   View Related
Redirect If Browser And Browser Version Is Safari 4 Or Newer
I need a script that will redirect to a specific page is the browser is safari version 4. if the browser is NOT safari 4 I want the browser to stay on the current page.

Posted: 05-31-2010, 11:05 PM

View 3 Replies!   View Related
Safari Javascript Problem
I have a small Javascript problem with that mutch love web browser
safari, I tested the code on all other browsers PC (Win) and Linux and
IE on the mac and it seams to work ok, but for some reason it will not
work with safari.

function domywindows() {
mywondows ='writeme.html','TellAFriend','width=45 0,height=600');
mywondows.document.write("Working Please Wait........")
mywondows.document.write("<form method='post' name='myform'
action='sendm.php' target='_self'>");
mywondows.document.write("<input type='hidden' name='urlis' value='" +
window.location + "?osadcampaign=tf'>");
mywondows.document.write("<input type='hidden' name='productname'
value ='" + productname +"'>");

Any one any ideas how i can make this mac compatable.

Posted: October 17th, 2006

View 2 Replies!   View Related
Javascript Not Working In Safari (on MAC)
Im using Javascript to expand a unordered list menu and it works on my pc in the latest versions of Opera, Safari, Firefox and IE. But i have been told that the buttons do not work in Safari on a MAC. It does however work in IE on a MAC.

Is there a difference between the way Safari on a MAC would read the code? Code:

Posted: 08-15-2007, 01:27 PM

View 1 Replies!   View Related
Convert Javascript For IE To NS And Safari
Anyone have any tips on a good site with a few pointers on how to convert javascript working on IE to work with NS and Safari. For example, this code doesn't work on Safari but on IE and I have no idea why:

Posted: Aug 11, 2004, 06:26

View 1 Replies!   View Related
JavaScript And RegEx Not Working On Safari...
I am using Regular Expressions and Javascript to validate a form,
specifically I want to make sure that if they try to upload a file that
it has a proper name w/ certain extensions (doc,pdf, rtf). The script
works on IE and Mozilla but fails on Safari on the MacOSX. Here is my

// ok files with proper extension
var reOKFiles = /^([a-zA-Z].*|[1-9].*).(doc|DOC|pdf|PDF|rtf|RTF)$/;

//where i check for the file...
if(window.document.myForm.myDocument.value != ""){
var fileStr = window.document.myForm.myDocument.value;
alert("Please try again, you tried to upload an invalid file type
for CRITERIA 1");
return (false);

Posted: March 30th, 2006

View 6 Replies!   View Related
Hidden Control's Value Is Not Showing In Javascript On MAC Safari
I'm using input hidden control's value in the javascript function.

same code is working fine on all other browser except a specific
version of safari(i.e.: MAC OS 10.3.7 and Safari 1.2.4).

control's value is not getting displaying at the first time
when the page gets load, although the same piece of code would work if
I just refresh the page, strage.

declaration of hidden control:
<INPUT id="hSliders" type="hidden" runat="server">

javascript code which is calling the value of hSliders:


this alert is showing nothing although it should display string.

i check the view source also control's value is getting populated.

Posted: September 7th, 2005

View 1 Replies!   View Related
Safari Read/write Cookies With Javascript?
I am using a standard javascript that I downloaded from to read from and fill in a form using cookies.
The page tests well in every browser except Apple's Safari (from

Unfortunately, my clients daughter uses Safari so I have to get it to
work with it, even though most of his clients use IE.

What do I need to do to change the code so this will all work in
Safari? Code:

Posted: July 20th, 2005

View 1 Replies!   View Related
Safari - JavaScript Frames/Links Issue
I have a DHTML Folder Tree, also known as a TreeView. That is, an expandable/collapsible tree of links. In a frame-less layout everything works great. In a frame-based layout, it doesn't work on Safari/Konqueror.

There are two frames: the left frame contains the tree control; when you click on a link in the tree, the right frame is the target for the links in the tree.

The tree mechanism itself works fine. But there is a problem with the links. What happens on Safari/Konqueror with the frame-based layout is the first link works fine, but all links after that do not. That is, the first click loads a picture on the right frame, but when I click on any other links after that, the target frame is not updated.

Posted: Oct 10, 2006, 22:40

View 7 Replies!   View Related
Error - Page Not Showing In Safari Nor Chrome
Its showing perfectly in FF but its not displaying the main content on chrome nor safari.

im not a developer but i enjoy the time i spend figuring out this kinda stuff.

Posted: 08-01-2011, 10:20 PM

View 2 Replies!   View Related
CSS Does Not Apply Only On Safari Browser
On the current web application, that I am working, I notice that the CSS does not apply to only one page on the website on the SAFARI browser. This is not the case with the other browsers.

Posted: Nov 12 10 at 7:50

View 1 Replies!   View Related
How To Detect Only Safari Browser
How to detect Safari browser using JavaScript? I have tried code below and it detects not only Safari but also Chrome browser.

function IsSafari() {
return false;
var is_safari = navigator.userAgent.toLowerCase().indexOf('safari/') > -1;
if (is_safari){
return true;
return false;

Posted: Oct 30 at 10:42

View 1 Replies!   View Related
Script Works In Safari, Firefox, Chrome But Error's In IE8?
If you select a Training Event from the menu - "Submit This Record" will appear - click on it. Three alerts should come up - the first two showing data elements (normally not there but I needed to replace some code for this demonstration as the "real" page interacts with my live database), and the last saying "data submitted". In Safari, Firefox and Chrome these all work fine but in IE8 (Explorer) it gives an error on page error ...

If you click on the Volunteer Events radio button, an alert show ups that shows some more data elements (again normally not there), then select a Volunteer Event from the drop down list, make selections from any drop down lists that then appear after that until finally several other form items appear. You must enter a date, and at least one entry from the "Volunteer Activity Itemized Times" drop down menus before you click on "Submit This Record" - the same three alerts should come up - and like the Training Event, everything works except on IE8. (could be that this is also a problem in versions lower than IE8 but I don't have access to a machine that runs Windows (I am a MAC user).So if anyone out there is running IE8, I would appreciate if you could put this app thru it's paces and when you get the error - shed some light as to what is not right in the Explorer world that the rest of the world is OK with

Posted: 03-09-2011, 08:33 PM

View 8 Replies!   View Related
Jquery :: Find Input:hidden Error In Safari?
I'm trying to implement a feature where a user can click on a row i.e., <tr>, and it'll go to a specific URL.Here's my HTML and Jquery code:

<input class="threadid_c" id="threadID" name="threadID" type="hidden"


Posted: Dec 2 10 at 18:00

View 1 Replies!   View Related
Safari 5 Extension XMLHttpRequest Error: INVALID_STATE_ERR: DOM Exception 11?
I am experimenting with the new Safari 5 extensions JS API and I am having an issue right from the ground up, I want to use an XMLHttpRequest to get an RSS feed from a website however upon the .send() it immediatly kicks off errors:

Failed to load resource: cancelled Then looking at the XMLHttpRequest object is says in status: Error: INVALID_STATE_ERR: DOM Exception 11 I don't know why but this is my code, I hope I can get some advice as to whats going wrong:

var xml = new XMLHttpRequest();'GET', '');

Posted: Jun 14 10 at 22:41

View 3 Replies!   View Related
Handling HTML SELECT Options With Event Delegation To Javascript On IPhone Safari?
We are developing a web application with GUI customized to use on iPhone. A page on the app has 3 subsequent SELECT dropdowns, where selection of an option from 1st dropdown derives the options for 2nd dropdown, and so forth. The subsequent dropdown options are populated by javascript based on onchange event on previous dropdown. The problem is that, on iPhone the options for a SELECT appears with 'prev' and 'next' links to move to previous and next control. When the 'next' link is clicked, then the control moves to next SELECT and displays the options. The javascript is triggered by onchange event for previous SELECT and populates the options for next SELECT. But on dropdown for 2nd SELECT displays the previous options before it is repopulated by the javascript. Is there a workaround or event that can sequence execution of javascript and then selection of next control? Is there any event that can be triggered when a SELECT option is selected and before control leaves the SELECT element? Is there a handle for Next and Previous links for SELECT dropdown option display?

Posted: Oct 6 10 at 23:12

View 2 Replies!   View Related
Internet Explorer - Hide/Unhide Div JavaScript Functions Not Working In IE, Safari, And Chrome?
I am trying to cause a div (which contains a table) to hide based on a users selection from a dropdown. It works fine in FireFox and Opera, but IE, Safari, and Chrome do not work.

.hidden { display: none; }
.unhidden { display: block; }[code].....

Posted: Aug 24 10 at 2:22

View 1 Replies!   View Related
Force A Browser Refresh But Only For Safari On OS X?
Is there any way to force a browser to refresh or empty it's cache, but only if that browser is Safari? I have a flash file that works in every browser except Safari. But if I empty the cache in Safari it works.

Posted: Mar 12 10 at 3:51

View 2 Replies!   View Related
Jquery :: Callback - Fails In Mobile Safari - Parse Error
So here is the code I have: $.getJSON("" + lat + "," + lng + "&callback=?", function(data) {alert(data);}; and it's working fine in chrome and safari... but fails in mobile safari. Here is the error i'm getting:,-104.(removed for space)&callback=jsonp1302553994489 SyntaxError: Parse error

Posted: Apr 11 at 20:37

View 2 Replies!   View Related
Internet Explorer - IE - But Not FF - Chrome Or Safari - 'class' Undefined Error
I'm getting tired of trying to debug in IE 7, It won't let me install IE8 because I'm running vista. [URL]
The main issue seems to be the 'class' undefined error.

Posted: Jun 5 at 18:06

View 2 Replies!   View Related
Error Handling - Wrap A Try / Catch Around The Opening Of A URL In Mobile Safari?
Can I wrap a try/catch around the opening of a URL in mobile safari? I know the question has been asked a number of different ways but essentially what I'm after is the trapping of bad URLs or the detection of when a specific URL cannot be opened by the browser.

Posted: Aug 5 10 at 13:31

View 1 Replies!   View Related
Safari Browser Disable Control + Click
I would like to disable the ability of the user hold control and click
and get the dropdown menu. I am ultimately discouraging users from
easily getting a copy of the image. I was able to do this and disable
dragging on all browsers I have tested except Safari (Mac).

Posted: July 23rd, 2005

View 5 Replies!   View Related
Way To Detect Interaction With Browser UI Within Mobile Safari
Is anyone aware of a way with JS to detect interaction with the native UI in mobile safari. An example event would be a click on the URL bar or the bookmarks icon. I'd like to be able to trigger a change on the page with JS on these events.

Posted: Jul 29 11 at 19:01

View 1 Replies!   View Related
Copyright 2005-08, All rights reserved