Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    148
    Thanks
    1
    Thanked 0 Times in 0 Posts

    urgent! isnt possible to access the text box in parent window?

    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.

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    Nov 2005
    Posts
    148
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #5
    Regular Coder
    Join Date
    Nov 2005
    Posts
    148
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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...

  • #6
    Regular Coder
    Join Date
    Nov 2005
    Posts
    148
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #7
    Regular Coder
    Join Date
    Nov 2005
    Posts
    148
    Thanks
    1
    Thanked 0 Times in 0 Posts
    y not body show me the guideline and help???



    pls help..thanks.....

  • #8
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    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...
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #9
    Regular Coder
    Join Date
    Nov 2005
    Posts
    148
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •