473,396 Members | 2,052 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,396 software developers and data experts.

netscape vs ie

I have the following function that works under netscape 7, but doesn't
work under ie. What changes should be made to make it run under ie?

function ButFunction()
{
var Page;
var s;
var d;
var h, w;

s = document.SrchForm.SearchDB.value;
d = document.SrchForm.DetailDB.value;
d = d - 1;

Page = "Table_Page.html?" + "sch=" +
document.SrchForm.SearchDB.options[s].text + "&" +
"dtl=" + document.SrchForm.DetailDB.options[d].text;
var newWindow = open(Page, "Records Selected", "fullscreen=yes");
}
Jul 20 '05 #1
3 1801
"Terry A. Haimann" <te***@yngstr.oldboy.com> writes:
I have the following function that works under netscape 7, but doesn't
work under ie. What changes should be made to make it run under ie?
There are three things that you need to tell when you ask for help
with code that doesn't work:

1) What did you do? The code is a beginning, but how is it called?
What is on the page? What browser are you using (you said this one)?
2) What did you expect to happen? I.e., what was your intention. It
is hard to tell you what to change if we don't know the goal.
3) What really happened? "Didn't work" is not sufficient. We know
that, otherwise you wouldn't ask. Error messages, or their absence,
and any visible effect, or absence of it.
function ButFunction()
{
var Page;
var s;
var d;
var h, w;

s = document.SrchForm.SearchDB.value;
I prefer
s = document.forms['SrchForm'].elements['SearchDB'].value;
However, if it works in Mozilla/Netscape without these collections,
then it probably also works in IE.
var newWindow = open(Page, "Records Selected", "fullscreen=yes");


Most likely error: Window names are not allowed to contain spaces.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
Terry A. Haimann wrote on 19 Nov 2003:
I have the following function that works under netscape 7, but
doesn't work under ie. What changes should be made to make it
run under ie?

function ButFunction()
{
var Page;
var s;
var d;
var h, w;

s = document.SrchForm.SearchDB.value;
d = document.SrchForm.DetailDB.value;
d = d - 1;
What exactly are you trying to do here? The Select.options array
expects an numerical index, so unless the value of each option in the
select menu is its own index, your code below shouldn't work. If the
option values do contain their index, you've picked an awkward way of
doing things. This would probably be better:

var s = document.forms['SrchForm'].SearchDB.selectedIndex;
var d = document.forms['SrchForm'].DetailDB.selectedIndex--;

There's also no need for the separate decrement, and the values could
be a little more meaningful (if appropriate).

Note: Select.selectedIndex will return zero-based indexes, so using
the above means that the first option in the DetailDB menu cannot be
selected. In that case, 'd' would be -1 and that's out of range for
the Select.options array.
Page = "Table_Page.html?" + "sch=" +
document.SrchForm.SearchDB.options[s].text + "&" +
"dtl=" + document.SrchForm.DetailDB.options[d].text;
var newWindow = open(Page, "Records Selected", "fullscreen=yes");


'fullscreen' is not a valid feature for a window (not by my
references, anyway), and it has been said in this group many times
now that trying to manipulate the user's browser dimensions is a bad
idea.

'Records Selected' is invalid. Remove the space or replace it with an
underscore. A window name is the same as a frame name and must begin
with a letter, and only contain letters, digits, hyphens (-),
underscores (_), periods (.), and colons (:). However, if you refer
to a name that contains anything other than alphanumeric characters,
you should use the appropriate collection and "quote" the name (like
I did earlier, using document.forms).

You should also use window.open(...) to make the call to
window.open() less ambiguous, and to avoid accidentally calling
document.open().

Hope that helps,

Mike

--
Michael Winter
M.******@blueyonder.co.uk.invalid (remove ".invalid" to reply)
Jul 20 '05 #3
On Thu, 20 Nov 2003 00:39:43 +0100, Lasse Reichstein Nielsen wrote:
Most likely error: Window names are not allowed to contain spaces.


Yes that was the problem, Thx
Jul 20 '05 #4

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

Similar topics

1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
1
by: mark.reichman | last post by:
First off.. Thanks to Grant Wagner for help in a previous thread related to this one. I am at a total loss... I have multiple fields in a form with the same name. Lets call the fields with the...
9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
2
by: SabMan | last post by:
I understand that document.layers is no longer supported in Netscape 7.1 but I am not sure on how to fix the code so that it will work with Netscape 7.1. I understand that document.all is no...
26
by: Roger Desparois | last post by:
Hi, I need help : I found the simplest and most precise way to open and close submenu layers. it works perfectly with IE, but for some odd reason NS won't recognize it. Can anyone tell me why...
6
by: qqq | last post by:
I'm a relative newbie... I'd like my site to support Netscape browsers. For a page I set 'TargetSchema' to 'IE 3.02/Netscape 3'. When I insert label or textbox web controls on the page, they...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
4
by: Nathan Sokalski | last post by:
I was testing out a page of mine that displays the information from Page.Request.Browser. It works exactly as I expected in Internet Explorer and Netscape 4.75 (I didn't expect much in Netscape...
7
by: Joe | last post by:
I've been playing around with atlas for hte past couple days and its very impressive. However the standard browser here is Netscape, specifically: Netscape 7.02 Mozilla/5.0 (Windows; U; Windows NT...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
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.