ASP.NET Popup Windows

M

Mario

Need help with creating a popup windwo in ASP.NET when I load a page?

This is what I have so far

<SCRIPT language="javascript">
function OpenWindow()
{
var x =
window.open('MRFilingStatus.aspx','FS','width=425,height=200,resizeable=yes,menubar=0,toolbar=0')
x.focus
}
</SCRIPT>

Then in my body tag I have "onload=OpenWindow"
<body MS_POSITIONING="GridLayout" onload="OpenWindw" leftmargin="0"
topmargin="0">
 
N

Nick Hertl

I know that what you are looking for here is help, and I would give you
help if I thought this was a good idea, but I must tell you that many
people HATE popup windows when using websites. I personally believe
that this idea should never have even been made possible. I encourage
you to find a way to do what you want to do that does not involve a
popup.

In truth, most people using current web browsers have popup blockers
enabled anyways so nobody will even see the fruits of your labor.
 
S

S.M. Altaf [MVP]

First, please avoid posting the same question in different places. You'll
get the same answer from different people, and often they'll end up
conflicting, or they'll confuse you. In some cases they might even open up
a wormhole in the time space continuum which might collapse upon itself.
:-(

<SCRIPT language="javascript">
function OpenWindow()
{
var x =
window.open('MRFilingStatus.aspx','FS','width=425,height=200,resizeable=yes,menubar=0,toolbar=0');
}
</SCRIPT>

<body MS_POSITIONING="GridLayout" onload="OpenWindow();" leftmargin="0"
topmargin="0">


That should work.

S.M. Altaf
[MVP - VB]
 
S

Scott M.

I don't necessarially agree Nick.

First, you shouldn't use words like "many" and "most" when it is really your
opinion you are stating and not facts that you are quoting from.

You need to differentiate between ad popups and legitmate popup windows that
provide more functionality to the web site. The popup blockers that you
speak of do not block popups that come from the same domain as the web page
that you are visiting, they block popups from different domains. They do
this to allow the web page to provide its own popups but prevent ad popups
(which are the ones that are annoying).

In the end, you are basically saying to the OP, "I could give you the answer
you want, but I don't like what you are trying to do, so I won't." - That's
not really what these NG's are for.
 
S

Scott M.

You must include the parenthesis in the function call as they are part of
the function's name.
 
D

Dennis Bottjer

Hello Mario,

I'm guessing your problem is that the popup is not loading?

1) In your body tag you spelled window wrong. It should be onload="OpenWindow"
not onload="OpenWindw"
2) You need to call you function like this onload="OpenWindow()"

Thanks,
Dennis
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top