Response.Write overrides my OnClick function

C

chanko

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
 
S

Scott M.

You know that you should be writing: Response.Write("window.open()") not
Response.Write(window.open)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top