Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-07 Thread Louis
Hi Brad:

umm... actually you will need to use single quotes inside the openWindow
  call.

 so
  'key_data' = [a href=\javascript:
 openWindow('http://www.domain.com/file.html','win', 400,
 400);\?\/a]

 should do the trick.

[Louis] Well it finally worked but now the problem is the scrollbars won't
show. Snip of the JS code is pasted below from previous post.

script language=JavaScript
function openWindow(u, n, w, h)
{
  var win = window.open(u, n, toolbar=no,location=no,+
  status=no,menubar=no,scrollbars=yes+
width=+w+,height=+h);
}
/script

Cheers.

-- 
I'm always learning something new everyday. Thanks Sluggers.


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-07 Thread Louis
Think I found the issue I'm missing a , after scrollbars=yes in the JS
code.

Will try it now.

Cheers.

 Hi Brad:

umm... actually you will need to use single quotes inside the
 openWindow
  call.

 so
  'key_data' = [a href=\javascript:
 openWindow('http://www.domain.com/file.html','win', 400,
 400);\?\/a]

 should do the trick.

 [Louis] Well it finally worked but now the problem is the scrollbars
 won't show. Snip of the JS code is pasted below from previous post.

 script language=JavaScript
 function openWindow(u, n, w, h)
 {
   var win = window.open(u, n, toolbar=no,location=no,+
   status=no,menubar=no,scrollbars=yes+
 width=+w+,height=+h);
 }
 /script

 Cheers.

 --
 I'm always learning something new everyday. Thanks Sluggers.


 --
 SLUG - Sydney Linux User's Group - http://slug.org.au/
 More Info: http://lists.slug.org.au/listinfo/slug


-- 
I'm always learning something new everyday. Thanks Sluggers.


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


RE: [SLUG] Removing Toolbars etc.. from browser window

2003-11-07 Thread Michael Collins
[Louis] Well it finally worked but now the problem is the scrollbars
won't show. Snip of the JS code is pasted below from previous post.

script language=JavaScript
function openWindow(u, n, w, h)
{
  var win = window.open(u, n, toolbar=no,location=no,+
  status=no,menubar=no,scrollbars=yes+
width=+w+,height=+h);
}
/script

Shouldn't it be 'scrollbar' instead of 'scrollbars' ?


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


RE: [SLUG] Removing Toolbars etc.. from browser window

2003-11-07 Thread Louis
Hi Michael:

script language=JavaScript
function openWindow(u, n, w, h)
{
  var win = window.open(u, n, toolbar=no,location=no,+
  status=no,menubar=no,scrollbars=yes+
width=+w+,height=+h);
}
/script

 Shouldn't it be 'scrollbar' instead of 'scrollbars' ?\

[Louis] No. From the url
http://www.devguru.com/technologies/ecmascript/quickref/win_open.html

I used as a reference for window.open(), it's 'scrollbars'. It's working
now. The , missing before 'width' was the issue.

Thanks to everyone for helping.

Cheers.

-- 
I'm always learning something new everyday. Thanks Sluggers.


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-07 Thread Brad Kowalczyk
Michael Collins wrote:

[Louis] Well it finally worked but now the problem is the scrollbars
   

won't show. Snip of the JS code is pasted below from previous post.
 

script language=JavaScript
function openWindow(u, n, w, h)
{
var win = window.open(u, n, toolbar=no,location=no,+
status=no,menubar=no,scrollbars=yes+
  width=+w+,height=+h);
}
/script
   

Shouldn't it be 'scrollbar' instead of 'scrollbars' 
 

nope, 'scrollbars' it is... it would have been that missing ',' that 
stuffed it. Hope its working for you now Louis, finally :-)

cheers
brad
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


RE: [SLUG] Removing Toolbars etc.. from browser window

2003-11-06 Thread Louis
Hi Brad:

Well finally tried what you suggested.


'key_data' = [a href=\javascript:
openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400);\?\/a]


Unfortunately when I click on the ? nothing happens.

I don't see any javascript error from IE when I load the page. So it's
not 
the javascript openWindow() I put in.

Any other ideas.

