473,287 Members | 3,319 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,287 software developers and data experts.

how to transfer textbox value from .net page to html page textbox?

My question is both .net and javascript and I thought it would be best
posted here.

I have a pop up html page (it just has to be html) with a textbox and a
button next to it. When the user clicks on the button an asp.net page
pops up which allows the user to upload a photo. The asp.net code then
puts the url of this photo into a textbox in the asp.net page. I now
want to be able to press a button and have the value from the asp.net
textbox transferred to the html textbox. Can you please show me how
with example code? I assume the code has to be in javascript?

I hope that's clear. I know you may be thinking why don't I do the
whole thing in .net but the html page has just loads of other things
and javascript on it and I can't really change it.

Thank you.

Feb 3 '06 #1
3 2005
Steve wrote:
My question is both .net and javascript and I thought it would be best
posted here.

I have a pop up html page (it just has to be html) with a textbox and a
button next to it. When the user clicks on the button an asp.net page
Once it leaves the server, it is HTML. ASP .NET is irrelevant after that.

pops up which allows the user to upload a photo. The asp.net code then
puts the url of this photo into a textbox in the asp.net page. I now
want to be able to press a button and have the value from the asp.net
textbox transferred to the html textbox. Can you please show me how
ASP is on the server, I guess you mean in the browser page.
with example code? I assume the code has to be in javascript?


<script type="text/javascript">

function writeText(id, txt)
{
var s;
if ( document.createTextNode
&& document.getElementById
&& (s = document.getElementById(id)) ){
while (s.firstChild) s.removeChild(s.firstChild);
s.appendChild(document.createTextNode(txt));
}
}

</script>

<form action="">
<input type="file" id="fileName">
<input type="button" value="Show file path"
onclick="writeText('thePath', this.form.fileName.value);">
</form>
<div>Here is the filename and path: <span id="thePath"></span></div>
[...]
--
Rob
Feb 3 '06 #2
Thank you for the replies Rob and Lee. I will try out the suggestions.
Thank you for taking the time to point me in the right direction.

Feb 4 '06 #3
Thank you for your help guys, I got that bit to work.

Feb 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
5
by: Nedu N | last post by:
Hi All, I am facing a typical problem in my .NET application with the pop-up script messages. The thing is that its working fine when i run on my development machine but not running in expected...
2
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings...
2
by: Chris Podmore | last post by:
This is driving me mad so any help will be much appreciated. I have an html page with 3 frames, banner, left and right. The banner frames source is an aspx page. The aspx page has two buttons,...
4
by: ewolfman | last post by:
Hi, This may sound a little complicated, but here goes: I have 2 webforms (lets call them 'x' and 'y'). * - 'x' is a form which contains a single server side TextBox web control, and an...
3
by: bill | last post by:
I am using VS2005 to build a web form dynamically. I'm using AddHandler to connect a custom event handler to the TextChanged event of dynamically added textbox controls. Data entered in the...
1
by: Rachel | last post by:
We recently upgraded to ASP.NET 2 AJAX Beta 2 an since we are encountering the following problem: STEPS: 1- navigate to a page containing a UpdatePanel using SERVER.TRANSFER 2- click on a...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
21
by: imtmub | last post by:
I have two page one is parent and child. Parent page has text field and command button. The Link button open a child page as a popup. Child page as Text box and Button. when i click the button it...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.