473,408 Members | 2,832 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,408 software developers and data experts.

Response.Write overrides my OnClick function

Hello all, i'm having a little problem while adding script blocks from
my codebehind
i have a page that registers a new product in my database, and upon
finishing, this page should open a popup window which will print a kind
of receipt for this transaction.

on my page load, i'm adding an onclick attribute to my main button,
which does something in javascript; and at the end of that button's
event handler, i have a Response.Write(window.open) to open the receipt
window, passing the new product id in the request string.

the problem seems to be that my response.write is overriding my onclick
method, so the block of code i wanted to execute with the onclick isn't
being executed

i don't know if i made myself clear enough or if this should be the
place to post my question :s

anyways, thnx in advance

Nov 19 '05 #1
1 2001
You know that you should be writing: Response.Write("window.open()") not
Response.Write(window.open)?


<ch****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello all, i'm having a little problem while adding script blocks from
my codebehind
i have a page that registers a new product in my database, and upon
finishing, this page should open a popup window which will print a kind
of receipt for this transaction.

on my page load, i'm adding an onclick attribute to my main button,
which does something in javascript; and at the end of that button's
event handler, i have a Response.Write(window.open) to open the receipt
window, passing the new product id in the request string.

the problem seems to be that my response.write is overriding my onclick
method, so the block of code i wanted to execute with the onclick isn't
being executed

i don't know if i made myself clear enough or if this should be the
place to post my question :s

anyways, thnx in advance

Nov 19 '05 #2

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

Similar topics

13
by: TinyTim | last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side code and you're going to return a customized HTML form with several fields and labels, you have to do an extensive amount of...
1
by: Lou | last post by:
I'm using the Response Filter Class in MS KB article 811162 (http://support.microsoft.com/default.aspx?scid=kb;EN-US;811162) to generate a static htm page from an asp.net template page being...
2
by: Eric Mitchell | last post by:
Hello all, I am using the document.write() method to create new content on the same page, however... I need to create a new button using this method (button in HTML). Complicating the matter...
3
by: Brad | last post by:
I have a response filter which injects "standard" html into my pages. The filter works fine when the initial stream is small enough not to buffer...or....if I have a large unbuffered stream (i.e. I...
1
by: Tim_Mac | last post by:
hi, i'm guessing you just can't write to the page after Response.End(), but i would be interested to hear if anyone has a work around for my situation. i have designed a 'SmartButton' control...
0
by: Seth | last post by:
For some reason my service works fine except that it will create the file in my c drive, but will not write to the file. Sorry if this is a duplicate post, i have found some that ask the same...
12
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
0
by: Leafy | last post by:
Looks like it had to do with my breakpoints. It must have slowed my transaction time causing a timeout. It just appeared that SOAPUI wasn't returning a response. Thanks! Leafy --------- ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
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...
0
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...

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.