Cheers.

 -Original Message-
 From: Brad Kowalczyk [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 4 November 2003 10:44
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [SLUG] Removing Toolbars etc.. from browser window
 
 
 [EMAIL PROTECTED] wrote:
 
 Hi :
 
 I've tried this in the perl script with no luck. Here is 
 what I did. I 
 have this after reading replies I got.
 
 $javascriptwin = script language=\JavaScript\
 function openWindow(u, n, w, h)
 {
   var win = window.open(u, n, \toolbar=no,location=no,\+
   
 \status=no,menubar=no,scrollbars=yes\+
\width=\+w+\,height=\+h);
 }
 /script;
 
 In the hash that has the a is pasted below:
 
 %hashdata = (
 ...
 'key_data' = [a href=\\ 
 onclick=\openWindow(\http://www.domain.com/file.html\,\wi
 n\, 400, 
 400); return false;\?\/a], 
 );
 
 This does not open a new window at all. I also do not even see the 
 contents of the file as well.
 
 Have I missed something here?
   
 
 rather than using the onclick event try:
 
 'key_data' = [a href=\javascript: 
 openWindow(\http://www.domain.com/file.html\,\win\;, 400, 
 400);\?\/a]
 
 
 cheers,
 Brad
 


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-06 Thread Brad Kowalczyk
Louis wrote:

Hi Brad:

Well finally tried what you suggested.

 

'key_data' = [a href=\javascript:
openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400);\?\/a]
 

Unfortunately when I click on the ? nothing happens.

I don't see any javascript error from IE when I load the page. So it's
not 
the javascript openWindow() I put in.

Any other ideas.

Cheers.
 

What does the final HTML source look like?

There must be some kind of mistake in the perl script output. Is this 
page online anywhere?

brad

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-06 Thread Brad Kowalczyk
Brad Kowalczyk wrote:

Louis wrote:

Hi Brad:

Well finally tried what you suggested.

 

'key_data' = [a href=\javascript:
openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400);\?\/a]
 

Unfortunately when I click on the ? nothing happens.

I don't see any javascript error from IE when I load the page. So it's
not the javascript openWindow() I put in.
Any other ideas.

Cheers.
 

What does the final HTML source look like?

There must be some kind of mistake in the perl script output. Is this 
page online anywhere?

brad

umm... actually you will need to use single quotes inside the openWindow 
call.

so
'key_data' = [a href=\javascript:
openWindow('http://www.domain.com/file.html','win', 400,
400);\?\/a]
should do the trick.

brad

--

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-03 Thread education
Hi :

I've tried this in the perl script with no luck. Here is what I did. I
have this after reading replies I got.

$javascriptwin = script language=\JavaScript\
function openWindow(u, n, w, h)
{
  var win = window.open(u, n, \toolbar=no,location=no,\+
  \status=no,menubar=no,scrollbars=yes\+
   \width=\+w+\,height=\+h);
}
/script;

In the hash that has the a is pasted below:

%hashdata = (
...
'key_data' = [a href=\\
onclick=\openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400); return false;\?\/a],

);

This does not open a new window at all. I also do not even see the
contents of the file as well.

Have I missed something here?

Cheers.

 [EMAIL PROTECTED] wrote:
 Hi Sluggers:

 Objective:
 When someone clicks on a link, I want a new browser window to open
 with no toolbars, menubar. I want scrollbars. I know Javascript has
 window.open() to achieve what I want. However the new window opens up
 from a a tag from a script. I tried window.open() in the a tag but
 it did not work. I have also tried this in the .html file I want to
 open up in the new resized browser window with no menu and toolbars.


 Javascript:
 window.open(url,title,options)

 options amongst other things could be:
 menubar=no,personalbar=no,resizable=yes,scrollbars=yes,width=300,height=300,left=
  + l + ,top= + t);

 where l and t are the calculated left and top coordinates to put a
 300x300 window in the middle of the screen.


 To call a javascript function from an a tag, you MUST return false so
 that the link is not activated, eg:

 a href= onclick=openWindow(); return false;Something here/a

 Also, with window operations, particularly sizing, be careful what
 object parameters you use - Internet Explorer uses some non-standard
 ones.

 I have this sample Javascript in the head tag

 script
 function resizeWindow(width,height){
 if (document.layers) {
 // resizeTo sets inner size, so use this instead
 window.outerWidth = width;
 window.outerHeight = height;
 } else window.resizeTo(width,height);
 }
 /script

 Now in my body tag I have added this

 body  onload=resizeWindow(300,300);

 This of course just resizes the window. But it still leaves the
 toolbars and menu bars. Any ideas on how I can extend the above script
 with a window.open() or something similar would be greatly
 appreciated.

 Cheers.




 --
 Phil Scarratt
 Draxsen Technologies
 IT Contractor
 0403 53 12 71



-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-03 Thread Brad Kowalczyk
[EMAIL PROTECTED] wrote:

Hi :

I've tried this in the perl script with no luck. Here is what I did. I
have this after reading replies I got.
$javascriptwin = script language=\JavaScript\
function openWindow(u, n, w, h)
{
 var win = window.open(u, n, \toolbar=no,location=no,\+
 \status=no,menubar=no,scrollbars=yes\+
  \width=\+w+\,height=\+h);
}
/script;
In the hash that has the a is pasted below:

