473,566 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pass text to popup window

I would like to pass text to a popup window to save creating a new
html file for each help topic.
I would like to have a value for the heading, a value for the text,
code for printing the help page, and code to close the window.

------------------------------------------
the help window code is following

<SCRIPT LANGUAGE="JavaS cript">
<!-- Begin
function printWindow() {
bV = parseInt(naviga tor.appVersion) ;
if (bV >= 4) window.print();
}
// End -->
</script>

</head>
<body>
<h1 align="center"> How to View Results</h1>

<ol>
<li>Locate the Application
<li>Leave your mouse over the application and the
popup window displayed
<li>Press the Page Down button on your keyboard
</ol>

<br><br>
<table width="100%"><t r><td>
<a href="javascrip t:printWindow() ">
Print This Help Page</a>
</td><td align="right">
<a href="javascrip t:onclick=windo w.close()">
Close This Help Page</a>
</td></tr></table>
------------------------------------------------
Currently I use the following code for a popup.

<script language="JavaS cript">
function popup(theURL){
window.open(the URL,"pop","heig ht=300,width=30 0")
}
</script>
<a href="bfmenu.ht ml" value="tip_prin t.html"
onClick="popup( this.value)">Pr int</a>...

<a href="bfmenu.ht ml" value="tip_view .html"
onClick="popup( this.value)">Vi ew entire results</a>...

Jul 20 '05 #1
3 2888
In article <8c************ *************** ***@news.terane ws.com>,
tr*****@netfron t.net enlightened us with...
I would like to pass text to a popup window to save creating a new
html file for each help topic.
I would like to have a value for the heading, a value for the text,
code for printing the help page, and code to close the window.


Want mine?

It uses a javascript array for help menu values and the call tells which
menu to open.
The window is reused if open. The window document is written dynamically
with the text value in the array.

You can add simple code to close it (or print it) with a link. My users
know how to click on the 'x'. :)

--
--
~kaeli~
You feel stuck with your debt if you can't budge it.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2
I would love it. If you would prefer to E-Mail it to me (remove
nospam)
bf***@nospamsof thome.net
"kaeli" <ti******@NOSPA M.comcast.net> wrote in message
news:MP******** *************** *@nntp.lucent.c om...
In article <8c************ *************** ***@news.terane ws.com>,
tr*****@netfron t.net enlightened us with...
I would like to pass text to a popup window to save creating a new
html file for each help topic.
I would like to have a value for the heading, a value for the text, code for printing the help page, and code to close the window.

Want mine?

It uses a javascript array for help menu values and the call tells

which menu to open.
The window is reused if open. The window document is written dynamically with the text value in the array.

You can add simple code to close it (or print it) with a link. My users know how to click on the 'x'. :)

--
--
~kaeli~
You feel stuck with your debt if you can't budge it.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #3
In article <2a************ *************** ***@news.terane ws.com>,
tr*****@netfron t.net enlightened us with...
I would love it. If you would prefer to E-Mail it to me (remove
nospam)
bf***@nospamsof thome.net


It's not all that big (well, I took out all but two of my help screens
for the sake of example; the real file is quite long with a help screen
for every form field). Watch for word wrap.
Note: tested in IE5+/NN4+/Moz1.2 only. Some functions may not work in
other browsers. This is used for an intranet app where I know my users,
so if you don't, add error checking and fallback. However, I'm not doing
anything fancy, and I use the evil javascript: in a link so it works in
NN4 (no onClick of image in NN4).

File 1: jsHelp.js: put help descriptions in here like you see with the
basic "help" and "h_qty". Note that all my "Screens" except "help" begin
with "h_" to keep var names unique, as many js files are included in the
site.

-----------------------
/*jsHelp.js
Has help functions

var h_window = null;
var h_array = new Array();
/* descriptions that remain constant */
h_array["help"] = "<p>Click on any of the help icons to bring up a
javascript window "+
"with relevant information.</p>";
h_array["h_qty"] = "<h1>Quanti ty</h1>" +
"<p>Description : the number of this item in this
order. Left blank, the quantity will be 1.</p> ";

