DotNet & Netscape4

A

amos

Hi

I'm experiencing a real nasty thing about dotnet.

I've made a big application in dotnet and I would like
to use ILAYERS for netscape 4.

You CAN NOT USE Layers and Form buttons in Netscape 4
if you save your page in .aspx

Try to save the following code in .html and in .aspx
then look at those two pages in Netscape 4 :

<script language=javascript>
function ChangeIntitule()
{
if (document.Form1.Origine.selectedIndex==0)
stringX="";
if (document.Form1.Origine.selectedIndex==1)
stringX="Exemple: '1992-1998 : Ecole supérieure d'art dramatique de Paris'";
if (document.Form1.Origine.selectedIndex==2)
stringX="Exemple: '2002 : Sara Pearson, Patrik Widrig (Contact Improvisation)'";
if (document.Form1.Origine.selectedIndex==3)
stringX="Exemple: '2003 : Cinéma - Film Snatch - figuration 3 jours'";
if (document.Form1.Origine.selectedIndex==4)
stringX="Exemple: 'Mime', 'Pianiste', 'Trapeziste', etc..";
if (document.Form1.Origine.selectedIndex==5)
stringX="Exemple: 'yoga', 'photographie', 'sculpture', etc..";

if (document.layers){

document.countdownnsmain.document.countdownnssub.document.write(stringX);
document.countdownnsmain.document.countdownnssub.document.close();
}
else if (document.all||document.getElementById)
crosscount.innerHTML=stringX;
}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<form name=Form1>
<select name="Origine" id="Origine" class="letras" onchange="ChangeIntitule();">
<option value="-1">Choisissez une rubrique</option>
<option value="0">Etudes / Formation Artistique</option>
<option value="1">Stage / Séminaire</option>
<option value="2">Expérience professionnelle</option>
<option value="3">Activité Artistique</option>
<option value="4">Loisirs</option>

</select><input type=text name=sqdf>
</form>
<form name=qsd>
<ilayer id="countdownnsmain" width=300; height=50; visibility=show>
<layer id="countdownnssub" width=300; height=50; left=0 top=0> </layer>
</ilayer>
</form>


You'll see that all the codes that you wrote for Netscape4 whith
the ILAYERS don't work if you save the page as .aspx.


IS THIS A HUGE BUG OF DOT NET ????????
 
K

Kevin Spencer

IS THIS A HUGE BUG OF DOT NET ????????

No. It's a huge gap in your understanding of ASP.Net.

ASP.Net is a technology which is chiefly used to create HTML documents
dynamically. What the HTML content of those documents is ENTIRELY UP TO YOU.
There are no restrictions. You have total control. You control the
horizontal. You control the vertical. Therefore, if you write an ASP.Net app
such that the HTML it spits out isn't working in a particular browser, YOU
made a mistake.

In conclusion:

A little learning is a dang'rous thing. Drink deep, or taste not the Pierian
spring. (Alexander Pope)

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
C

Curt_C [MVP]

And what's the error/issue specifically?
This is all clientside scripting, not sure what it has to do with server
coding?
 
D

darrel

IS THIS A HUGE BUG OF DOT NET ????????

DotNet, by default, doesn't really go out of its way to write valid markup
or cross-browser client side scripts for you. If that's a big concern, then
that's something you need to tweak yourself when writing your own HTML
output controls.

-Darrel
 
S

Scott M.

If you've added the client-side JavaScript yourself and it doesn't work,
it's because there is a problem with the script. VS.NET doesn't change your
client-side script.
 
A

amos

Don't give me lessons, take a big breath, read slowly and put your ego
of speed thinker on the side (I talk to the first guy of Microsoft who
answers the question) but try to understand the question :

When you use ILAYERS a LAYERS in Netscape 4 and you try to write in it
any text with the open and write methods (like if you use innerHTML &
SPAN for other browsers), it will work in HTML or ASP, but the code
will not work properly when compiled by the dotnet motor on ASPX.