%hashdata = (
...
'key_data' = [a href=\\
onclick=\openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400); return false;\?\/a],

);
This does not open a new window at all. I also do not even see the
contents of the file as well.
Have I missed something here?
 

rather than using the onclick event try:

'key_data' = [a href=\javascript: 
openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400);\?\/a]
cheers,
Brad
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-03 Thread education
Hi Brad:

[Louis] below.

 [EMAIL PROTECTED] wrote:

Hi :

I've tried this in the perl script with no luck. Here is what I did. I
 have this after reading replies I got.

$javascriptwin = script language=\JavaScript\
function openWindow(u, n, w, h)
{
  var win = window.open(u, n, \toolbar=no,location=no,\+
  \status=no,menubar=no,scrollbars=yes\+
   \width=\+w+\,height=\+h);
}
/script;

In the hash that has the a is pasted below:

%hashdata = (
...
'key_data' = [a href=\\
onclick=\openWindow(\http://www.domain.com/file.html\,\win\;, 400,
 400); return false;\?\/a],

);

This does not open a new window at all. I also do not even see the
 contents of the file as well.

Have I missed something here?


 rather than using the onclick event try:

 'key_data' = [a href=\javascript:
 openWindow(\http://www.domain.com/file.html\,\win\;, 400,
 400);\?\/a]

[Louis] Sure but I also want no toolbars, no menu bars, but only scrollbars.

So I do this :

$option = toolbar=no,location=no,status=no,menubar=no,scrollbars=yes;

and add $option at the tail of your code snippet.

So I guess I add an extra variable in your code snippet. I will try again
with the above snippet and see what happens.

Cheers


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-03 Thread Brad Kowalczyk
[EMAIL PROTECTED] wrote:

Hi Brad:

[Louis] below.

 

[EMAIL PROTECTED] wrote:

   

Hi :

I've tried this in the perl script with no luck. Here is what I did. I
have this after reading replies I got.
$javascriptwin = script language=\JavaScript\
function openWindow(u, n, w, h)
{
var win = window.open(u, n, \toolbar=no,location=no,\+
\status=no,menubar=no,scrollbars=yes\+
 \width=\+w+\,height=\+h);
}
/script;
In the hash that has the a is pasted below:

%hashdata = (
...
'key_data' = [a href=\\
onclick=\openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400); return false;\?\/a],

);
This does not open a new window at all. I also do not even see the
contents of the file as well.
Have I missed something here?

 

rather than using the onclick event try:

'key_data' = [a href=\javascript:
openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400);\?\/a]
   

[Louis] Sure but I also want no toolbars, no menu bars, but only scrollbars.

So I do this :

$option = toolbar=no,location=no,status=no,menubar=no,scrollbars=yes;

and add $option at the tail of your code snippet.

So I guess I add an extra variable in your code snippet. I will try again
with the above snippet and see what happens.
 

No, you are calling your openWindow() function which allready has those 
details in it, does it not?

cheers,
Brad
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] Removing Toolbars etc.. from browser window

2003-11-03 Thread Phil Scarratt
[EMAIL PROTECTED] wrote:
SNIP
rather than using the onclick event try:

'key_data' = [a href=\javascript:
openWindow(\http://www.domain.com/file.html\,\win\;, 400,
400);\?\/a]


[Louis] Sure but I also want no toolbars, no menu bars, but only scrollbars.

the code in your openWindow function takes care of that - Brad is simply 
saying rather than having any onclick event, just put the javascript 
call to the openWindow funciton directly in the href attribute/property

SNIP

fil

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


[SLUG] Removing Toolbars etc.. from browser window

2003-11-02 Thread education
Hi Sluggers:

Objective:
When someone clicks on a link, I want a new browser window to open with no
toolbars, menubar. I want scrollbars. I know Javascript has window.open()
to achieve what I want. However the new window opens up from a a tag
from a script. I tried window.open() in the a tag but it did not work. I
have also tried this in the .html file I want to open up in the new
resized browser window with no menu and toolbars.

I have this sample Javascript in the head tag

script
function resizeWindow(width,height){
if (document.layers) {
// resizeTo sets inner size, so use this instead
window.outerWidth = width;
window.outerHeight = height;
} else window.resizeTo(width,height);
}
/script

Now in my body tag I have added this

body  onload=resizeWindow(300,300);

This of course just resizes the window. But it still leaves the toolbars
and menu bars. Any ideas on how I can extend the above script with a
window.open() or something similar would be greatly appreciated.

Cheers.


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug