![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. |
#3
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |