473,569 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem launching window.open(jav ascript:setCurs orPosition(1527 ,'HATSFORM'))

Hi,

I am trying to launch a new browser with the same url location as the
current browser, and at the same time run some javascript.

This works with <a href=javascript :setCursorPosit ion(1527,'HATSF ORM')>test</a>
, which runs the javascript in the current url location, but when I
try window.open(jav ascript:setCurs orPosition(1527 ,'HATSFORM'), it
opens a new browser with the string
"javascript:set CursorPosition( 1527,'HATSFORM' )" in the url location of
the browser, which obviously fails.

So I need the window.open to open up a new browser with the same
relative url and then execute the javascript string. Any ideas?

BTW, this also fails when I try <a
href=javascript :setCursorPosit ion(1527,'HATSF ORM')
target=_NEW>tes t</a> for the same reason that the relative url
location is not kept for the new browser.

Thanks in advance
Bill
Jul 23 '05 #1
1 2870
> This works with <a
href=javascript :setCursorPosit ion(1527,'HATSF ORM')>test</a>

I'm guessing that this method simply moves the current window to the correct
location on the page.
, which runs the javascript in the current url location, but when I
try window.open(jav ascript:setCurs orPosition(1527 ,'HATSFORM'), it
opens a new browser with the string
"javascript:set CursorPosition( 1527,'HATSFORM' )" in the url location of
the browser, which obviously fails.


Yeah, window.open requires a URL to be passed. I think what you need to
something like this:

var newwindow = window.open(win dow.location.hr ef);
newwindow.setCu rsorPosition(15 27,'HATSFORM');
The idea is to open a new window with the same URL as the current window and
then call the setCursorPositi on() method with the correct parameters in the
new window. This is assuming that the method will exist in the new window.

Hope this helps
Mike
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7840
by: John | last post by:
I am having a problem with window.print in a popup window. I am creating 2 popup windows both with a print button in them, 1 works the other doesn't. Code runs in a javascript function on a webpage. Here is the difference : First example (works) - ...
2
3310
by: Martin Nadoll | last post by:
Hello, i want to close a popup-window with the onBlur eventHandler. function closeIt() { setTimeout('window.close()',2000); } <body onBlur="closeIt()"> html </body>
1
6944
by: dibyendu_k | last post by:
Hi, There is a problem i cant solve regarding Internet Explorer 5.5. It is regarding the Print Dialog Box. From a webpage if I open a popup window (window.open()) containing buttons Print and Close. The functionality is that when i press the "print" button the Print dialog box is opened (window.print();) and when I click on the close button...
1
1683
by: Dave | last post by:
Hi, I am using the following code to try to open a window in a target frame using a button control that is in the original frame. It does not work unless I click the button twice. If anyone can help I'd appreciate it. This is on a standard webform. ....................................... Private Sub btTools_Click(ByVal sender As...
0
1693
by: Scott Zabolotzky | last post by:
I'm using the following code to launch SIGNCODE.EXE to sign a CAB provisioning file from an ASP.NET app. When I run the code the exit code comes back as -1. I have not been able to determine what this exit code means (other than Error, as the CAB file does not get signed). No exceptions are thrown and I've verified that the app can read...
13
22162
by: tochiromifune | last post by:
Hello The window.open method brings my window to the top only if it is new. If it's being reused, the window does not come to the foreground (with IE 6 it does). Is there a new way in Mozilla/Firefox that I can ensure that this window comes to the top? Thank you for your help
2
4385
by: John | last post by:
Hi, I posted this earlier in microsoft.public.dotnet.framework.aspnet, but didn't get a response, so I thought I'd try here. Basically, I'm having a problem opening / downloading csv files when generated from within a page opened with window.showModalDialog( ) ( IE6 ). To isolate this problem, I've written 3 files (see below). 1....
18
3311
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to the image. The desired behavior is that when the pop-up is invoked, I want the underlying window to stay put. I don't have this problem when I...
1
1165
by: ajay7387 | last post by:
i am facing a problem with window.opener. i have a function addToTable(var d) and if i am calling that from child window using window.opener.addToTable(var) its not working. "<A HREF='#' style='text-decoration:none;'" + " onClick=\"javascript:window.opener.addToTable("+ vDay + "); self.opener.document." + this.gReturnItem +...
0
7695
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...
0
8119
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...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5218
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...
0
3653
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...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
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
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
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...

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.