link from other page (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


wizard_oz -> link from other page (7/18/2005 16:05:10)

Hi, I have a problem to send some data to another page for example:
<script language="javascript" src="../newwindow.js" type="text/javascript"></script>
<%
	name=Request.QueryString("name")
	category=Request.QueryString("category")
	Response.Write name & "<br>" & category & "<br>"
%>
<form action="addpic2db.asp" method="POST" name="Upload">
<table WIDTH="250" ALIGN="center" BORDER="1" CELLSPACING="1" CELLPADDING="1" cols=333>
	<tr> <td>
	<tr></tr>
	<!--<form name="Upload" method="POST" action="admin_users.asp">-->
		
		<td><input class="Input" type=text name=Upload Size=25 maxlength=25>
		<a href="javascript:%20MM_openBrWindow('upload.asp','','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=200')">
		<img src="../images/upload.gif" border=0 width="17" height="15"></a></td>
		<td align="right">file name</td>
	</tr>
	</table>
	<INPUT type="submit" value="Submit" id=submit1 name=submit1>
</form>

how can I get the data and transfer it to the next page?




dpf -> RE: link from other page (7/18/2005 16:07:11)

quote:

how can I get the data and transfer it to the next page?
what data are you trying to pass?




rdouglass -> RE: link from other page (7/18/2005 16:11:11)

Are you trying to upload a file and grab posted form data at the same time? AFAIK you can't do it - they have to be from 2 separate forms. At least I've never been able to do it.

My workaround has always been a 2-part form; 1 for text data and 1 for file uploads. If you find a better solution, please let me know 'cause I'd be very interested.




wizard_oz -> RE: link from other page (7/18/2005 16:19:52)

I have a page that the client fill in all the details and upload 1 picture when the client click submit it fill in a database (that I did), after that I would like to had more picture for the same person and I would like to use his name and category (category for example is woman,man etc.) and put the picture in his folder and fill in the database by the category name( i have some database:woman,man,youth etc.)




Spooky -> RE: link from other page (7/18/2005 16:22:38)

Rog - it can be done, however you need to modify all of your request.* code to use the methods provided for by the upload component




wizard_oz -> RE: link from other page (7/18/2005 16:24:09)

so how can I do it ? or what can I do?




Spooky -> RE: link from other page (7/18/2005 16:24:20)

Wiz - couldnt you just add the extra code to the popup window code?

'upload.asp?parameter=value¶meter2=value'




wizard_oz -> RE: link from other page (7/18/2005 16:28:05)

no I just checked and i need to use a form because i need to use the "input" method




Spooky -> RE: link from other page (7/18/2005 16:34:57)

What does the popup code do in your sample above?
Could you clarify a bit more what you want to do?




wizard_oz -> RE: link from other page (7/18/2005 16:37:09)

the popup code is for upload a file and after that it get written at the "input" so I can pass it to the next page and fill the database




Spooky -> RE: link from other page (7/18/2005 16:51:10)

So you would be using "name" and "category" as hidden fields in the form to pass that information to the next form?

Typically youll do that, or have a session variable set that identifies the user, so that the "update" SQL can be based on that unique info.




wizard_oz -> RE: link from other page (7/18/2005 16:54:21)

yes that what I need so I will able to use it to upload the picture to the same category I need




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625