471,066 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

javascript popup causing postback on parent. Pls Help!

Hi,

I have a web page that is in a master page. The user fills in the page and
at the bottom I have a link for terms which when they click is causing post
back. Here is the code. Is there a way to just have the popup without the
postback? this is in ASP.NET 2.0

HyperLink ID="HyperLink2" runat="server"
NavigateUrl="javascript:location=location;window.o pen('iTerms.aspx','NMO','height=400,width=400,scro llbars=Yes,resizable=Yes')"
EnableViewState="False">Termsr</HyperLink>
Thank you in advance.
Apr 12 '06 #1
6 3564
The hyperlink that you wrote down there does not cause a postback. However,
the aspx that was opened in the new window would display the blue-color
progress indicator on the status bar until the page named ('iTerms.aspx')
finished loading, but the page where the link is has not posted back to the
server.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:
Hi,

I have a web page that is in a master page. The user fills in the page and
at the bottom I have a link for terms which when they click is causing post
back. Here is the code. Is there a way to just have the popup without the
postback? this is in ASP.NET 2.0

HyperLink ID="HyperLink2" runat="server"
NavigateUrl="javascript:location=location;window.o pen('iTerms.aspx','NMO','height=400,width=400,scro llbars=Yes,resizable=Yes')"
EnableViewState="False">Termsr</HyperLink>
Thank you in advance.

Apr 13 '06 #2
No, it is definately posting back on the parent. is it because I am using
asp:hyperlink? The new window does a load and that is ok. The parent page
reloads and refreshes all the controls. thanks for you help.

"Phillip Williams" wrote:
The hyperlink that you wrote down there does not cause a postback. However,
the aspx that was opened in the new window would display the blue-color
progress indicator on the status bar until the page named ('iTerms.aspx')
finished loading, but the page where the link is has not posted back to the
server.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:
Hi,

I have a web page that is in a master page. The user fills in the page and
at the bottom I have a link for terms which when they click is causing post
back. Here is the code. Is there a way to just have the popup without the
postback? this is in ASP.NET 2.0

HyperLink ID="HyperLink2" runat="server"
NavigateUrl="javascript:location=location;window.o pen('iTerms.aspx','NMO','height=400,width=400,scro llbars=Yes,resizable=Yes')"
EnableViewState="False">Termsr</HyperLink>
Thank you in advance.

Apr 13 '06 #3
I'm sorry, I don't mean a post back. I mean a refresh. I'm sorry for not
being more clear. I stepped through and postback is false but refresh and
reload is what is happening.

Thank you

"Vear" wrote:
No, it is definately posting back on the parent. is it because I am using
asp:hyperlink? The new window does a load and that is ok. The parent page
reloads and refreshes all the controls. thanks for you help.

"Phillip Williams" wrote:
The hyperlink that you wrote down there does not cause a postback. However,
the aspx that was opened in the new window would display the blue-color
progress indicator on the status bar until the page named ('iTerms.aspx')
finished loading, but the page where the link is has not posted back to the
server.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:
Hi,

I have a web page that is in a master page. The user fills in the page and
at the bottom I have a link for terms which when they click is causing post
back. Here is the code. Is there a way to just have the popup without the
postback? this is in ASP.NET 2.0

HyperLink ID="HyperLink2" runat="server"
NavigateUrl="javascript:location=location;window.o pen('iTerms.aspx','NMO','height=400,width=400,scro llbars=Yes,resizable=Yes')"
EnableViewState="False">Termsr</HyperLink>
Thank you in advance.

Apr 13 '06 #4
Yes, you are right. It is the JavaScript syntax that you typed there that is
incorrect. You should not put location=location; because this instructs the
document to reload itself. Here is the correct syntax:

NavigateUrl="javascript:var
temp=window.open('iTerms.aspx','_blank','height=40 0,width=400,scrollbars=Yes,resizable=Yes');"
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:
I'm sorry, I don't mean a post back. I mean a refresh. I'm sorry for not
being more clear. I stepped through and postback is false but refresh and
reload is what is happening.

Thank you

"Vear" wrote:
No, it is definately posting back on the parent. is it because I am using
asp:hyperlink? The new window does a load and that is ok. The parent page
reloads and refreshes all the controls. thanks for you help.

"Phillip Williams" wrote:
The hyperlink that you wrote down there does not cause a postback. However,
the aspx that was opened in the new window would display the blue-color
progress indicator on the status bar until the page named ('iTerms.aspx')
finished loading, but the page where the link is has not posted back to the
server.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:

