By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,262 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,262 IT Pros & Developers. It's quick & easy.

Response.Write overrides my OnClick function

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.