473,468 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I call this function

I am new at this stuff.
Can someone tell me how to CALL this function. PLease be very explicit in
your explanation
Many thnaks
<SCRIPT language="JavaScript">
function messageWindow(title, msg)
{
var width="300", height="125"; var left = (screen.width/2) - width/2; var
top = (screen.height/2) - height/2; var styleStr =
'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbar=no,resizable=no,copyhistory=ye s,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top;
var msgWindow = window.open("","msgWindow", styleStr); var head = '
</SCRIPT>

--
Norton Professional 2004 says this email is clean...believe it
Jul 23 '05 #1
12 1343
On Tue, 02 Nov 2004 15:26:12 -0500, PCOR wrote:
I am new at this stuff.
Can someone tell me how to CALL this function. PLease be very explicit in
your explanation
Many thnaks
<SCRIPT language="JavaScript">
function messageWindow(title, msg)
{
var width="300", height="125"; var left = (screen.width/2) - width/2;
var
top = (screen.height/2) - height/2; var styleStr =
'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbar=no,resizable=no,copyhistory=ye s,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top;
var msgWindow = window.open("","msgWindow", styleStr); var head = '
</SCRIPT>


<script type='text/javascript'>
messageWindow('My Title', 'My message');
</script>

--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.

Jul 23 '05 #2
Hi
Tried that but.........I could not get it to work
I place the function in the "HEAD" and the code you gave in the "BODY" but
nothing happened. Any suggestions
Thanks

"Ivan Marsh" <an*****@you.now> wrote in message
news:pa****************************@you.now...
On Tue, 02 Nov 2004 15:26:12 -0500, PCOR wrote:
I am new at this stuff.
Can someone tell me how to CALL this function. PLease be very explicit in
your explanation
Many thnaks
<SCRIPT language="JavaScript">
function messageWindow(title, msg)
{
var width="300", height="125"; var left = (screen.width/2) - width/2;
var
top = (screen.height/2) - height/2; var styleStr =
'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbar=no,resizable=no,copyhistory=ye s,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top;
var msgWindow = window.open("","msgWindow", styleStr); var head = '
</SCRIPT>


<script type='text/javascript'>
messageWindow('My Title', 'My message');
</script>

--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.

Jul 23 '05 #3
"PCOR" <ia******@hotmail.com> skrev i meddelandet
news:Ga********************@rogers.com...
Hi
Tried that but.........I could not get it to work
I place the function in the "HEAD" and the code you gave in the "BODY" but
nothing happened. Any suggestions
Thanks

"Ivan Marsh" <an*****@you.now> wrote in message
news:pa****************************@you.now...
On Tue, 02 Nov 2004 15:26:12 -0500, PCOR wrote:
I am new at this stuff.
Can someone tell me how to CALL this function. PLease be very explicit in your explanation
Many thnaks
<SCRIPT language="JavaScript">
function messageWindow(title, msg)
{
var width="300", height="125"; var left = (screen.width/2) - width/2;
var
top = (screen.height/2) - height/2; var styleStr =
'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbar=no,res
izable=no,copyhistory=yes,width='+width+',height=' +height+',left='+left+',to
p='+top+',screenX='+left+',screenY='+top; var msgWindow = window.open("","msgWindow", styleStr); var head = '
</SCRIPT>


<script type='text/javascript'>
messageWindow('My Title', 'My message');
</script>


Remove the nonsensical "var head = '" at the end, add a closing } to the
function, check for popup-blocking software (including browser preferences),
and write again if it doesn't work.

Joakim Braun
Jul 23 '05 #4
On Tue, 2 Nov 2004 15:53:23 -0500, PCOR <ia******@hotmail.com> wrote:
Tried that but.........I could not get it to work
I place the function in the "HEAD" and the code you gave in the "BODY"
but nothing happened.


That's because the code contains syntax errors and is obviously
incomplete. That's something for you to fix, not us.

In another matter, most of the features passed to the window.open() call
are a bad idea. You shouldn't remove chrome elements or try to position
the window. Their removal, and opening new windows in general, are bad for
usability.

[snip quoted text]

Mike
Please don't top-post.

Replies should be placed inline with the relevant quoted material.
Unrelated material should be deleted (and preferably marked as such).

Signatures from previous posts should be deleted unless you are commenting
on them. In that case, make sure the delimiter, "-- ", has been deleted.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #5
That did the trick...many thanks
Now can you tell me how to get some text or/and a picture into that message
box..
Most sincere thanks

"Joakim Braun" <jo**********@jfbraun.removethis.com> wrote in message
news:rH*****************@nntpserver.swip.net...
"PCOR" <ia******@hotmail.com> skrev i meddelandet
news:Ga********************@rogers.com...
Hi
Tried that but.........I could not get it to work
I place the function in the "HEAD" and the code you gave in the "BODY"
but
nothing happened. Any suggestions
Thanks

"Ivan Marsh" <an*****@you.now> wrote in message
news:pa****************************@you.now...
> On Tue, 02 Nov 2004 15:26:12 -0500, PCOR wrote:
>
>> I am new at this stuff.
>> Can someone tell me how to CALL this function. PLease be very explicit in >> your explanation
>> Many thnaks
>>
>>
>> <SCRIPT language="JavaScript">
>> function messageWindow(title, msg)
>> {
>> var width="300", height="125"; var left = (screen.width/2) -
>> width/2;
>> var
>> top = (screen.height/2) - height/2; var styleStr =
>> 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbar=no,res
izable=no,copyhistory=yes,width='+width+',height=' +height+',left='+left+',to
p='+top+',screenX='+left+',screenY='+top; >> var msgWindow = window.open("","msgWindow", styleStr); var head = '
>> </SCRIPT>
>
> <script type='text/javascript'>
> messageWindow('My Title', 'My message');
> </script>


Remove the nonsensical "var head = '" at the end, add a closing } to the
function, check for popup-blocking software (including browser
preferences),
and write again if it doesn't work.

Joakim Braun

Jul 23 '05 #6
"PCOR" <ia******@hotmail.com> wrote in message
news:1b********************@rogers.com...
That did the trick...many thanks
Now can you tell me how to get some text or/and a picture into that message box..
Most sincere thanks


[snip]

Try the following "as-is"; watch for word-wrap.

<html>
<head>
<title>ianmacfa.htm</title>
<script type="text/javascript">
function messageWindow(title, msg) {
var width = "300"
var height = "150";
var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var cfg =
"toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbar=no,res
izable=no";
cfg += ",width=" + width + ",height=" + height + ",left=" + left +
",top=" + top;
var win = window.open("","win", cfg);
var htm = "<html><head><title>" + title +
"</title></head><body><center>";
htm += "<b>" + msg + "</b>";
htm += "<br><img src='http://www.google.com/logos/vote2004.gif'
border='0' alt=''>";
htm += "</center></body></html>";
win.document.write(htm);
}
</script>
</head>
<body>
<script type="text/javascript">
messageWindow("My Title","My message");
</script>
</body>
</html>

Note that I removed:
a) ,copyhistory=yes
b) ' ,screenX='+left
c) ',screenY='+top
Jul 23 '05 #7
On Tue, 2 Nov 2004 15:53:23 -0500, PCOR wrote:

