Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



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

Posts: 1
Name: Rick
Trades: 0
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
 
 
Register now for full access!
Old 10-17-2007, 04:45 PM Re: window.opener.form problem with Firefox
Junior Talker

Posts: 3
Name: Eric
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.62834 seconds with 12 queries