To test this, use the code I gave or any other code that writes in a
LAYER,
and view it in NETSCAPE 4 in HTML classic and in a ASPX page you
compiled.

You'll see somthing really amazing that is a bug I think (I hope
not..) of DOT NET :

The two pages you'll see (the .HTML classic and the .ASPX) have the
same source (type view source in NETSCAPE4), but the one with the
..HTML extension works and the one with .ASPX bugs

I think you guys with Microsft should look at this problem closer
before releasing the version 2.0 of the framework.


Anyway thank you by advance for any help.
 
P

Patrice

Just check the source client side ("view source" or similar) to see if it's
different.

Let us know.

Patrice
 
T

TJS

I think it does not work because you have two forms in your html. In aspx,
pages are treated as postback and only use 1 form.
 
P

Patrice

Similar or exactly the same ?

ASP.NET doesn't have anything to do client side. If the source is the same
it should work the same. The only things that annoys me a bit is that the
default encoding for ASP.NET is utf-8 while you are using another encoding.
It could perhaps mess the JavaScript but likely not up to this point... What
is the exact behavior you see ? (Javascript doesn't work nut not error ?)

Unfortunately I don't have NS4 handy.

Let us know.

Patrice

--
 
A

amos

In fact, I post this here because I would like that the Microsoft
developers take care of a few things for the version 2.0 of the
framework (and I know they read those newsgroups).

For example, the session timeouts that don't work well (but this is
another point..)


So, to come back to my point, I'll try to be clear. I know this is a
bug from DOTNET, I develop for more than 10 years, and I don't annoy
people for nothing.


Okay, so try to make this example :

make an .aspx very simple with a ILAYER in it with a 'this is a test'
text inside the ILAYER.

Then, make a button or a select that changes the 'this is a test' in
'hello world' (with the write method, the only one that works to
change the content of an ILAYER).

Compile the .aspx and look at it in Netscape 4 (the only spread
browser that accepts layers).

You'll see that when you want to change the content of the layer with
the button or the select, you'll have a lot of weird caracters that
will appear on the screen (caracters like squares).

Now, make view source on netscape, and copy the source the .aspx page
has generated into a HTML blank page that you will create.

Now, you agree that the .HTML page and the .ASPX will be the same.

And you'll see that the code will work properly, which is normal,
because you know how to program in javascript, so the source code
works.. but only with a .html extension ..

Am I Clear now ?

So the bug can only come from the DOTNET motor that interfers with
Netscape4 when you use the .write method in a ILAYER (I think it
writes in a part of netscape memory).

So what can look like a little bit 'light' for a Microsoft developer
to look at it, is still that strange that it may occurs in other
places and in other browsers, and I think it's good to know why this
bugs so we have a version 2.0 of dotnet that is the less buggy
possible.

Thanks by advance for reading my all stuff.

If you want to download Netscape 4, you can go to ftp.netscape.com in
the pub folder.
 
A

amos

No, I only have one form ..

THe problem does not come from the source that works properly, it
comes from an interference from netscape4 & dotnet ..

For example, another point that is strange, when you make a
Response.redirect, in Netscape 4, sometimes, the navigator put a blank
page with a link which is (THE PAGE HAS MOVED HERE) and when you click
on the link, you go to the page that has been redirected.. but this is
not the problem that I want to fix today
 
K

Ken Dopierala Jr.

Hi,

I gave the code you posted a spin. I don't have Netscape 4.? (there are
about 17 versions of 4 if you include the betas). I do have Netscape 7.1
and your code didn't work in that as a .html or a .aspx file. Can you test
on 7.1 if your code works for you. If it does please repost the entire code
page you are using. The code you posted before has two forms in it, no
<HTML> tag, no <HEAD> tag and no <BODY> tag, so who knows what is all going
on in your page. Just post the entire .html file you are using from the
first line to the last and we'll see if we can figure something out. I have
a pretty good idea that this has nothing to do with ASP.Net and everything
to do with Netscape 4. In your last reply to Patrice you felt that when
hitting an ASPX page the .write method of iLayer was writing to Netscape
memory. I highly doubt this, but if it is the case then we should figure it
out before someone actually learns how to use it to take over any
unsuspecting Netscape 4 users out there. Good luck! Ken.
 
