473,503 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem launching window.open(javascript:setCursorPosition(1527,'HAT SFORM'))

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:setCursorPosition(1527,'HATSFORM') >test</a>
, which runs the javascript in the current url location, but when I
try window.open(javascript:setCursorPosition(1527,'HAT SFORM'), it
opens a new browser with the string
"javascript:setCursorPosition(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:setCursorPosition(1527,'HATSFORM')
target=_NEW>test</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 2860
> This works with <a
href=javascript:setCursorPosition(1527,'HATSFORM') >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(javascript:setCursorPosition(1527,'HAT SFORM'), it
opens a new browser with the string
"javascript:setCursorPosition(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(window.location.href);
newwindow.setCursorPosition(1527,'HATSFORM');
The idea is to open a new window with the same URL as the current window and
then call the setCursorPosition() 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
7828
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...
2
3305
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
6935
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...
1
1672
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...
0
1691
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...
13
22146
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...
2
4379
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...
18
3300
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...
1
1162
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='#'...
0
7072
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
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...
0
7449
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...
0
5570
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,...
0
4666
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...
0
1498
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 ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
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...

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.