I was making an application in asp .net mostly with help from the asp.net forums and i am using javascript to open a popup in my gridview. I wanted to open a window with the title "MAIN TEST" how do i set the value of the title name ? i am guessing this is the syntax : window.name="main test"; but it doesnt seem to work, here is the script, any help would be appreciated. -
<script language="JavaScript">
-
function openNewWindow(URL)
-
{
-
day = new Date();
-
id = day.getTime();
-
window.name="main test";
-
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=yes,width=500,height=600');");
-
}
-
</script>
-
Thanks and regards in advance.
2 2387
Heya, dhaneshrs. Welcome (back) to TSDN!
Please use CODE tags when posting source code:
[CODE=javascript]
JavaScript code goes here.
[/CODE]
gits 5,390
Expert Mod 4TB
hi ...
don't use eval in your code ... except you have to eval things like json-data ... there is no need for eval besides that ... have a look at the following example that you may use for your problem: - window['page' + id] = window.open(URL, '" + id + "', 'toolbar=no,scrollbars=no,location=no,statusbar=no ,menubar=no,resizable=yes,width=500,height=600');
-
-
window['page' + id].document.title = 'test';
kind regards
ps: and you may drop the window.name statement ... this simply creates a member variable 'name' for window, that is not used the way you want ...
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Phillip Parr |
last post by:
Hello, I have a nice system where someone clicks on a picture to show the
full version. This pops up in a window.open box. It works great, the only
problem is that if the user clicks a second...
|
by: alanstew |
last post by:
With the body tag calling out 'window onload', a function with a
'window.open' fails at the 'window.open' line. If I cut out the body
tag, the function executes as normal.
At first I thought it...
|
by: NeverLift |
last post by:
But, if it's not open, I don't want to open it . . . using
window.open will open it if it doesn't exist, even if the url in that
open is null (the window is then empty -- but it's open).
The...
|
by: John Bokma |
last post by:
I have two windows in a frame. I want to be able that each can open a
pop up window and that the handle to that window can be stored
somewhere, so that each can talk to the pop up.
is it...
|
by: Peter Kirk |
last post by:
Hi,
I want to open a popup-window which displays a list to the user. From this
list, the user can select an item, and the data regarding this item is then
transferred to some fields on the main...
|
by: umashd |
last post by:
Hi,
I am doing a web based project for my graduation. I studied bit of java
for backend processesing and javascript for the client. Here is the
scenario.
In the FORM, I use INPUT TYPE=text...
|
by: Daniel Morrissey |
last post by:
Why will the following code not change the window title of the new window?
window.open "Default.htm" ,"YO"
|
by: Tom Gur |
last post by:
Hi,
I was wondering how do I get control over a window (Win32).
to be more specific, I need to find a handle to a window of a certain
program and minimize the window.
|
by: yuenli |
last post by:
Hi! I am facing a problem here. I wish to open a sub window from another sub window which means when i click on the main parent window a small window will appear then when i click on the button on...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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,...
|
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...
|
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,...
| |