Norberto wrote: > Hi group my name is Norberto, i'm from Brazil and i'm newer here.I > have doubt in javascript.I need to pass the value in a pop up menu to > the parent window.I use the function window.opener but anything that i > am waiting happen.I use this code. > > > window.opener.document.getElementById(projectForm).getElementById(item_form).id.value=price; > Above cannot work. I think you mean something more like this. window.opener.document.getElementById(item_form).value = price;
(getElementById is only a property of the document object, and since your input have a unique id you dont need to use the form.) using name instead of id you could have written window.opener.document[projectForm][item_form].value = price; > This projectForm is the id of the form in my parent window and the > variable id is the id of the element that i like to substitute the > value in the parent window.This id is receiving for the function like > this > ProjectItemUnitCost_idfamilyidcostitem.When I click in the link in my > pop up window i call this function of the code above.I execute a > application and see the Mozilla's Error Code and have massage > projectForm has no properties. > > I think this happen because the parent window is ajax who generate a > table for choice something and the cake view don't have the element > form.Because the ajax table is displayed in projectForm in a div that > id is called item_custo.Does anybody can help me or know a solution to > solve this problem.Thank You. > > Now you got me confused ;-) > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
