...

View Full Version : urgent! isnt possible to access the text box in parent window?



CstAn
03-22-2006, 03:11 PM
i had created an site and allow the user to click and popup and window and perform some processing. after generated the result in the popup up window, i would like to changes the value in the parent window by using "getElementById" method.

isnt possible to do it??


i had created but it cant changes the window.
the following was what i had done:
first i load the js script pages in the window, and created a global variable and refer to the text box in the parent window.
in the popup window, i also include the js script pages.

i had check that i sucessful get the value from the process in the pop up window but i cant refer to the text box in the parent window by using the variable i had assign before.

pls help me.

liorean
03-22-2006, 03:21 PM
Please, post the code if you need help. It's probably an easy thing, but you're not giving us many debugging clues. Things such as knowing what code is running in what window.

CstAn
03-22-2006, 04:06 PM
the followinf was my coding:

in parent window:


$html->openTr();
$html->tag="td";$html->openTag();
$html->condition = "name = \"tutorialEndTimeGet_1\" id = \"tutorialEndTimeGet_1\" onFocus=\"this.blur();\" value = \"".time_period($tutorialEndTimeGet[$numOfUnit][$numOfLecture][$t][$as])."\" size = 8";
$html->type = "text";
$html->input();
$html->tag = "td";$html->closeTag();
$html->tag = "td";$html->openTag();
$html->getVenue("changeTime.php","".$totalRow."","Tutorial","".$tutorialStartTimeGet[$numOfUnit][$numOfLecture][$t][$as]."","".$tutorialEndTimeGet[$numOfUnit][$numOfLecture][$t][$as]."");
$html->tag="td";$html->closeTag();
$html->closeTr();


this will pop up an window.




this was the pop up window:



//i made some process in here and submit the result to other pages



the third pages:


//i get the result from the pop up window.
//and i would like assign to txt boc in parent window name as "tutorialEndTimeGet_1" by using javascript


three page are using different window. i had created a public variable when in the parent window that refer to the text box but when in the pop up window i the variable not refer to the text box, why?

liorean
03-22-2006, 04:17 PM
Ack, save me! Is that PHP (I see you have a .php in one of the file names in it...)? It looks kinda like PERL to me.

Anyway, do you think you could post the code that is sent to the browser (after server side processing) instead of the server side code? It's hard to see what's happening on the client side when I have no idea what the actual client side code generated by the server side code is. For example, I don't see any of the code opening or handling the popup, either on parent or popup page.

CstAn
03-22-2006, 04:26 PM
For example, I don't see any of the code opening or handling the popup, either on parent or popup page.

this was because i am using the Object oriented concept for my PHP coding.



$html->getVenue("changeTime.php","".$totalRow."","Tutorial","".$tutorialStartTimeGet[$numOfUnit][$numOfLecture][$t][$as]."","".$tutorialEndTimeGet[$numOfUnit][$numOfLecture][$t][$as]."");

here will pop up new window.

the pop up window will pass the value to the server and the third pages was to get the value of the pop up window. i would like to assign the value that i get in the third pages to the text box in the parent window.

for the pop up window just like the normal form.

the reason that i done this was because the parent consist a lot of variable that store particular value. if all pass to server will increase the loading time. . at here i just show u one of the part...

CstAn
03-22-2006, 04:28 PM
Anyway, do you think you could post the code that is sent to the browser (after server side processing) instead of the server side code?


is not possible rite?
i plan was not like that, i just want to assignt the value i get in the third pages and assign to the text box by using javascript.

CstAn
03-29-2006, 03:16 PM
y not body show me the guideline and help???

:(:(:(:(:(

pls help..thanks.....

Kor
03-29-2006, 09:08 PM
how the HTML code looks like after? (bring us the generated HTML code)

I have worked with php, so maybe I might find a solution... I hope...:rolleyes:

CstAn
03-31-2006, 12:30 PM
thanks to kor 1st, but i had found the solution already..

the following was my solution:


opener.document.getElementById('textBoxName').value;


by using this, you able to get the value of the text box in the parent window at the pop up window.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum