HighDots Forums  

what HTML can I include when using createPopup?

alt.html.dhtml alt.html.dhtml


Discuss what HTML can I include when using createPopup? in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jfburr@yahoo.com
 
Posts: n/a

Default what HTML can I include when using createPopup? - 11-25-2004 , 10:48 AM






I'm trying to use window.createPopup to make a simple
context-based help system, and I need to know how (or if) I can get
all the HTML in the innerHTML in the popup.

I've got it working as far as getting the popup to behave, and getting
simple tags like <B> </B> to function in the HTML, but so far when I
try to put in tags like <head></head> and <body></body> it doesn't
work, which means I can't reference a CSS or include any other header
info.

I've seen one or two examples posted on how to use CSS in this way but
they haven't worked when I tried them out.


Restated, I want to use something like this:

________


<SCRIPT LANGUAGE="JScript">

var oPopup = window.createPopup();
function pop()
{

var oPopupBody = oPopup.document.body;
//oPopupBody.style.backgroundColor = "#cccc99";
oPopupBody.style.border = "solid black 1px";
oPopupBody.innerHTML = "ENTIRE (albeit short) HTML PAGE HERE WITH HEAD
AND EXTERNAL CSS LINK";

oPopup.show(200, 80, 200, 50, document.body);
}
</SCRIPT>

___


I've done something similar with Robohelp but I want to do it with
just code, if possible.

Any help, TIA (including ideas on better places to post this if this
isn't the best). Examples most welcome.

Reply With Quote
  #2  
Old   
Jantje zag eens Pruimen hangen
 
Posts: n/a

Default Re: what HTML can I include when using createPopup? - 11-25-2004 , 11:25 AM






Hey Jfbarr,

Whey do you make it so hard on yourselff?
just open a (own cretated html page) as a window popup with the
size/height as you wish

ook at this ex.

mainpage (from where you wish to fire off the popupwindow)
between the <head></head> signs you put a little javascript as yours

<script language=javascript>
function PopUpVenster(w,h,pagina,titel)
{

window.open(pagina,titel,"toolbar=0,location=0,dir ectories=0,status=0,menubar=0,scrollbars=0,resizab le=1,copyhistory=0,width="+w+",height="+h);
}
</script>

then in the page somewhere you can call your other page with the
normal <A> tag as in this example
<a
href="javascript:PopUpVenster(760,500,'http://www.em-design.be/test.html','clip');">Mytestpage</A>


Put a little attention that there are NO ' quotes ' on the
chifres/numbers but only around teh textvalues
W stands here for the WEIDTH of the new to openen Window
H stands yep indeed for the height
pagina stands for the url adress of the page you wish to open in the
popupwindow
clip stands for the tittla that you want the popupwindow to give

greetings
Eddy
Webdevelopper EM-Design



On 25 Nov 2004 07:48:49 -0800, jfburr (AT) yahoo (DOT) com wrote:

Quote:
I'm trying to use window.createPopup to make a simple
context-based help system, and I need to know how (or if) I can get
all the HTML in the innerHTML in the popup.

I've got it working as far as getting the popup to behave, and getting
simple tags like <B> </B> to function in the HTML, but so far when I
try to put in tags like <head></head> and <body></body> it doesn't
work, which means I can't reference a CSS or include any other header
info.

I've seen one or two examples posted on how to use CSS in this way but
they haven't worked when I tried them out.


Restated, I want to use something like this:

________


SCRIPT LANGUAGE="JScript"

var oPopup = window.createPopup();
function pop()
{

var oPopupBody = oPopup.document.body;
//oPopupBody.style.backgroundColor = "#cccc99";
oPopupBody.style.border = "solid black 1px";
oPopupBody.innerHTML = "ENTIRE (albeit short) HTML PAGE HERE WITH HEAD
AND EXTERNAL CSS LINK";

oPopup.show(200, 80, 200, 50, document.body);
}
/SCRIPT

___


I've done something similar with Robohelp but I want to do it with
just code, if possible.

Any help, TIA (including ideas on better places to post this if this
isn't the best). Examples most welcome.


Reply With Quote
  #3  
Old   
jfburr@yahoo.com
 
Posts: n/a

Default Re: what HTML can I include when using createPopup? - 11-26-2004 , 09:58 AM



Thanks for the reply, I didn't explain the main consideration perhaps:
I want a popup with no title bar. This is the tricky part. I have a
"close" button on the new popup.

My understanding is that only createPopup will make a popup like this.
It does, but as I say, I can't get the formatting that I want into it.
(the "titlebar=no" doesn't work when just creating a new window)

Thanks,

jfburr


Jantje zag eens Pruimen hangen <skooby (AT) dooby (DOT) com> wrote

Quote:
Hey Jfbarr,

Whey do you make it so hard on yourselff?
just open a (own cretated html page) as a window popup with the
size/height as you wish

ook at this ex.

mainpage (from where you wish to fire off the popupwindow)
between the <head></head> signs you put a little javascript as yours

script language=javascript
function PopUpVenster(w,h,pagina,titel)
{

window.open(pagina,titel,"toolbar=0,location=0,dir ectories=0,status=0,menubar=0,scrollbars=0,resizab le=1,copyhistory=0,width="+w+",height="+h);
}
/script

then in the page somewhere you can call your other page with the
normal <A> tag as in this example
a
href="javascript:PopUpVenster(760,500,'http://www.em-design.be/test.html','clip');">Mytestpage</A


Put a little attention that there are NO ' quotes ' on the
chifres/numbers but only around teh textvalues
W stands here for the WEIDTH of the new to openen Window
H stands yep indeed for the height
pagina stands for the url adress of the page you wish to open in the
popupwindow
clip stands for the tittla that you want the popupwindow to give

greetings
Eddy
Webdevelopper EM-Design



On 25 Nov 2004 07:48:49 -0800, jfburr (AT) yahoo (DOT) com wrote:

I'm trying to use window.createPopup to make a simple
context-based help system, and I need to know how (or if) I can get
all the HTML in the innerHTML in the popup.

I've got it working as far as getting the popup to behave, and getting
simple tags like <B> </B> to function in the HTML, but so far when I
try to put in tags like <head></head> and <body></body> it doesn't
work, which means I can't reference a CSS or include any other header
info.

I've seen one or two examples posted on how to use CSS in this way but
they haven't worked when I tried them out.


Restated, I want to use something like this:

________


SCRIPT LANGUAGE="JScript"

var oPopup = window.createPopup();
function pop()
{

var oPopupBody = oPopup.document.body;
//oPopupBody.style.backgroundColor = "#cccc99";
oPopupBody.style.border = "solid black 1px";
oPopupBody.innerHTML = "ENTIRE (albeit short) HTML PAGE HERE WITH HEAD
AND EXTERNAL CSS LINK";

oPopup.show(200, 80, 200, 50, document.body);
}
/SCRIPT

___


I've done something similar with Robohelp but I want to do it with
just code, if possible.

Any help, TIA (including ideas on better places to post this if this
isn't the best). Examples most welcome.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.