Safari on a MAC String Interpretation

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
paqman
Forum Contributor
Posts: 125
Joined: Sun Nov 14, 2004 7:41 pm
Location: Burnaby, BC, Canada

Safari on a MAC String Interpretation

Post by paqman »

Hey Guys,

A client of mine is using a Mac to access the website and is running into a problem I haven't seen before (doesn't help that I don't own a Mac)...

A piece of javascript which works fine on IE, FF, Safari on Windows is misbehaving on Safari on his Mac:

Code: Select all

var selected = document.getElementById("groups").value;
newCol.innerHTML += "<input type='hidden' name='groups[]' value='" + selected + "'>";
newCol gets inserted into the document and ends up being submitted. This value comes across just fine on my computer and virtual machines in all test cases (it's an integer) but on his computer the value of the hidden input is " + selected + ". All I can think is that javascript on his version of Safari isn't behaving properly - I've never seen something like this before.

I tried googling it but couldn't find the right keywords to describe the problem. Is it as simple as him updating his version of Safari? Has anyone run into this before?
Post Reply