473,385 Members | 1,806 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,385 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 2008
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.