Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Popup Window on Button Push

Reply
Thread Tools

Popup Window on Button Push

 
 
Temp
Guest
Posts: n/a
 
      08-09-2003
Can anyone tell me how I can open a new browser window when a button is
pressed?

I tried adding an <a href=...> encapsulating the button, but it didnt work.

Any suggestions?

--
_____________________________
Ron Rodenberg
Lead Software Engineer
Razorvision Technology, Inc.
(214) 207-1688


 
Reply With Quote
 
 
 
 
vMike
Guest
Posts: n/a
 
      08-09-2003
look into the target tag. try target="_new" or target="_blank"
"Temp" <(E-Mail Removed)> wrote in message
news:bh34gd$(E-Mail Removed)...
> Can anyone tell me how I can open a new browser window when a button is
> pressed?
>
> I tried adding an <a href=...> encapsulating the button, but it didnt

work.
>
> Any suggestions?
>
> --
> _____________________________
> Ron Rodenberg
> Lead Software Engineer
> Razorvision Technology, Inc.
> (214) 207-1688
>
>



 
Reply With Quote
 
 
 
 
Kathy Burke
Guest
Posts: n/a
 
      08-10-2003
Try adding this in your page init:

btnName.Attributes.Add("onclick", "pop_window();return false;")

and put your script for it in the html <head>, for example:

<script language="javascript">
function pop_window()
{
var confirmWin = null;
confirmWin = window.open('Scanned.aspx', 'WindowName',
'width=300,height=400,left=200,top=200,toolbar=no, resizable=no,menubar=n
o');
}
</script>

hope this helps.

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Natty Gur
Guest
Posts: n/a
 
      08-10-2003
in adition to Kathys replay,

If you'r using ASP:Button add :
window.event.returnValue = false;
window.event.cancelBubble = true;

to prevent postback.

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Kathy Burke
Guest
Posts: n/a
 
      08-10-2003
Nat, where does this go exactly?

window.event.returnValue = false;
window.event.cancelBubble = true;

Thanks,

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Natty Gur
Guest
Posts: n/a
 
      08-11-2003
Kathy Hi,

usually in pop_window function. but i didnt see the "return false;"
sorry .

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are "Array#push" and "pop" not "push!" and "pop!"? samppi Ruby 27 12-05-2007 07:24 AM
J2ME program for Push Email, IM, Push RSS on your mobile phone! XyZaa Java 0 07-19-2007 03:00 PM
ASP.NET JavaScript Popup, No Popup Using Back Button dapkniht ASP .Net 1 03-08-2006 08:49 AM
New Popup Window from an existing Popup Window Raffi Javascript 4 08-12-2004 01:21 PM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments