473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Frameless Popup window with no title bar, automatic closes once it leaves the window

200 100+
Hi,

I want to execute a javascript in my xslt file.
that does the following!

this script launches a popup
window without the Windows frame or titlebar
(that is, a "containerless" window). In other
browsers, it launches a standard popup window.
Position, width, and height are settable.
Automatic closing of the window on leaving the
page may also be optionally set.

I seached on google but the code does not work in the xslt file.

Anyone please assist!

Regards,
Dec 11 '07 #1
18 14666
acoder
16,027 Expert Mod 8TB
Post the code that you're working with.
Dec 12 '07 #2
ismailc
200 100+
Hi, This the entire xslt file with the script (framework) that i want,
Thank You for the assistance.

Expand|Select|Wrap|Line Numbers
  1. <HEAD>
  2.   <SCRIPT TYPE='text/javascript'>
  3.             <!-- Original:  CodeLifter.com (support@codelifter.com) -->
  4.             <!-- Web Site:  http://www.codelifter.com -->
  5.  
  6.             <!-- This script and many more are available free online at -->
  7.             <!-- The JavaScript Source!! http://javascript.internet.com -->
  8.  
  9.  
  10.             var windowW=214 // wide
  11.             var windowH=398 // high
  12.             var windowX = 260 // from left
  13.             var windowY = 100 // from top
  14.             var urlPop = "http://srv08-za119/fcParmalatTest/browse2.aspx?o=739.html"
  15.             var title =  "This Is A Frameless Popup Window"
  16.  
  17.             var autoclose = true
  18.  
  19.             s = "width="+windowW+",height="+windowH;
  20.             var beIE = document.all?true:false
  21.             function openFrameless() {
  22.             if (beIE) {
  23.             NFW = window.open("","popFrameless","fullscreen,"+s);
  24.             NFW.blur();
  25.             window.focus();
  26.             NFW.resizeTo(windowW,windowH);
  27.             NFW.moveTo(windowX,windowY);
  28.             var frameString=""+
  29.             "<html>"+
  30.             "<head>"+
  31.             "<title>"+title+"</title>"+
  32.             "</head>"+
  33.             "<frameset rows='*,0' framespacing='0' border='0' frameborder='0'>"+
  34.             "<frame name='top' src='"+urlPop+"' scrolling='auto'></frame>"+
  35.             "<frame name='bottom' src='about:blank' scrolling='no'></frame>"+
  36.             "</frameset>"+
  37.             "</html>";
  38.             NFW.document.open();
  39.             NFW.document.write(frameString);
  40.             NFW.document.close();
  41.             }
  42.             else {
  43.             NFW = window.open(urlPop,"popFrameless","scrollbars,"+s);
  44.             NFW.blur();
  45.             window.focus();
  46.             NFW.resizeTo(windowW,windowH);
  47.             NFW.moveTo(windowX,windowY);
  48.             }
  49.             NFW.focus();
  50.            if (autoclose) {
  51.            window.onunload = function(){NFW.close();}
  52.           }
  53.          }
  54.  
  55.        </SCRIPT>
  56. </HEAD>
  57.  
  58.  <body>
  59.         <a href="javascript:openFrameless()">Click Here</a>
  60.  </body>
  61.  
  62.  
Dec 12 '07 #3
acoder
16,027 Expert Mod 8TB
Don't use document.all. Try something like this:
Expand|Select|Wrap|Line Numbers
  1.             var windowW=214 // wide
  2.             var windowH=398 // high
  3.             var windowX = 260 // from left
  4.             var windowY = 100 // from top
  5.             var urlPop = "http://srv08-za119/fcParmalatTest/browse2.aspx?o=739.html"
  6.             var title =  "This Is A Frameless Popup Window"
  7.  
  8.             var autoclose = true
  9.  
  10.             s = "width="+windowW+",height="+windowH;
  11.             var NFW;
  12.             function openFrameless() {
  13.             NFW = window.open("","popFrameless","fullscreen=yes,"+s);
  14.             NFW.blur();
  15.             window.focus();
  16.             NFW.resizeTo(windowW,windowH);
  17.             NFW.moveTo(windowX,windowY);
  18.             var frameString=""+
  19.             "<html>"+
  20.             "<head>"+
  21.             "<title>"+title+"</title>"+
  22.             "</head>"+
  23.             "<frameset rows='*,0' framespacing='0' border='0' frameborder='0'>"+
  24.             "<frame name='top' src='"+urlPop+"' scrolling='auto'></frame>"+
  25.             "<frame name='bottom' src='about:blank' scrolling='no'></frame>"+
  26.             "</frameset>"+
  27.             "</html>";
  28.             NFW.document.open();
  29.             NFW.document.write(frameString);
  30.             NFW.document.close();
  31.             }
  32.             NFW.focus();
  33.            if (autoclose) {
  34.            window.onunload = function(){NFW.close();}
  35.           }
  36.  
