473,748 Members | 7,608 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

window.opener.l ocation.href issue

1 New Member
Hi I am trying to right a script that closes a popup and then refreshes the pener to specific URL

If have this that works form me

<script type="text/javascript">
window.opener.l ocation.href = 'http://localhost/fmsuite/Sales/Document.asp? docNumber=' + <%=Request.Quer yString("docNum ber")%>;
window.opener.f ocus();
self.close()
</script>

But when I change that to this
<script type="text/javascript">
window.opener.l ocation.href = 'http://localhost/fmsuite/Sales/Document.asp?do cNumber=' + <%=Request.Quer yString("docNum ber")%> + 'strDocumentTyp e=' + <%=strDocumentT ype%>;
window.opener.f ocus();
self.close()
</script>
Or
<script type="text/javascript">
window.opener.l ocation.href = 'http://localhost/fmsuite/Sales/Document.asp?do cNumber=' + <%=Request.Quer yString("docNum ber")%> + 'strDocumentTyp e=' + <%=Request.Quer yString("strDoc umentType")%>;
window.opener.f ocus();
self.close()
</script>

I get nothing. I click the add button and noting happens. I am not even sure how to display the href value to troubelshoot.

I am totally new to java and this is the only time I have used it in my sites so it is probably something stupid so please if you can help ASAP please.

Thanx
Mar 17 '08 #1
1 8458
hidash
7 New Member
Hi I am trying to right a script that closes a popup and then refreshes the pener to specific URL

If have this that works form me

<script type="text/javascript">
window.opener.l ocation.href = 'http://localhost/fmsuite/Sales/Document.asp? docNumber=' + <%=Request.Quer yString("docNum ber")%>;
window.opener.f ocus();
self.close()
</script>

But when I change that to this
<script type="text/javascript">
window.opener.l ocation.href = 'http://localhost/fmsuite/Sales/Document.asp?do cNumber=' + <%=Request.Quer yString("docNum ber")%> + 'strDocumentTyp e=' + <%=strDocumentT ype%>;
window.opener.f ocus();
self.close()
</script>
Or
<script type="text/javascript">
window.opener.l ocation.href = 'http://localhost/fmsuite/Sales/Document.asp?do cNumber=' + <%=Request.Quer yString("docNum ber")%> + 'strDocumentTyp e=' + <%=Request.Quer yString("strDoc umentType")%>;
window.opener.f ocus();
self.close()
</script>

I get nothing. I click the add button and noting happens. I am not even sure how to display the href value to troubelshoot.

I am totally new to java and this is the only time I have used it in my sites so it is probably something stupid so please if you can help ASAP please.

Thanx

hi,,

use
document.locati on.href="";
you can open a new window and u can close this by using self.close();
Mar 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
9709
by: Carol Lyn | last post by:
Could use your assistance with this. I have a window that opens via onclick and it is a small window with info about a site. If the user is interested in visiting that site, there is a link to click that opens the site in a new and larger window via onclick. My question is, can I have the smaller window automatically close when the user clicks the link to visit the site? I also have a link that merely closes the smaller info window if...
3
4580
by: sentinel | last post by:
Hi all, I'm trying to reload a frame from a pop-up, but really cannot figure this out. Within my index.htm file, I make a link to call a pop-up frame with a javascript function that calls the following code from an external javascript source file, dynamically created with PHP document.write('<a href="javascript:void(0);"
4
2208
by: ...D. | last post by:
OK. I am halfway decent with HTML. Now I want to try javascript for some things that HTML cannot do. I have looked over a tutorial & all. What I want to do is create a button, that when pressed, closes the window it is in, and launches a URL. The window the button is in is actually just a sub-page of the main website page, launched with target="blank", but I just do not want to close the window as I said, I want to launch a website...
4
2031
by: JPL Verhey | last post by:
Hi, I have a little test script in a pop up window. The pop up page refreshes every 2 seconds. I want it to check with every refresh if a certain page (log3.htm) is loaded in the opener window. If that is the case, another page (log4.htm) must be loaded in the opener window. In pop up page: <script>
19
31067
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). The problem is that after the reload, it brings you right to the top of the page. When I click 'refresh" on the original page, it brings me back to the original viewing position. Is there a way to duplicate this in from the popup window. Also,...
3
2258
by: JohnEGee | last post by:
Hello, all, and TIA for any help you can offer. I've searched the Internet for answers and have finally come here. I've created a page (several, actually) with a link that opens a pop-up window. It's a pop-up window in the sense that it's smaller than the man page and is intended to be viewed and then closed. The problem is that if I include a link on that pop-up window HTML page, when the link is clicked the new page opens IN the...
4
2308
by: Kenneth | last post by:
Hi, I have two forms, parentForm and childForm. parentForm has a button(btn1) and a grid. childForm has a couple of textboxes and a button. The button on parentForm opens a new window of childForm: btn1.Attributes("onclick")="javascript window.open(...."
5
12905
by: soni2926 | last post by:
Hi, I have a pop up window, that window needs to refresh the parent window when opened, I'm doing the following: window.opener.location.href(window.opener.location.href); problem I'm having is that the parent url has a # sign in it, like: http://localhost/mysite/me.html#01 i need the #01 to stay in the url after the refresh, anyway to do
3
4072
by: Asterix | last post by:
Hi Guys, I know this is probably an easy one, but I am having issues. Basically, I have a pop-up (child) that controls the parent window. Clicking on a link on the child window should redirect the parent. Unfortunately, I cannot get it to work with FireFox after selecting more than one option. Javascript code: function MM_openBrWindow(theURL,winName,features) {
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.