// put more below this

/* functions that get called when user presses a help button */
function openHelp(screen Name)
{
if (!h_window || h_window == null || typeof h_window == "undefined" ||
h_window.closed || !h_window.docum ent)
h_window = window.open("", "Help","height= 200,width=
200,scrollbars= yes,resizable=y es");
var doc = h_window.docume nt;
doc.open();
doc.writeln("<h tml><head><titl e>Help</title>");
doc.writeln("<l ink rel='stylesheet ' type='text/css'
href='myStylesh eet.css'>");
doc.writeln("</head><body>");
doc.writeln(h_a rray[screenName]);
// add close and / or print links/buttons here
doc.writeln("</body></html>");
doc.close();
h_window.focus( );
return;
}

/* end jsHelp.js */

----------------------------

in the html file, in the head
<script language="javas cript" type="text/javascript"
src="jsHelpFunc tions.js"></script>

in the body...
I use a help icon for the users to click on. Modify as appropriate.
<a href="javascrip t:openHelp('hel p)"><img src="help.gif" width="15"
height="15" border="0"></a>
If using new browsers only, change to onClick of image, which is better.
Old NN doesn't support that and not sure on Opera support.

To make a close button or link, use self.close().
To mail, use self.print() (I think).
You would add that to what gets printed in the window by adding it in
the help file where I put that comment in.

HTH

--
--
~kaeli~
Once you've seen one shopping center, you've seen a mall.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #4

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

Similar topics

1
2725
by: William Starr Moake | last post by:
The browser-based WYSIWYG editor I'm developing has a popup window with a form that generates table code from user input (width, border, cols, rows, bgcolor.) But the user has to copy-paste the generated table HTML into the editor window as it works now. How do I pass the form-generated HTML directly to the editor window so copy-paste is not...
1
12972
by: TErnst | last post by:
Hello All.... What I am attempting to do is have a link/button on a page (testpopup.cfm) that opens a popup page (popupwindow.cfm). The popup page displays a resultset from a query and the selected record needs to be passed through a query string/URL parameter to the original calling page and will be available in the body onload event of...
2
9237
by: umashd | last post by:
Hi, I am doing a web based project for my graduation. I studied bit of java for backend processesing and javascript for the client. Here is the scenario. In the FORM, I use INPUT TYPE=text VALUE=" " NAME=cat, and a gif next to it. User will click on the icon to get a new window. In the new window, the user selects a value from the pull...
4
9792
by: dyw55a | last post by:
I have 2 webform in vb.NET application. On Webform1, I have one text box1 and one button. on Webform2, I have one text box . I need transfer the value of textbox 1 in webform1 to textbox2 in webform2. and popup webform2 when user click on the button on webform1. I have code in webform1: Private Sub Page_Load(ByVal sender As System.Object,...
1
1748
by: kebabkongen | last post by:
Hi, I am working on an application where I make a popup window with a long list of users (with checkboxes) I am trying to figure out how to pass the list of selected users to the parent window. I have seen this be done by one field, such as "date pickers" from a calendar popup. Can anyone please give me a pointer to how I place the...
6
4383
by: Ellie | last post by:
In my program the user clicks on a link and using the window.open function, opens a new window. I pass a url to the new window like this: <a href="#" onClick="window.open('../quotescreenwindow.php?enroll_id=enrollwindowprime.php', 'WindowC', 'width=750,height=800,scrollbars=yes');"> In the new window that just opened called...
1
19399
by: praveenit | last post by:
hi, I am writing a small java script code where , when the textbox is clicked a pop up window is opened . on entering some data in the text area present in pop up window and pressing ''save" button the pop up is closed and the value is put in the text box of parent window. Now the value is getting passed from pop up to parent but from parent to...
1
9345
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i need to open the new page in the main page window with passing the two textbox parameters into the new page. Program opens the new page but dont know...
18
3900
by: vjayis | last post by:
hi i am having a form which contains an text field., when the submit button is clicked the value of the textfield should be taken into the new popup window to display the results. i had tried but didnt get the solution., could anyone help me
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7644
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5484
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.