Please refrain form top-posting PCOR..
<http://www.physci.org/codes/javafaq.jsp#netiquette>

See further comments below.
"Ivan Marsh" <an*****@you.now> wrote in message
news:pa****************************@you.now...
On Tue, 02 Nov 2004 15:26:12 -0500, PCOR wrote:
Can someone tell me how to CALL this function. ... <SCRIPT language="JavaScript">
function messageWindow(title, msg)
.... <script type='text/javascript'>
messageWindow('My Title', 'My message');
</script>
.... Tried that but.........I could not get it to work
Lazy was it? Try flogging it with a whip. [ ;-) ]

A better way to deal with errors is to produce the JS console
or error message window (and before you go blurting out an
excited 'How?', state your browser.)
I place the function in the "HEAD" and the code you gave in the "BODY" but
nothing happened. Any suggestions


Supply an URL, as recommended by this document
for gettting help on stylesheets..
<http://www.spartanicus.utvinternet.ie/help_us_help_you.htm>
...and mirrored in my oan document on debugging Java..
<http://www.physci.org/codes/sscce.jsp>

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #8
Thanks for the effort but nogo.
I was just wondering if a number of double quotes like this " are suppose
to be there
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:LbThd.346390$MQ5.228118@attbi_s52...
"PCOR" <ia******@hotmail.com> wrote in message
news:1b********************@rogers.com...
That did the trick...many thanks
Now can you tell me how to get some text or/and a picture into that

