...

View Full Version : Javascript popup variable



howard-moore
07-14-2010, 02:20 PM
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

howard-moore
07-14-2010, 07:26 PM
Actually guys - I have found a different workaround to this, so please ignore.

Thanks,
Neil



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum