473,626 Members | 3,285 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to retrive value of textbox assined in page UNLOADevent in javascript....

Hi,
i have created a web application in vb.net.
i have assigned a value to the textbox during page UNLOAD event as below..
.........
Protected Sub Page_Unload(ByV al sender As Object, ByVal e As System.EventArg s) Handles Me.Unload

txtPopConfirm.T ext = intCountAnswer1

End Sub

..............
I need to retrive value of textbox(txtPopC onfirm) assigned in page UNLOAD event in javascript.
i have called the script code in the .aspx page as

<body style="width: 825px; height: 1024px" onunload= "Alertmessage() ">

and the script is...

function Alertmessage()
{
var ans = document.frmPop upidentity.txtP opConfirm.value ;
if (ans == 'False')
{
//alert message
}
}
problem:
if the value of txtPopConfirm is assigned as true in page unload event, but in the script it is retrived as false.

plz provide me the solution...

thz,
abirami

Jun 27 '08 #1
1 1880
On May 22, 1:14 pm, abirami elango wrote:
I need to retrive value of textbox(txtPopC onfirm) assigned in page UNLOAD event in javascript.
The Unload event happens after the page has been rendered out to the
client, so there's no way of getting the value in a client side
script.
Set the value in the Init, Load or PreRender event handler instead.
Jun 27 '08 #2

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

Similar topics

4
1823
by: Zhang Weiwu | last post by:
This is really very stange. I have a form like this: <form id="form_A"> xxxx </form> This form is on one page in a page of a web application, it is the only form on that page. on the end of the page in javascript: document.getElementById("form_A").submit(); In the begining it works very well, after I restarted the browser and did some small modification (I don't recall, but far from chaning that
8
7392
by: Sergei | last post by:
Hi, I am displaying modal dialog and passing values from the main form to the modal dialog and back. It works fine but if I used the following syntax on Page_Load(just for testing) in VB to assign value form the object to text Box it gives error 'Object required' Dim strResponse As String strResponse = strResponse & "<script language=""JavaScript"">" & vbCrLf strResponse = strResponse & "var aForm; " & vbCrLf
3
1403
by: epigram | last post by:
I've tried asking this question several times and have received many good answers, but ones that don't quite answer my question. This leads me to believe that I am trying to do something very awkward or I don't know how to pose the question correctly. Let me try again. I appreciate any input! :-) I have an asp.net web form with a TextBox control and a submit button. The TextBox control's text property is set on the server before it...
3
2030
by: Steve | last post by:
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...
0
2151
by: weiwei | last post by:
Hi here is my scenario, I create a drop down list in itemtemplate.(that drop down is created from db), after user click edit command, my ideal plan is have another drop down list in edititemtemplate with preselected value from the previous drop down list, so far I can only achieved with the regular drop down list in edititemtemplate with no preselected value from previous one. anyone can help me. thanks in advance. below is my current...
0
1531
by: varaprasad204 | last post by:
hai all..., i used to store my mp3 file into database by <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %> <%@ import Namespace="System.IO" %> <%@ import Namespace="System.Data.SqlClient" %> <%@ import Namespace="System.Drawing.Imaging" %> <%@ import Namespace="System.Drawing" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Web.UI.WebControls" %> <script...
2
1898
idsanjeev
by: idsanjeev | last post by:
hello how can retrive the input text after submit button pressed and report a error message. i wants to post topic and if any error message is occured then retrive the inputed text but it forget its <%@ Language=VBScript%> <%Option Explicit If Request.Cookies("userid") = "" Then Response.Redirect "login.asp" Else Dim R, page,vopenflg Dim vlaunchby,i,vcount
1
1637
by: ganesh22 | last post by:
Hi, Here the below code is for dynamically creating textboxs, its creating fine but after user enters some values in textboxs how can i retrive that values? using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
10
21525
by: pt36 | last post by:
Hi I have a page with a form and a textbox. before to submit the form I want to chek if the inserted value in the textbox is already present in a database. So I need to pass the textbox value by a javascript link to another page to check. my code is <a href="javascript:location.href='page_check.php' "Go check </a> and this work and open page_check.php
0
8262
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
8637
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...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
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
6122
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
5571
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
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2623
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

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.