473,387 Members | 1,673 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,387 software developers and data experts.

form.submit not working with master pages

Hi ,

i'm using following code to submit a page

function onClose()
{
alert("Closing . . . ");
var myHiddenField = document.getElementById('HiddenField1');
myHiddenField.value = "True";

document.form1.submit();
alert("Submited . . . ");
}


<body onunload="onClose()" >

this works fine with single page but when i use it in asp.net 2.0 Master Page the page doesn't submit at all

Basically i want to execute some code if browser window is closed


Any solutions
Jun 15 '07 #1
0 1132

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: smilemaster | last post by:
I have recently started experiencing form data loss. Here is an example: ====test_form1.php==== <form method="POST" action="test_form2.php"> <input name="textboxvalue" type="text" size="20">...
6
by: Jeff Dunnett | last post by:
Hello, I have written the following HTML Form: <html><head><title>Survey</title></head> <body bgcolor="black" text="white" link="#f6b580" vlink="#c0c0ff"> <img src="logo.gif" width="324"...
1
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your...
2
by: Paul | last post by:
Hello: I am struggling with something that would seem to be very easy. I am using a master page. On the content page (which includes the master page), I have a form with a submit input type...
4
by: Tim Mackey | last post by:
hi, asp.net 2. can anyone explain why this code does not work in firefox (2.0.0.1), but does work in IE 7. if you hit enter after typing something into the textbox, it should fire the Submit...
1
by: MonkeeX | last post by:
I am currently converting my web site to include master pages. I have an image which when clicked on submits the form by using form.submit in javascript. As the form not longer exists in an...
5
by: LamSoft | last post by:
I've got some problem on some form submit problem. In a master page, there is a form tag with the "runat=server" attribute, and a ID called "myForm". In the contentPlaceHolder under that...
2
by: daveh551 | last post by:
I'm a little confused about something. I have a "Contact Us" page that I'm developing that runs within a content page under a master page. I was plagiarizing fairly liberally from some other...
0
Thekid
by: Thekid | last post by:
I'm trying to auto send a form submission to a website but it isn't working. I've done this before and it worked but for some reason, using the same basic code, it doesn't seem to submit it. I'm...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.