Dec 12 '07 #4
ismailc
200 100+
Hi, Thank You - I have to aplogize for the late reply as i was sick for a few days.

Unfortunately it does not work: click on link nothing happens

but at the bottom stand error on page when check the no decription!


Regards
Dec 14 '07 #5
acoder
16,027 Expert Mod 8TB
Remove the closing bracket } from line 31.
Dec 14 '07 #6
ismailc
200 100+
Hi, Thank You - we had a public holiday here in SA yesterday!

I removed line 31 but no luck.

When I clcik on the link to open in new window
the address is: javascript:openFrameless()
and: The Page cannot be displayed.

Could it be with the href calling the script?

Thank You

Regards
Dec 18 '07 #7
acoder
16,027 Expert Mod 8TB
The code displays a small popup window.

See this link for a note on fullscreen. It's not supported in the newer browsers including IE.
Dec 18 '07 #8
ismailc
200 100+
A Big Thank You, I really appreciate the help!

I only tried this because i could not change the border style of a drop down in HTML
Now i would have to think of another way!


Thank You
Dec 18 '07 #9
acoder
16,027 Expert Mod 8TB
I only tried this because i could not change the border style of a drop down in HTML
That should be possible. Post your code.
Dec 18 '07 #10
ismailc
200 100+
Thank You, Please have a look!

I searched on google & it is said that this is not possible as I want to change the border color of a drop down & size.

This works fine on a normal text box!
I'm coding in Flwocentric which has a style property & i can change the xslt file
but the problem is that it can't change the drop downs border.

One can change the text color, width but not the border in HTML.

Expand|Select|Wrap|Line Numbers
  1. height : 19px; border : 1px solid #CCCCCC; 
I saw a workaround where one has to add 4 images, one for each border side to hide the border, but i also don't know how.

Can you think of another way?

Regards
Dec 19 '07 #11
acoder
16,027 Expert Mod 8TB
Which browser are you using? In Firefox, for example, I can set the border whereas in IE6, it doesn't work. What you can do is put the select element in a span element and set the border on the span element.
Dec 20 '07 #12
ismailc
200 100+
Hi, Thank You & once again i apologize for the late reply as it was my Eid yesterday.

I really hope this can work as I am using IE6.

Can you please give an example:

<Span><Style>

Regards
Dec 21 '07 #13
acoder
16,027 Expert Mod 8TB
Just as an example, to give you the idea:
[HTML]<span style="border: 1px solid red;"><select><option>...</select></span>[/HTML]
Dec 21 '07 #14
ismailc
200 100+
Thank You, I have to leave now!
Will try on Monday!

Thanks
Dec 21 '07 #15
ismailc
200 100+
Hi,

It sets a border around the select(drop down), where I want to change the border attributes of the drop down.


Thank You

Regards,
Dec 24 '07 #16
acoder
16,027 Expert Mod 8TB
It sets a border around the select(drop down), where I want to change the border attributes of the drop down.
I'm afraid that's probably the best you can do in IE6/IE7 and possibly other browsers. See, for example, this page.
Dec 24 '07 #17
ismailc
200 100+
A Big Thank You for all your help, I really appreciate it!

Thank You
Dec 24 '07 #18
acoder
16,027 Expert Mod 8TB
No problem. You're welcome. Good luck in the rest of your project!
Dec 24 '07 #19

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Shayne H | last post by:
I want to be able to add a clock to the title of a VB.NET form. Simply updating the FormClass.Text property does not quite make it, the titile only changes once the form is minimised/maximised....
3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
2
by: Targa | last post by:
Im using the code below to pop up a window: It works fine except for that in the titlebar, my domain name is listed before the page title like below: http://mydomain.com - MyPopupwindowname -...
4
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"
4
by: Earl Teigrob | last post by:
I am thinking about using a popup window to edit settings that will affect parent asp.net page. The data that is changed in the popup window will be saved to the datastore that is loaded and...
2
by: Novice | last post by:
Hi all, as you can see from the subject, I'm try to use an asp:button to create a new browser window and output contents to new window But default if I do the Response.Write("..." The output...
9
by: Kavi | last post by:
in the pop up window, there is always a url before the title of the window, is there a way i can only have the title, and no url? i cannot give u a link to my page, but i have found an example...
4
by: Jon | last post by:
Hi, I am calling the function showpopupWindow(item) to open and write a popup window. When testing in IE6 locally the popup window displays my text in both the title and status bars but when...
2
by: jessy | last post by:
hi all, i need to be using a frameless popup window with no titlebar or status bar or anything , i found many scripts online for that frameless popup but seems i got the name wrong "frameless"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.