> Hi,
>
> I have a web page that is in a master page. The user fills in the page and
> at the bottom I have a link for terms which when they click is causing post
> back. Here is the code. Is there a way to just have the popup without the
> postback? this is in ASP.NET 2.0
>
> HyperLink ID="HyperLink2" runat="server"
> NavigateUrl="javascript:location=location;window.o pen('iTerms.aspx','NMO','height=400,width=400,scro llbars=Yes,resizable=Yes')"
> EnableViewState="False">Termsr</HyperLink>
>
>
> Thank you in advance.

Apr 13 '06 #5
Wow Phillip, that's twice you've rescued me. thanks so much!

"Phillip Williams" wrote:
Yes, you are right. It is the JavaScript syntax that you typed there that is
incorrect. You should not put location=location; because this instructs the
document to reload itself. Here is the correct syntax:

NavigateUrl="javascript:var
temp=window.open('iTerms.aspx','_blank','height=40 0,width=400,scrollbars=Yes,resizable=Yes');"
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:
I'm sorry, I don't mean a post back. I mean a refresh. I'm sorry for not
being more clear. I stepped through and postback is false but refresh and
reload is what is happening.

Thank you

"Vear" wrote:
No, it is definately posting back on the parent. is it because I am using
asp:hyperlink? The new window does a load and that is ok. The parent page
reloads and refreshes all the controls. thanks for you help.

"Phillip Williams" wrote:

> The hyperlink that you wrote down there does not cause a postback. However,
> the aspx that was opened in the new window would display the blue-color
> progress indicator on the status bar until the page named ('iTerms.aspx')
> finished loading, but the page where the link is has not posted back to the
> server.
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "Vear" wrote:
>
> > Hi,
> >
> > I have a web page that is in a master page. The user fills in the page and
> > at the bottom I have a link for terms which when they click is causing post
> > back. Here is the code. Is there a way to just have the popup without the
> > postback? this is in ASP.NET 2.0
> >
> > HyperLink ID="HyperLink2" runat="server"
> > NavigateUrl="javascript:location=location;window.o pen('iTerms.aspx','NMO','height=400,width=400,scro llbars=Yes,resizable=Yes')"
> > EnableViewState="False">Termsr</HyperLink>
> >
> >
> > Thank you in advance.

Apr 13 '06 #6
You are welcome.
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:
Wow Phillip, that's twice you've rescued me. thanks so much!

"Phillip Williams" wrote:
Yes, you are right. It is the JavaScript syntax that you typed there that is
incorrect. You should not put location=location; because this instructs the
document to reload itself. Here is the correct syntax:

NavigateUrl="javascript:var
temp=window.open('iTerms.aspx','_blank','height=40 0,width=400,scrollbars=Yes,resizable=Yes');"
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Vear" wrote:
I'm sorry, I don't mean a post back. I mean a refresh. I'm sorry for not
being more clear. I stepped through and postback is false but refresh and
reload is what is happening.

Thank you

"Vear" wrote:

> No, it is definately posting back on the parent. is it because I am using
> asp:hyperlink? The new window does a load and that is ok. The parent page
> reloads and refreshes all the controls. thanks for you help.
>
> "Phillip Williams" wrote:
>
> > The hyperlink that you wrote down there does not cause a postback. However,
> > the aspx that was opened in the new window would display the blue-color
> > progress indicator on the status bar until the page named ('iTerms.aspx')
> > finished loading, but the page where the link is has not posted back to the
> > server.
> > --
> > HTH,
> > Phillip Williams
> > http://www.societopia.net
> > http://www.webswapp.com
> >
> >
> > "Vear" wrote:
> >
> > > Hi,
> > >
> > > I have a web page that is in a master page. The user fills in the page and
> > > at the bottom I have a link for terms which when they click is causing post
> > > back. Here is the code. Is there a way to just have the popup without the
> > > postback? this is in ASP.NET 2.0
> > >
> > > HyperLink ID="HyperLink2" runat="server"
> > > NavigateUrl="javascript:location=location;window.o pen('iTerms.aspx','NMO','height=400,width=400,scro llbars=Yes,resizable=Yes')"
> > > EnableViewState="False">Termsr</HyperLink>
> > >
> > >
> > > Thank you in advance.

Apr 13 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Nicholas Then | last post: by
5 posts views Thread by Paul Krasucki | last post: by
10 posts views Thread by korund | last post: by
1 post views Thread by SlimBiker | last post: by
reply views Thread by leo001 | last post: by

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.