javascript problem with IE
Joh,
I'm not good with Javascript but have some basic knowledge and experience. I have this code: Code:
function openEditBox(idLink) { I call this function like this: Code:
<a href="#" onClick="javascript:openEditBox(183)">a link of id 183</a> But IE is having trouble with it. IE is having trouble this line (invalid argument): Code:
var win = window.open("popup.php?cmd=modLink&idLink="+idLink, "Modify Link", "top="+y+",left="+x+",scrollbars=no,width="+width+",height="+height+",resizable=yes"); If I try to add just 1 variable, I get this error. It doesn't matter what variable I use, idLink, width,x, y, etc. Can somebody help me? What's the problem of IE? Firefox isn't giving me any error and works fine. Greetz, alitrix |
I dont know if it is the posting system parsing your code, but there appears to be something wrong with your quotes on that line. Do you want to double check that they are paired properly? The top argument is either missing, or has an additional quote, and the resizable one too.
Danny |
I didn't understand what u mean
I checked the code, there isn't anything missing. That's the only code that I have, if u mean that. Can u please specify me what u mean? Many tnx! |
Code:
resizable=yes" could be wrong, I'm probably no help on this one |
Alitrix,
I mean that it looks very much like you have mismatched your quotes on the line in particular. Count them up, and make sure you are opening, and closing the quotes stuff where it should be. That looks to me to probably be your problem. Danny |
Well, I counted them and it's all oke
And if it wasn't, then Firefox told me already (I guess?) @RijilV, There isn't anything wrong with that (if u mean the quotes part) |
The quotes are fine. Have you tried playing with the path to popup.php? Maybe put a / in front or something? Or even ./ or maybe full path with http?
Dunno just an idea. But the problem is with IE I think - the code looks fine. |
Well, I don't think that helps.
U see, if I gave it a wrong URL/file , then I would get a pop-up with a 404 inside of it. But instead of that I get a error (only in IE, FF doesn't have any trouble with it) So I don't think IE is looking to the path's, cause it isn't even opening a pop-up |
You don't have any popup blocking IE? Just a thought.
|
your script looks like you're writing the script like this:
message="y="20", x="20"" instead of using " try this: message="y='20', x='20'" |
All times are GMT -5. The time now is 04:14 PM. |