message
box..
Most sincere thanks


[snip]

Try the following "as-is"; watch for word-wrap.

<html>
<head>
<title>ianmacfa.htm</title>
<script type="text/javascript">
function messageWindow(title, msg) {
var width = "300"
var height = "150";
var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var cfg =
"toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbar=no,res
izable=no";
cfg += ",width=" + width + ",height=" + height + ",left=" + left +
",top=" + top;
var win = window.open("","win", cfg);
var htm = "<html><head><title>" + title +
"</title></head><body><center>";
htm += "<b>" + msg + "</b>";
htm += "<br><img src='http://www.google.com/logos/vote2004.gif'
border='0' alt=''>";
htm += "</center></body></html>";
win.document.write(htm);
}
</script>
</head>
<body>
<script type="text/javascript">
messageWindow("My Title","My message");
</script>
</body>
</html>

Note that I removed:
a) ,copyhistory=yes
b) ' ,screenX='+left
c) ',screenY='+top

Jul 23 '05 #9
"PCOR" <ia******@hotmail.com> wrote in message
news:JJ********************@rogers.com...
Thanks for the effort but nogo.
I was just wondering if a number of double quotes like this " are suppose
to be there


[snip]

What do you mean "nogo" (as in "no go")?

Did you get an error?
Jul 23 '05 #10
The message book did NOT show up on the screen
Thanks again for your help...and I can still use it
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:hnWhd.456701$mD.241936@attbi_s02...
"PCOR" <ia******@hotmail.com> wrote in message
news:JJ********************@rogers.com...
Thanks for the effort but nogo.
I was just wondering if a number of double quotes like this " are
suppose
to be there


[snip]

What do you mean "nogo" (as in "no go")?

Did you get an error?

Jul 23 '05 #11

No error but no message box either
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #12
"PCOR" <ia******@hotmail.com> wrote in message
news:vb********************@rogers.com...
The message book did NOT show up on the screen
Thanks again for your help...and I can still use it


[snip]

Finally, I understand (somewhat).

You had asked "Now can you tell me how to get some text or/and a picture
into that message box.." but the way the line wrapped I didn't see the word
"box" so I thought you just wanted a message. Then your replay said the the
"message book" didn't work so I didn't know what you were refering to.

Anyway, what are you looking for? There is no "message box" (as in
VBScript's "MsgBox()"); however, there is a window which I showed you how to
get an image into.
Jul 23 '05 #13

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

Similar topics

4
by: mangi03 | last post by:
Hi, I came acrosss g++ compile errors whenever I make a function call by reference and found out from the test program that compiler is treating the function argument differently when another...
3
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
4
by: Dave | last post by:
I have a program that I've written a class for. I need to call the function in the program from the class. When I try to call the function I receive the error, the name xxx does not exist in the...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
5
by: Kurt Van Campenhout | last post by:
Hi, I am trying to get/set Terminal server information in the active directory on a windows 2000 domain. Since the ADSI calls for TS don't work until W2K3, I need to do it myself. I'm fairly...
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
46
by: Steven T. Hatton | last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it says. http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html <shrug> -- NOUN:1. Money or...
0
by: Mike S | last post by:
I've seen examples of using the CallWindowProc Windows API function to call functions through their addresses in VB6 -- a clever workaround to emulate C-like function pointer semantics. A...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
0
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...
0
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
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
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
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
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
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
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
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 ...

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.