S

Scott M.

There is no reason for you to be rude.

My response to your post had nothing to do with ego, so put your hostilities
in check please and read what all of us have been saying to you. It seems
that perhaps you DO need some lessons in ASP.NET because we're all telling
you the same thing and you don't seem to be getting what we are trying to
say.

..NET has absolutely NOTHING to do with client-side code that you've embedded
into your page (HTML or JavaScript). Now, if you are embedding your code
into SERVER tags or what you've added CONFLICTS with SERVER tags, you'll
have a problem. There's no bug. ASP.NET has been out for nearly 3 years
now (longer if you include the beta period). It is more likely that you
haven't yet fully learned how ASP.NET pages render their results.

A .NET page, generated by VS.NET will automatically create a SERVER SIDE
<Form> tag. If you've also added your own client-side <Form> tag, you've
got to make sure that is kept separate from the server-side form tag.

The bottom line is that if you simply view the code that was delivered to
the client (by choosing View...Source from the rendered page in the
browser), you can clearly see what .NET has rendered. If what you see there
is not what you started with, then you've entered your code inappropriately
in the first place (probably in the wrong area).
 
P

Patrice

Ok, with such a background, you should understand that ASP.NET doesn't come
in play once the HTML code moved to the browser.

From the description of the problem (you didn't mentionned exactly in your
first post), this is likely an encoding problem. When ASPX sends the file,
it sends an encoding information in the HTTP header. The one that is in your
file conflict with information.

To test remove the "meta" from your HTML file. Does it work ? Let us know.

Patrice
--
 
A

amos

Sorry if you think I'm rude, it's just I asked a for an answer to the
question, not for any proverb. There is no hostility.

Concerning the problem, I just have to say that we don't understand
each other.

I tell you that the code in the navigator IS THE SAME
that the one I entered. And in the ASPX page it does not work
(when it works in a HTML or ASP page for example).

And I paste the javascript code in the HTML <HEAD> section,
it's not in a server object.

All other Javascript code I write works on all the navigators.

So that's why I insist on this point, there must be a bug somewhere
in the DotNet section.

When you use the instruction doucument.layername.write,
it makes strange caracters appearing on the screen.

You can only see this in NETSCAPE4 since it's the only known
browser that displays LAYERS.

Am I Clear enough ?
 
A

amos

Hi

it has nothing to see with the encoding, I made several tests,
but I think know where it comes from after all those tests.

It comes from the instruction that writes in a layer.

You can put in any HTML section of your ASPX page a LAYER,
then try to write in it, and you'll see that if you take
the same code in a HTML or ASP classic page, it works,
and it won't work in the ASPX page.

You can only make the test on a NETSCAPE4 browser since
it is the only one that accepts LAYERS.

When I look at the source code generated in Netscape,
the code is EXACTLY THE SAME that I entered.

So the only thing is that a page generated by ASPX
maybe goes in a different part of the memory and when
you use the write method, it makes everything bugging.

It's surely a bug from Netscape4 but with a link with
dotnet because in a page generated in ASP, it works.
 
A

amos

Hi Ken

You can't test it on Netscape 7 since the only browser that
accepts LAYERS is Netscape 4...
 
K

Ken Dopierala Jr.

Hi,

That's fine. But post your files. First post the .HTML file you are using
from the first line to the last. Then post your .aspx page from the first
line to the last. Then post your .aspx.vb page from the first line to the
last. I want to run them and see if they both produce the same output. The
problem isn't with ASP.Net, just to put your mind at rest. You have a
scripting problem. Once you find it, you'll be good to go. Post the pages
and we'll find the problem. Good luck! Ken.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top