473,327 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 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 3673
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Nicholas Then | last post by:
I have a usercontrol that contains a datagrid. This grid lists information from my database. No big deal...this works fine, and when the user selects an item I have a popup window appear with...
5
by: Paul Krasucki | last post by:
This is for a search page that takes parameters on one page, processes the query, and displays them on another page. I've got a javascript popup window on a button click event. When the user...
10
by: korund | last post by:
We can use special characters ('\n') to add line breaks in text in JavaScript popup Alert boxes. there is also few additional special characters: \' single quote \" double quote \&...
1
by: SlimBiker | last post by:
Hi, Is there a way to open a javascript popup such that it is positioned above the page fold and always visible. I have a page which has links, each link on mouseover shows a DHTML popup. but...
4
by: neena | last post by:
Hi I am uing C#.net & using javacript for a popup window. I've a form and there is a button named Categories. When it is clicked, it will open a new window for the selection of categories. When...
3
by: avance | last post by:
hi, i want to make a popup link and have the new page contain the info from a div in its parent. ie: page1.htm <div id="content">stuff</div> <a...
10
by: perhapscwk | last post by:
how to passing value from popup to the parent window as a variable which I can access and process the variable(string) in parent window? such as from popup page, we have var_from_popup="abc",...
3
by: pavanip | last post by:
Hi, I have written the code for display popup window using javascript in button onclient click event. <asp:Button ID="Button1" runat="server" Style="position: static"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.