Manipulating a form

Get Help With All Aspects of Web Design & Design Software

Moderators: Moderator, Global Moderator

Post Reply
ner0
Hero Member
Hero Member
Posts: 982
Joined: Sat May 22, 2004 9:45 am

Manipulating a form

Post by ner0 »

Ok, heres the deal....
I have a form, which will be used to upload files to a server. I have my input box for the link to the uploaded file...
and I have a javascript popup window which is the actual uploader. once the uploading process is finished (this all works until this point) I have a links, which will be used to input the link to the input box on the form (in the parent window)... enough blabbering, heres my code:

Parent window (main form):

Code: Select all

<script LANGUAGE="javascript">
<!--

function win1() {
    window.open("uploader.php","UPLOADER","menubar=no,scrollbars=yes,width=400,height=300,toolbar=no");
}

//-->

<form name="upload1" action="uploader2.php" method="POST">
    <a href="javascript:win1()" onmouseover="self.status='Open the Uploader.'; return true;"><b>Click here to upload a file to the server.</b></a><br><br>
   Link to uploaded file <input type="text" name="link">
</form>
all this form works fine, and the uploader opens no problem...

now heres the code for the final page of the uploader:

Code: Select all

<script language="javascript">
	function seturl(url) {
  opener.document.form.fontlink.value = url;
	}
</script>

$seturl = "javascript:seturl('" . $thelink . "')";
echo "<a href=\"$seturl\">Click Here to place this URL in the Download URL field.</a><br>";

obviously theres more code in these, ie. to define the variabled etc. but I know all of that is working, its the java which is my problem, can anyone help this java n00b? /blum.gif' class='bbc_emoticon' alt=':P' />


Last edited by ner0 on Mon Aug 16, 2004 6:13 am, edited 1 time in total.
[color=\"green\"]'class KPIM::ProcessManager' only defines private constructors and has no friends[/color] <- :( poor class



[18:09:00] * ~Moppy stews ner0 erotically 1 times.
Scott
Administrator
Administrator
Posts: 1651
Joined: Sun Apr 25, 2004 6:08 am

Manipulating a form

Post by Scott »

Code: Select all

<script language="javascript">
	function seturl(url) {
  window.opener.document.<formname>.fontlink.value = url;
	}
</script>
Should work, I think...
ner0
Hero Member
Hero Member
Posts: 982
Joined: Sat May 22, 2004 9:45 am

Manipulating a form

Post by ner0 »

Works a charm /smile.gif' class='bbc_emoticon' alt=':)' /> ty buzzard /blum.gif' class='bbc_emoticon' alt=':P' />
[color=\"green\"]'class KPIM::ProcessManager' only defines private constructors and has no friends[/color] <- :( poor class



[18:09:00] * ~Moppy stews ner0 erotically 1 times.
Post Reply

Return to “Web Design Principles”