Hello,
Within a form I created I have placed links that users can click on to
view information. I am trying to write a javascript code so it opens in
a sized window but I can't seem to figure this out. So far I have come
up with the following:
<script language="JavaScript" type="text/javascript">
var WindowObjectReference; // global variable
function openRequestedPopup()
{
WindowObjectReference =
window.open("http://egsrosintra1/egs%20intranet/ACPCodes.html",
"ACP Codes",
"width=420,height=230,resizable,scrollbars=yes,sta tus=1");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>BPCS and Logpro User Authority Form</title>
<style type="text/css">
And in the text code: <p><a
href="javascript:OpenRequestedPopup('http://egsrosintra1/egs%20intranet/ACPCodes.html');">ACP
- Accounts Payable</a><br />
Any ideas as to why it is not working correctly? And when I need to add
the additional criteria to open the other links where would I insert
that code?
Thanks in advanced,
Justine 5 2226
Look at your function... case sensitive + argument list is completly
not the same...
I still can't seem to get it to work. I looked at the function and
noticed in my href= that the "O" should have not been capitalized. Then
I changed the rest to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<<<-------------SCRIPT STARTS HERE-------------------------->>>>
<script language="JavaScript" type="text/javascript">
var WindowObjectReference; // global variable
function openRequestedPopup()
{
WindowObjectReference = window.open("", "", "width=420,height=230");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>BPCS and Logpro User Authority Form</title>
<style type="text/css">
<!--
..style1 {
color: #666666;
font-style: italic;
}
..style3 {
font-size: 18px;
color: #000066;
}
#Layer1 {
position:absolute;
left:570px;
top:491px;
width:262px;
height:322px;
z-index:1;
}
..style8 {font-size: 18px; color: #FF0000; }
-->
</style>
</head>
<body>
<div id="Layer1" style="position: absolute; left: 540px; top: 476px;
width:235px">
<p align="center"><u><font color="#808080" size="4"><b>Transaction
Codes:</b></font></u></p>
<<<<-----------------------------------ANCHOR HREF TAG IS
BELOW-------------------->>>>:
<p><a
href="javascript:openRequestedPopup("http://egsrosintra1/egs%20intranet/ACPCodes.html",
"ACP Codes");">ACP - Accounts Payable</a><br />
<a href="ACRCodes.html" target="_blank">ACR - Accounts
Receiveable</a><br />
<a href="BILCodes.html" target="_blank">BIL - Billing</a><br />
<a href="BOMCodes.html" target="_blank">BOM - Bill of Material</a><br
/>
<a href="CAPCodes.html" target="_blank">CAP - Capacity
Planning</a><br />
<a href="CSTCodes.html" target="_blank">CST - Cost</a><br />
<a href="DRPCodes.html" target="_blank">DRP - Distribution Resource
Planning</a><br />
<a href="FORCodes.html" target="_blank">FOR - Forecasting</a><br />
<a href="INVCodes.html" target="_blank">INV - Inventory
Management</a><br />
<a href="JITCodes.html" target="_blank">JIT - Just in Time /
Repetitive Mgmt.</a><br />
MDM - Manufacturing Data
</p>
</div>
<h1 align="center" class="style1">BPCS and LogPro User Authority
Form</h1>
<form action="SecurityReqThanks.asp" method="post"
name="SecurityRequest" target="_blank" id="SecurityRequest">
<p class="style3">User Information -All fields are required: </p>
<p>
<label>First Name:
<input name="UserFirstName" type="text" id="UserFirstName"
size="25" maxlength="15" />
</label>
<label>Last Name:
<input name="UserLastName" type="text" id="UserLastName" size="22"
maxlength="30" />
</label>
<br />
<label>ID Number:
<input name="UserID" type="text" id="UserID" size="24"
maxlength="10" />
</label>
<label>Site:
<select name="UserSite" id="UserSite">
<option value="Select" selected="selected">Select</option>
<option value="Amiens, France">Amiens, France</option>
<option value="Atizapan, Mexico">Atizapan, Mexico</option>
<option value="Celina, Tennessee">Celina, Tennessee</option>
<option value="Columbus, Nebraska">Columbus, Nebraska</option>
<option value="East Granby, Connecticut">East Granby,
Connecticut</option>
<option value="Elmira, Canada">Elmira, Canada</option>
<option value="Fullerton, California">Fullerton,
California</option>
</select>
</label>
<br />
<label>Data Base:
<select name="DataBase" id="DataBase">
<option value="Select" selected="selected">Select</option>
<option value="ECM / Sola / Heat">ECM / Sola / Heat</option>
<option value="EZ Heat Canada">EZ Heat Canada</option>
<option value="EZ Heat U.S.">EZ Heat U.S.</option>
</select>
</label>
</p>
<p>
<label><span class="style3">Copy Authority Information:</span><br
/>
First Name:
<input name="CopyFirstName" type="text" id="CopyFirstName"
maxlength="15" />
Last Name:
<input name="CopyLastName" type="text" id="CopyLastName"
maxlength="30" />
<br />
ID Number:
<input name="CopyAuthID" type="text" id="CopyAuthID" size="23"
maxlength="10" />
</label>
</p>
<p class="style3">Authority Exceptions</p>
<ol>
<li><a href="#TransactionCodes">Transaction Codes</li></a>
<li><a href="#WarehouseCodes">Warehouse Codes</li></a>
<li><a href="#TransactionEffectCodes">Transaction Effect
Codes</li></a>
<li><a href="#LogProDeptAuthority">LogPro Department Authority
</li></a>
<li><a href="#UserMenu">User Menus</li></a>
</ol>
<p class="style8"><u>Please separate each code to be
"removed" or "added" with a comma:</u></p>
<label> <span class="style3"><a id="TransactionCodes"
name="TransactionCodes">1. Transaction Codes </a></span><br />
<br />
Remove:<br />
<textarea name="TransactionRemove" cols="60" rows="5"
id="TransactionRemove"></textarea>
</label>
<p>
<label>Add: <br />
<textarea name="TransactionAdd" cols="60" rows="5"
id="TransactionAdd"></textarea>
</label>
</p>
<p class="style3"><a id="WarehouseCodes" name="WarehouseCodes">2.
Warehouse Codes</a> </p>
<p>
<label>Remove: <br />
<textarea name="WarehouseRemove" cols="60" rows="2"
id="WarehouseRemove"></textarea>
</label>
</p>
<p>
<label>Add: <br />
<textarea name="WarehouseAdd" cols="60" rows="2"
id="WarehouseAdd"></textarea>
</label>
</p>
<p class="style3"><a id="TransactionEffectCodes"
name="TransactionEffectCodes">3. Transaction Effect Codes (for INV500
and PUR550)</a></p>
<p>
<label>Remove:<br />
<textarea name="TransactionEffectRemove" cols="60" rows="2"
id="TransactionEffectRemove"></textarea>
</label>
</p>
<p>
<label>Add:<br />
<textarea name="TransactionEffectAdd" cols="60" rows="2"
id="TransactionEffectAdd"></textarea>
</label>
</p>
<p class="style3"><a id="LogProDeptAuthority"
name="LogProDeptAuthority">4. LogPro Department Authority</a></p>
<p>
<label>Remove:<br />
<textarea name="LogProRemove" cols="60" rows="2"
id="LogProRemove"></textarea>
</label>
</p>
<p>
<label>Add:<br />
<textarea name="LogProAdd" cols="60" rows="2"
id="LogProAdd"></textarea>
</label>
</p>
<p class="style3"><a id="UserMenu" name="UserMenu">5. User
Menus</a></p>
<p>
<label>Remove:<br />
<textarea name="UserMenuRemove" cols="60" rows="2"
id="UserMenuRemove"></textarea>
</label>
</p>
<p>
<label>Add:<br />
<textarea name="UserMenuAdd" cols="60" rows="2"
id="UserMenuAdd"></textarea>
</label>
</p>
<p>
<label><span class="style3">Comments:</span><br />
<textarea name="Comments" cols="60" rows="5"
id="Comments"></textarea>
</label>
</p>
<p>
<label>Authorized Submitter:
<input name="AuthorizedSubmitter" type="text"
id="AuthorizedSubmitter" size="40" maxlength="40" />
</label>
<input name="SecurityDate" type="hidden" id="SecurityDate" />
04/04/2006</p>
<p>
<input type="submit" name="Submit" value="Submit" />
  ;
<input type="reset" name="Submit2" value="Reset" />
</p>
<p> </p>
</form>
</body>
</html>
Any help or refereneces are appreciated
Thanks once again,
Justine
NEVER post entirely code like that... it is SO useless
I said check your arguments :
function openRequestedPopup() <---- no argument here
and
javascript:openRequestedPopup("http://egsrosintra1/egs%20intranet/ACPCodes.html",
"ACP Codes"); <---- arguments here
change your function add 2 arguments: a1, a2, and do something like
that
WindowObjectReference = window.open(a1, a2, "width=420,height=230");
The a2 is a title of the page and i don't think spaces are allowed
GRenard said the following on 4/6/2006 3:58 PM:
Please quote what you are replying to.
If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers. <URL: http://www.safalra.com/special/googlegroupsreply/ > NEVER post entirely code like that... it is SO useless
I said check your arguments :
function openRequestedPopup() <---- no argument here and javascript:openRequestedPopup("http://egsrosintra1/egs%20intranet/ACPCodes.html", "ACP Codes"); <---- arguments here
The original code had javascript:OpenRequestedPopup with a capital O,
the function name had a lowercase o.
change your function add 2 arguments: a1, a2, and do something like that WindowObjectReference = window.open(a1, a2, "width=420,height=230");
The a2 is a title of the page and i don't think spaces are allowed
They aren't in IE.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ JN*****@gmail.com wrote : Hello,
Within a form I created I have placed links that users can click on to view information. I am trying to write a javascript code so it opens in a sized window but I can't seem to figure this out. So far I have come up with the following:
<script language="JavaScript" type="text/javascript">
Language is deprecated; just use type. Idem est:
<script type="text/javascript"> http://www.w3.org/TR/html401/interac...#adef-language
var WindowObjectReference; // global variable
function openRequestedPopup() { WindowObjectReference = window.open("http://egsrosintra1/egs%20intranet/ACPCodes.html", "ACP Codes",
"strWindowName
This is the string that just names the new window. Such string can
be used to be the target of links and forms when the target attribute of
an <a> element or of a <form> is specified. This [Window name] string
parameter *_should not contain any blank space_*." http://developer.mozilla.org/en/docs...and_parameters
Idem est:
"ACPCodes" or "ACP_Codes"
"width=420,height=230,resizable,scrollbars=yes,sta tus=1");
It's better to define the function like this:
<script type="text/javascript">
var WindowObjectReference;
function openRequestedPopup(strUrl, strWindowName)
{
if(!WindowObjectReference || WindowObjectReference.closed)
{
WindowObjectReference =
window.open(strUrl, strWindowName,
"width=420,height=230,location,resizable,scrollbar s,status");
}
else
{
WindowObjectReference.focus();
};
}
</script>
(...)
and then to structure the call like this:
<p><a href="http://egsrosintra1/egs%20intranet/ACPCodes.html"
target="ACPCodes"
onclick="openRequestedPopup(this.href, this.target); return false;"
title="Clicking this link will create a new window or will bring up back
on top an already opened secondary window">Show the ACP -- Accounts
Payable</a></p>
In the openRequestedWindow, I added location because its presence will
be forced in IE 7.
The above code could be furthermore improved if we knew for what this
would be used.
} </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>BPCS and Logpro User Authority Form</title> <style type="text/css">
And in the text code: <p><a href="javascript:OpenRequestedPopup('http://egsrosintra1/egs%20intranet/ACPCodes.html');">ACP - Accounts Payable</a><br />
Never use "javascript :" pseudo-protocol, even if your webpage was to go
on an intranet. "javascript :" pseudo-protocol will break in many
situations and contexts, even on an intranet. An href attribute value
should *_always_* have a real link. http://developer.mozilla.org/en/docs.....29.22_....3E http://www.panix.com/~aahz/javascript.html#remove http://jibbering.com/faq/#FAQ4_24
Gérard
--
remove blah to email me This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: venkatesh |
last post by:
Hi Members,
I have used the below mentioned code to open a html page in a new
browser. The window size is 200 x 300. In that browser, I've given
code to open another browser of the same size....
|
by: Mountain Man |
last post by:
Hi,
I'm trying to use window.open from inside a user defined function, and
it's not working. A code example is shown below. Thanks for any help
you can give.
Mountain Man
============
...
|
by: carlor |
last post by:
Hi there,
I have a form that contains a link button. When the user clicks the link
button I need to enable a couple of other buttons on the page and open a new
browser window giving it focus...
|
by: Csaba Gabor |
last post by:
Up until a few weeks ago, javascript code like
window.open("http://mydomain.com", "windowName");
would always bring my new or reused window to the top, with focus.
Lately, Firefox (Deer park...
|
by: DOM_scripter |
last post by:
Hi, I want to set a picture on the fly. For this I have a html file
with only an <img> tag - kind of a placholder.
So I do myWindow=window.open("data/myFile.html"). Then I set the src
attribute of...
|
by: Jeff |
last post by:
hey guys,
this may not be the right place, but i wanted to give it a shot.
i have an if statement, based on the data of a mssql db.
if the if is .eof
do nothing
else
|
by: shotokan99 |
last post by:
i have this function:
function doit(){
if (dow.cpmake.selectedIndex==1 && dow.cpmodel.selectedIndex==0){
window.open('http://www.mysite.com/mycab.cab');
}
}
using ie this using will...
|
by: ting ting |
last post by:
I am working on a ASP.net 2.0 version and I want to click a button to open a window. I was using window.open to write at vb side.
Response.Write("<Script...
|
by: CreativeMind |
last post by:
hi,
i have a page calendar.aspx which returns selected date i.e
window.returnValue=selectedDate; window.close(); it works fine with IE
but not for Firefox.
i tried...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |