|
Posted by Steve on 11/18/71 11:42
"d" <d@example.com> wrote in
news:MQVRf.36328$wl.22600@text.news.blueyonder.co.uk:
> "Steve" <stuck@need_help.co.uk> wrote in message
> news:Xns97877EA21852Csjoinesntlworldcom@195.92.193.157...
>> Hi,
>>
>> I currently have a problem passing a variable value from one page to
>> another. Once a form submit button is pressed java pops up a window
>> and displays some information. The problem being is variables value
>> needs to be passed from the main page to this popup window ... but it
>> isn't. why?
>>
>>
>> the submit button one the PHP page is
>>
>> $s_download_action = "index.$phpEx?page=downloads";
>>
>> $download_url = "download.$phpEx";
>>
>> $hidden_download_vars = '<input type="hidden" name="download_id"
>> value="' . $d_id . '" />';
>> $u_download = "<input type=\"submit\" name=\"get_download\" value=\""
>> . $lang['Download'] . "\" class=\"mainoption\"
>> onClick=\"window.open('" . $download_url . "', '_spdownload',
>> 'HEIGHT=250,resizable=yes,WIDTH= 400');return false;\" />";
>>
>>
>> echo '<form action="' . $s_download_action . '" method="post">';
>> echo $hidden_download_vars . '' . $u_download;
>> echo '</form>';
>
> Your form is not actually submitting anything. The submit button is
> returning false, which will cancel the form being submitted anywhere.
> You could replace the submit with a button, have that create a new
> window, have the new window (once loaded) call the opening document,
> and submit the form to itself. You can specify a name for the window
> in the javascript that creates it, and you can specify a "target" in
> your <form>. It's messy, but will have you submitting to a pop-up
> box.
>
> Posting to a pop-up box seems somewhat dirty. :-P
>
>
>
I see your point about being dirty! but its only a confirmation window
once the download button is pressed. basically its just saying "The
requested file 'blahblahblah.zip' will download in the next 3 seconds.
might look at onther way instead ... but thanks anyway.
[Back to original message]
|