Reply
window.opener.form problem with Firefox
Old 07-06-2007, 12:08 PM window.opener.form problem with Firefox
Junior Talker

Posts: 1
Name: Rick
I am doing something very simple that works fine in IE but not Firefox.

I have a function that opens a popup. In the popup you choose a link. The popup then loads a new asp page with another set of links. You pick a link and the value of that link get passed to a form control on the opener.

function GetSelection(var){
window.opener.form.field.value = var]
window.close();
}

This works great in IE but Firefox just sits there and does nothing.

The link works on the onClick action.

<a href="javascript: void(0)" onClick="GetSelection(value);">link value</a>

Any ideas. Thanks
rknorc is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-17-2007, 03:45 PM Re: window.opener.form problem with Firefox
Junior Talker

Posts: 3
Name: Eric
function GetSelection(var){
window.opener.form.field.value = var]
window.close();
}

Wrong.
First of all, var is a keyword in javascript, so using a keyword as a variable name is a big nono. In fact, in my test code that I wrote to try to duplicate this problem, IE caught it and no javascript would work until I fixed the problem. So, if you are really using the keyword var as the name of a parameter to a function, don't. Bad idea.

"This works great in IE but Firefox just sits there and does nothing."

No, it doesn't work in IE. Maybe you have script debugging disabled or something, but if you are really using the keyword var as a parameter name, it doesn't work. Thats like using "if", "for", or "function" as a variable name.
PimpSleazy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to window.opener.form problem with Firefox
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13347 seconds with 12 queries