Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loop<arguments.length; invalid character ?? help 1

Status
Not open for further replies.

girlinterrupted24

Programmer
Nov 16, 2005
35
ES
Hey guys...

I am getting this error

Un nombre contenía un carácter no válido. Error al procesar

Which I think means something like "The name contained a non-valid character"

for (var loop=0; loop<arguments.length; loop++) {
---------------------------------------^

What could cause this error -- helpppp

The whole code is :

function Refresher(pic1,pic2,pic3,pic4,pic5,pic6,pic7,pic8,pic9,pic10,pic11,pic12,pic13,pic14,pic15,pic16,pic17,pic18,pic19,pic20) {

for (var loop=0; loop<arguments.length; loop++) {
if (arguments[loop] != '') {
// document.images['pic' + (loop+1)].src = '../images/property' + arguments[loop] + '?randomParam=' + new Date().getTime();
document.images['pic' + (loop+1)].src = '../images/property' + arguments[loop] + '?' + new Date().getTime();
}
}
}

Your help would be so much appreciated... this error only happens very rarely tooo...... So I dont know what throws it!!
 
You've got it. And to make things even tidier, you can replace this:

Code:
function Refresher(pic1,pic2,pic3,pic4,pic5,pic6,pic7,pic8,pic9,pic10,pic11,pic12,pic13,pic14,pic15,pic16,pic17,pic18,pic19,pic20) {

with this:

Code:
function Refresher() {

as you're querying arguments directly.

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Another thought!!!! The user said they were using the exact same computer when they successfully added a property with while I was on the telephone as the one they used when they kept hitting the error!!!

Now how would that make sense?? hmmm....... Either way - like I say the javascript would never stop the saving of the pictures OR saving the data to the database - so even if it was something else... the error checker you have added for me, this would catch the error that stops the "Save Property" anyway - right? So this would solve it either way?

Thanks again.. ..... and sorry to go on!!
 
I'd certainly get the user to re-test the new solution (making sure they have cleared their browser cache first, of course!). If it passes OK for them a few times, then I'd say the problem has been fixed.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Sounds like you could get a job working support, Dan! Well done on following this through to the very end... another example where many of us would likely have given up.

Have a star from me in appreciation of your effort.

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]

What is Javascript? faq216-6094
 
Thanks, Jeff!

I'd like to know if the arguments.length fix solved the client's problem - and whether they were using a version of IE prior to v5.5.

Tonya - can you shed any light on these?

Dan
 
stange of strange!! :(

The error is still there!!!!!! I cant believe it! I have now started to think that although the error is saying the Javascript... that it must be something else...... ??

Maybe some of the form data... although I dont know why it is not displaying a normal error - and is stating this XML and Javascript error... Do you think this could be the case?

If so.......... what kind of strange input / character could cause this? The only character I ensure is obviously never added is ' is there any other input I should watch out for?

This is a head banger!! As Jeff said thank you so much Dan for all your help... it is so much appreciated...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top