473,498 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Are there really noone who knows this?!

I run the script below in IE6 under WinXP and it works very well. I do the
same with IE on a
Mac and it doesn't. I am unable to log in. I don't know exactly what is the
problem, but to me it seems like some characters are added to the
end of the password when it is returned to the program on a Mac. Also, when
I enter a
wrong username/password the alertbox telling me that this is the case
doesn't always display on the Mac.

Can anyone help please?

function checkLogin(form) {
loginData = [];
for (var e = 0; e < 2; e++) {
var el = form.elements[e];
if (el.value =="" || el.value == null) {
alert("Please enter " + el.name);
el.focus();
return false;
}
el.value = el.value.replace(/^\s+/, "");
el.value = el.value.replace(/\s+$/, "");
loginData[e] = el.value.toLowerCase();
}
var img = new Image();
var newWindow="";
//alert(loginData[0] + " " + loginData[1]);
img.onerror = function (evt) {
alert(Wrong username or password - please try again');
document.login.username.value = '';
document.login.password.value = '';
}
img.onload = function (evt) {
// alert('Valid login');
fileURL = loginData[0] + '/' + loginData[1] + '.htm'
newWindow = window.open(fileURL,"lydwin");
// location.href = fileURL;
window.close();
}
img.src = loginData[0] + '/' + loginData[1] + '.gif';
img = null;
//return newWindow;
}

Thanks!
iv**@tda.no


Jul 20 '05 #1
1 1471
JRS: In article <3f********@news.broadpark.no>, seen in
news:comp.lang.javascript, IVer Erling Årva <iv**@tda.no> posted at Fri,
4 Jul 2003 15:42:05 :-
I run the script below in IE6 under WinXP and it works very well. I do the
same with IE on a
Mac and it doesn't. I am unable to log in. I don't know exactly what is the
problem, but to me it seems like some characters are added to the
end of the password when it is returned to the program on a Mac. Also, when
I enter a
wrong username/password the alertbox telling me that this is the case
doesn't always display on the Mac.

Can anyone help please?

function checkLogin(form) {
loginData = [];
for (var e = 0; e < 2; e++) {
var el = form.elements[e];

Insert, at that point, test code something like

var S = ''
for (j=0; j<el.value; j++) S := ' ' + el.value.charCodeAt(j)
alert(S)

to see what el.value actually contains in the Mac.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.
Jul 20 '05 #2

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

Similar topics

72
5300
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
761
27990
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer...
9
1556
by: noone | last post by:
I have a database file that I use an autonumber field as the primary key index. Because of some rearrangements in the past, this index does not match the order that I would like it to be in, that...
11
2417
by: Mr. Berserker | last post by:
I was posting stuff to a mailing list when a friend, Prof. Corbessero and I came up with this one. Perhaps you can help resolve this, or add anything else worth knowing?? Maybe it should be added...
38
3271
by: Martin Marcher | last post by:
Hi, I've read several questions and often the answer was 'C knows nothing about .' So if C knows that little as some people say, what are the benefits, I mean do other languages know more...
7
1830
by: farseer | last post by:
Here is the scenario: I have an interface which defines get methods for data that will make up a row in a table. However, the source of this data may, over time, switch/change (The company may...
16
1630
by: CMM | last post by:
Is it me or has anyone noticed that F1 is really dumb in VS2005. Since VB3 I have been able to click F1 on an ambiguous method in code and the IDE automatically determines the type based on the...
2
2213
by: Michael Poirazi | last post by:
Hello I am trying to include some images in my applications resources. 1. Create New Item (Resource File) for my Project 2. Set the name to NetRes.resx 3. Add an image , set the name to Error (it...
0
7002
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
7165
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,...
1
6887
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
7379
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...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.