User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 374,580 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,426 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

JavaScript's window.opener

Join Date: Apr 2005
Posts: 1
Reputation: manou is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
manou manou is offline Offline
Newbie Poster

Re: JavaScript's window.opener

  #3  
Apr 25th, 2005
hi, i have the same problem as you, but i don't understand how do you fix it.
This works fine with firefox, but not in IE that is where has to work (political bussiness

I post here my problem...

/function that opens the new window
function openFaqList() {
for (i=0; i<document.sendFaq.isbooked.length;i++) {
if (document.sendFaq.isbooked[i].checked && document.sendFaq.isbooked[i].value=='yes')
WindowObjectReference = window.open("faqList.asp?booked=1","FAQ","width=420,height=230,resizable,scrollbars=yes,status=0");
if (document.sendFaq.isbooked[i].checked && document.sendFaq.isbooked[i].value=='no')
WindowObjectReference = window.open("faqList.asp?booked=0","FAQ","width=420,height=230,resizable,scrollbars=yes,status=0");
}
}

... html code ...
--> here the function is called
<a href="javascript:openFaqList()" class="faq-link-2">[Select]</a>
... html code ...


==> code for the new window opened
(javascript section)
var listaFAQs="";
var i;
for (i=0;i<document.selectFAQ.elements.length;i++)
if (document.selectFAQ.elements[i].type == 'checkbox') //comprobamos que el objeto es un checkbox
if (document.selectFAQ.elements[i].checked) // introducimos en un vector las FAQs seleccionadas
if (listaFAQs == "") {
listaFAQs=listaFAQs+document.selectFAQ.elements[i].name;
}
else {
listaFAQs=listaFAQs+","+document.selectFAQ.elements[i].name;
}
// pagina que tratara los datos
alert(listaFAQs);
opener.document.forms[0].action="customer_support.asp?vengode=popup&selectedfaqs="+listaFAQs;
opener.document.forms[0].submit();
// se cierra la ventana
window.close();

...
==> here we want to go back to the parent window with the selection done in this window
response.write("<form name=selectFAQ action='javascript:faq2send_selected();' method='post'>")
cont=1
rs.MoveFirst

while not rs.eof
response.write("<input type='checkbox' value='" & rs("faq_id") & "' name='checkbox_"& rs("faq_id") &"'>"&cont&". "&rs("title_en")&"<br>")
rs.movenext
cont=cont+1
wend
response.write("<INPUT TYPE=SUBMIT VALUE='Hecho'></form>")
...


Thanks !!!
Reply With Quote  
All times are GMT -4. The time now is 6:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC