473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Hidden value , popup , multiple form to upload file on same page

Fary4u
273 100+
Hi Guys

i'm trying to upload a file, i've tried 3 different methods but still not work out i don't know how to over come this problem

hidden file value, multiple form or popup uploading.

1-

[HTML]<SCRIPT TYPE="text/javascript">
function popupform(myform, windowname)
{
if (! window.focus)return true;
window.open('', windowname, 'height=200,width=400,scrollbars=yes');
myform.target=windowname;
return true;
}
</SCRIPT>

<body>
<!-- Action=upload.asp give you result back with file name which u uploaded. !-->
<FORM METHOD=POST ACTION="http://www.fastcomshosting.co.uk/click/upload.asp" onSubmit="popupform(this, 'join')">
<input type="file" name="fName" > <input type=submit value="Upload . ">
</FORM>
[/HTML]
other method i'm using is

2-

form within another form which is onchange method can upload inline frame by passing value for example.

[HTML]<FORM ACTION="http://www.fastcomshosting.co.uk/click/upload.asp" method=post enctype="multipart/form-data" name="form">
<div id=ComboExample><p>Please click a button</p></div>
<input type="file" name="fName" value="" size="50" onchange="document.getElementById('ComboExample'). innerHTML='&lt;iframe src=&quot;upload.asp&quot; width=&quot;100%&quot; height=&quot;100&quot; scrolling=&quot;no&quot; frameborder=&quot;no&quot;&gt;&lt;/iframe&gt;'">
</FORM>
[/HTML]
3rd method i've tried is to passing textbox value as file path into file for example

[HTML]<input type="hidden" value="c:\test.jpg" name=hid>
<input type="file" name="fName" value="document.formname.hid" style="display: none">
[/HTML]
there is no problem by passing value into value but type as a file it's not take the value.

if any thing else that generate result on the same page by passing value please let me know

Regards
Farhan Shahid
Jul 18 '07 #1
1 3542
acoder
16,027 Expert Mod 8TB
To upload a file without reloading/unloading the page, you need an iframe. See this thread.
Nov 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: 3A Web Hosting | last post by:
Hi Is it possible to perform multiple file uploads via a form? It's no problem uploading single files but I want to be able to highlight a group of files and upload them all in one go. My...
4
by: Magnus Blomberg | last post by:
Hello! I have a problem when using a hidden field to send a value to the server. Below you can see my code in simplyfied versions. What I'm trying to do is: 1. The user browses for a picture...
14
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
3
by: imrantbd | last post by:
I need array type name like "destList" must use for my destlist select box,not a single name.Or need a solution to capture multiple value of "destList" select box and send all selected value in php...
5
by: pbd22 | last post by:
hi. i have a hidden iframe for uploading files. when i check the httpfilecollection on the server, it is always zero - the files never make it to the server. i know all the javascript is working...
3
by: simora | last post by:
Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php...
3
by: cmo | last post by:
Well I hope I this isn't too nebulous of a problem. The problem I currently have is this: I have a button in a form that opens up a javascript/css poup that has an input field and two ahref links...
11
by: viki1967 | last post by:
Hidden field Hello my friends. This is a htm page that contains a form open in window popUp ( page daughter ). This form insert a value in the one hidden field called "tec", in other form...
4
by: virtualweb | last post by:
Not able to pass variables data: Hello .. Im building a form that uploads files with encType="multipart/form-data" but on the same form I need to pass other variables with hidden fields. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.