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 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Javascript popup variable

    Hi,

    I have a small script that opens a small popup in which to populate a form. What I want to do is include a variable so that a particular PHP page opens. I include where I am at present:

    HTML page calling JS popup:
    <input type="text" name="DOCUMENTS" id="DOCUMENTS" onclick="makeSelection(this.form, 'DOCUMENTS');">

    JS Code:
    targetElement = null;
    function makeSelection(myform, id) {
    if(!myform || !id)
    return;
    targetElement = myform.elements[id];
    var handle = window.open("../file_upload.php?dir=CODE",
    "mywindow","menubar=0,resizable=0,width=400,height=250");
    }


    What I want to be able to do is get it so that the bit of JS that has 'dir=CODE' has a variable called from the HTML page. Is this possible, and if so, could anyone please help me out?

    Regards,
    Neil

  • #2
    Regular Coder
    Join Date
    May 2008
    Posts
    119
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Actually guys - I have found a different workaround to this, so please ignore.

    Thanks,
    Neil


  •  

    Posting Permissions

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