473,503 Members | 12,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

function/parameters

Hello,

I have a problem with the following function:
I would like to define the hight/length of the window which I open when
I call the function.
The problem is that the window opens but not with the size I defined
when calling the function.

Tanks for your help.
<head>
<script LANGUAGE="JavaScript">
function FuncWindow(strPage,Vlargeur,Vhauteur,)

{
var Vhauteur
var Vlargeur
string=
"toolbar=0,scrollbars=1,location=0,statusbar=0,men ubar=0,resizable=1,width=Vlargeur,height=Vhauteur, Left=200,Top=100";
fin=window.open(strPage,"Find",string);
fin.focus();
// document.write (Vhauteur)
}
</script>
</head>

<body>
<A
onclick="FuncWindow('../pages/aide/perso_accueil_codepostal.asp',300,500)">

<input type="button" name="btnEntrer" value=" Entrer " ></a>
</body>

Jul 23 '05 #1
5 1197
Hello,

This script works.

<head>

<script language="JavaScript">

function FuncWindow(strPage, string) {
fin = window.open(strPage, "Find", string);
fin.focus();
// document.write(Vhauteur);
}
</script>

</head>

<body>
<input type="button" name="btnEntrer" value="Entrer"
onClick="FuncWindow('../pages/aide/perso_accueil_codepostal.asp',
'toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0,
resizable=1, width=500, height=480, left=200, top=100');" />
</body>

Jul 23 '05 #2
pr***********@yahoo.fr wrote:
Hello,

I have a problem with the following function:
I would like to define the hight/length of the window which I open when
I call the function.
The problem is that the window opens but not with the size I defined
when calling the function.

[...]
function FuncWindow(strPage,Vlargeur,Vhauteur){
string=
"resizable=1,width="+Vlargeur+",height="+Vhauteur+ ",left=200,top=100";
fin=window.open(strPage,"Find",string);
}

scrollbars will be added if the document needs them.
Mick
Jul 23 '05 #3
Thanks from a newby to both of you.
It works fine.
Bi

Jul 23 '05 #4


You have to concatenate the arguments:

string="toolbar=0,scrollbars=1,location=0,statusba r=0,menubar=0,resizable=1,width="+Vlargeur+",heigh t="+Vhauteur+",Left=200,Top=100";

Danny

On Thu, 23 Jun 2005 03:00:19 -0700, <pr***********@yahoo.fr> wrote:
Hello,

I have a problem with the following function:
I would like to define the hight/length of the window which I open when
I call the function.
The problem is that the window opens but not with the size I defined
when calling the function.

Tanks for your help.
<head>
<script LANGUAGE="JavaScript">
function FuncWindow(strPage,Vlargeur,Vhauteur,)

{
var Vhauteur
var Vlargeur
string=
"toolbar=0,scrollbars=1,location=0,statusbar=0,men ubar=0,resizable=1,width=Vlargeur,height=Vhauteur, Left=200,Top=100";
fin=window.open(strPage,"Find",string);
fin.focus();
// document.write (Vhauteur)
}
</script>
</head>

<body>
<A
onclick="FuncWindow('../pages/aide/perso_accueil_codepostal.asp',300,500)">

<input type="button" name="btnEntrer" value=" Entrer " ></a>
</body>


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jul 23 '05 #5
su*****@gmail.com wrote:
This script works.
No, it does not.
<head>

<script language="JavaScript">
<http://validator.w3.org/>
function FuncWindow(strPage, string) {
fin = window.open(strPage, "Find", string);
The value of `string' is used here "as is", however you pass it
below containing spaces that it must not contain.
fin.focus();
You do not test for the host object's method before you call it.
Error-prone.

<http://validator.w3.org/>
// document.write(Vhauteur);
Your point?
}
</script>

</head>

<body>
<input type="button" name="btnEntrer" value="Entrer"
onClick="FuncWindow('../pages/aide/perso_accueil_codepostal.asp',
'toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0,
resizable=1, width=500, height=480, left=200, top=100');" />


People using a UA without client-side script support will not
be able to make use of that button. Please Read the FAQ before
you post.

<http://jibbering.com/faq/#FAQ4_24>
PointedEars
Jul 23 '05 #6

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

Similar topics

9
3668
by: Derek Hart | last post by:
I wish to execute code from a string. The string will have a function name, which will return a string: Dim a as string a = "MyFunctionName(param1, param2)" I have seen a ton of people...
1
2582
by: John Miles | last post by:
Hi -- This is a bit of an implementation-specific problem, but I'd like to post it here to see if there's a general answer within the auspices of the language. I'm developing a high(er)-level...
3
14907
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
6
1783
by: simon | last post by:
Always when I need data reader in my programs, I simply have functions, which creates it for me: Dim rdr As SqlDataReader dim sql as string sql="myStoredProcedure" rdr =...
3
1651
by: Bryan Parkoff | last post by:
Do C/C++ Compiler allow function to contain more than 8 parameters? I checked MS Visual C++ 6.0 that it can only limit 8 parameters, but most C/C++ Compiler can limit maximum 256 parameters. Can...
64
3316
by: Morgan Cheng | last post by:
Hi All, I was taught that argument valuse is not supposed to be changed in function body. Say, below code is not good. void foo1(int x) { x ++; printf("x+1 = %d\n", x); } It should be...
2
1741
by: Maxwell_Smart | last post by:
Is there a way for a function to refer to itself generically? I'd like to use such a thing (should it exist) for convenience and consistency, not functionality. For example: Function...
18
4311
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
4
2478
by: Tony Lownds | last post by:
(Note: PEPs in the 3xxx number range are intended for Python 3000) PEP: 3107 Title: Function Annotations Version: $Revision: 53169 $ Last-Modified: $Date: 2006-12-27 20:59:16 -0800 (Wed, 27 Dec...
16
7570
by: arne | last post by:
Hi all, imagine I call a function, but omit one of the parameters, like: foo.c: void foo( int a, int b ) { /* do something with a and b */ return; }
0
7212
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,...
0
7296
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
7364
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...
1
7017
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...
0
7470
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
4696
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
3186
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...
0
1524
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 ...
0
405
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.