473,811 Members | 2,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2042
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.create TextNode
&& document.getEle mentById
&& (s = document.getEle mentById(id)) ){
while (s.firstChild) s.removeChild(s .firstChild);
s.appendChild(d ocument.createT extNode(txt));
}
}

</script>

<form action="">
<input type="file" id="fileName">
<input type="button" value="Show file path"
onclick="writeT ext('thePath', this.form.fileN ame.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
8407
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 submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the client side javacript code for form validation and client side editing capabilities in order to save...
5
3764
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 manner when i move it to Prod environment. Please have a look at the following code snippet... //Page name - Add.aspx private void Page_Load(object sender, System.EventArgs e)
2
3382
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 for the web site are held in a database and all the labels, buttons etc are populated at run time in the Page_Load handler. The retreval of the strings from the database is all
2
2246
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, both need to run some code and then redirect the user somewhere else. The problem is the redirected page is being displayed in the banner frame. How do I tell either Response.Redirect or Server.Transfer what frame to display the page in or that the...
4
2320
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 iframe. The iframe's src attribute references the 'y' webform.
3
1844
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 dynamically added textbox controls is saved to a database in the custom event handler. The custom event handler fires when the page posts back. I have a menu control which causes a postback, and the custom event handler then fires if a textbox...
1
6982
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 button (regardless of type: button, linkButton, imageButton) 3- (first) async call works fine 4 - click again to make second async call and somehow the page path becomes
1
9377
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 need to open the new page in the main page window with passing the two textbox parameters into the new page. Program opens the new page but dont know how to pass the two textboxes values into the new page name deceasedToday.asp Needs help in...
21
3965
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 will transfer child textbox data parent page text box. this is working fine when i use normal page(Not using master page on it). Parent page aspx: <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True"></asp:TextBox> <a href="#"...
0
9730
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10651
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4341
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.