Problem

  • Thread starter Mikael Hellström
  • Start date
M

Mikael Hellström

Hi all...
I hava a problem . This pice of code (menu) works well with ie but
don't work with netscape 6.2 .. why?
Please tell me how i can get this to work.
My site have the adress http://www.hyresbytet.se
Regards Mikael (Newbie)



<html>

<head>
<meta http-equiv="Content-Language" content="sv">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>huvudmeny</title>

<style>
..buttonshow {position:relative; left:6px}
..buttonhide {display:none}
A {text-decoration:none; font-family: Verdana; font-size:9px}
</style>


<base target="mainFrame">


</head>

<body text="#000000" link="#000000" vlink="#000000" alink="#FF0000"
background="BILDER/MENYBG.GIF">
<div align="left">
<script language="javascript" runat="server">

function buttoncont(what) {
if (eval(what).style.display=='none')
{
document.all.one.style.display='none';
document.all.two.style.display='none';
document.all.three.style.display='none';
document.all.four.style.display='none';
document.all.five.style.display='none';
document.all.six.style.display='none';
eval(what).style.display='';
}
else
eval(what).style.display='none';
}


</script>
<br>
<a href="http://www.microsoft.com/windows/ie_intl/sv/" target="_New"><img
src="./BILDER/InternetExplorer.jpg" width="118" height="44" border="0"></a>
<br>
</div>
<center>
<table border=0 cellspacing=0 cellpadding=0 marginwidth="0"
marginheight="0" align=left height="135">
<tr colspan=3>
<td colspan="3" valign="top" height="10"><img
src="./bilder/search_top2.gif" width="120" height="13" border="0"
alt=""></td>
</tr>
<tr width="319">
<td align="right" valign="top"
background="./bilder/search_greypix.gif" height="93"><img
src="./bilder/search_greypix.gif" width="2" height="1" border="0"
alt=""></td>
<td bgcolor="#FFFFFF" height="93" align="center" valign="top">
<table border="0" width="105" cellspacing="0" cellpadding="1"
align="left">
<tr>
<td valign="top" width="8">&nbsp; </td>
<td valign="top" bgcolor="#FFFFFF" width="96">
<div align="center"><img border="0" src="bilder/meny/btn1.gif"
onClick="buttoncont('six');" vspace="2" width="103" height="19"><br>
</div>
<div id="six" style="display:none"> <img style="position:
absolute; top: 76px; left:113px" src="bilder/meny/down.gif" width="5"
height="5">
<a href="rules.html">Privatannonser</a><br>
<a href="compRules.html">Företagsannonser</a><br>
</div>
<div align="center"><img border="0" src="bilder/meny/btn2.gif"
onClick="buttoncont('two');" vspace="2" width="103" height="19"><br>
</div>
<div id="two" style="display:none"> <img style="position:
absolute; top: 99px; left:113px" src="bilder/meny/down.gif" width="5"
height="5"><a href="searchResult.asp" target="mainFrame">
Till sökmotor</a><br>
</div>
<div align="center"><img border="0" src="bilder/meny/btn3.gif"
onClick="buttoncont('three');" vspace="2" width="103" height="19"><br>
</div>
<div id="three" style="display:none"> <img style="position:
absolute; top: 122px; left:113px" src="bilder/meny/down.gif" width="5"
height="5">
<a href="questions.html">Vanliga frågor</a><br>
</div>
<div align="center"><img border="0" src="bilder/meny/btn4.gif"
onClick="buttoncont('four');" vspace="2" width="103" height="19"><br>
</div>
<div id="four" style="display:none"> <img style="position:
absolute; top: 145px; left:113px" src="bilder/meny/down.gif" width="5"
height="5">
<a href="kontakt.html">kontakta oss</a><br>
</div>
<div align="center"><img border="0" src="bilder/meny/btn5.gif"
onClick="buttoncont('five');" vspace="2" width="103" height="19"><br>
</div>
<div id="five" style="display:none"> <img style="position:
absolute; top: 168px; left:113px" src="bilder/meny/down.gif" width="5"
height="5">
<a href="loggain.asp">logga in / Meny</a><br>
</div>
<div align="center"><a href="index.html" target="_top"><img
border="0" src="bilder/meny/btn6.gif" vspace="2" width="103"
height="19"></a><br>
</div>
<div id="one" style="display:none"> </div>
</td>
</tr>
</table>
</td>
<td align="right" valign="top"
background="./bilder/search_greypix.gif" witdh=2 height="93"><img
src="./bilder/search_greypix.gif" width="2" height="1" border="0"
alt=""></td>
</tr>
<tr colspan=3>
<td valign="top" colspan=3 height="33"><img
src="./bilder/search_bottom2.gif" width="120" height="9" border="0"
alt=""></td>
</tr>
</table>
</center>


</body>

</html>
 
W

William Tasso

Mikael said:
I hava a problem . This pice of code (menu) works well with ie but
don't work with netscape 6.2 .. why?

ie6/sp1 - only the last link "Till startsidan" works here.
Please tell me how i can get this to work.

don't rely on client side script for something as important as navigation.

you may also wish to reconsider the use of frames:
http://www.html-faq.com/htmlframes/
http://www.allmyfaqs.com/faq.pl?What_are_frames
http://www.useit.com/alertbox/9612.html
 
M

Mikael Hellström

Hi,
I have read about frames...However i can't do all the job again.
I have change my menu so it work allright.
But i have more problems on my websait.
I have problem with this pice of code: Work well with ie but not with
Netscape????
Why??
Please help

my call
<img src="bilder/saveBtn.gif" border=0 value="nästa" name="next"
align="right" onClick="kollaData()" >

and my script

<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER >
Function kollaData()
TheAt = InStr(2, Registerform.epost.value, "@")
TheDot = InStr(TheAt + 2, Registerform.epost.value, ".")
if Registerform.fnamn.value="" then
MsgBox(" Du måste fylla i ditt förnamn! ")
else if Registerform.enamn.value="" then
MsgBox(" Du måste fylla i ditt efternamn! ")
else if Registerform.gatuAdress.value="" then
MsgBox(" Du måste fylla i din gatuadress! ")
else if Registerform.postNummer.value="" then
MsgBox(" Du måste fylla i ditt postnummer! ")
else if Registerform.ort.value="" then
MsgBox(" Du måste fylla i din ort! ")
else if Registerform.telefonBostad.value="" then
MsgBox(" Du måste fylla i din bostadstelefon! ")
else if Registerform.epost.value="" then
MsgBox(" Du måste fylla i din e-post adress! ")
else if Len(Registerform.epost.value) < 6 then
MsgBox(" Felaktig e-post adress! ")
else if TheAt = 0 Then
MsgBox(" Felaktig e-post adress! ")
else if TheDot = 0 Then
MsgBox(" Felaktig e-post adress! ")
else if (TheDot) + 1 > Len(Registerform.epost.value) Then
MsgBox(" Felaktig e-post adress! ")
else if Registerform.losenord.value="" then
MsgBox(" Du måste välja lösenord! ")
else if len(Registerform.losenord.value)<6 then
MsgBox(" Lösenordet ska ha minst 6 tecken! ")
else if Registerform.losenord2.value="" then
MsgBox(" Du måste bekräfta ditt lösenord! ")
else if Registerform.losenord.value<>Registerform.losenord2.value then
MsgBox(" Bekräfta ditt lösenord igen! ")
else
'trigga action på formen
MsgBox(" Dina personuppgifter är uppdaterade ")
Registerform.submit()
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if

End function
</SCRIPT>
 
S

Steve Pugh

Mikael Hellström said:
I have problem with this pice of code: Work well with ie but not with
Netscape????
<img src="bilder/saveBtn.gif" border=0 value="nästa" name="next"
align="right" onClick="kollaData()" >

<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER >

VBScript is a Microsoft invention and is only supported by IE.
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if

End function
</SCRIPT>

Oh my. I knew I didn't like VBScript for some reason, but... Is it
really so clunky as to need all that crud?

Steve
 
W

William Tasso

Mikael said:
I have read about frames...However i can't do all the job again.
I have change my menu so it work allright.

you will wish you had sooner or later, anyway ...
But i have more problems on my websait.
I have problem with this pice of code: Work well with ie but not with
Netscape????
Why??
Please help

my call
<img src="bilder/saveBtn.gif" border=0 value="nästa" name="next"
align="right" onClick="kollaData()" >

and my script

<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER >
Function kollaData()
TheAt = InStr(2, Registerform.epost.value, "@")
TheDot = InStr(TheAt + 2, Registerform.epost.value, ".")
if Registerform.fnamn.value="" then
MsgBox(" Du måste fylla i ditt förnamn! ")
else if Registerform.enamn.value="" then

MsgBox is a client-side thingy, not server-side.

As steve remarked, vbScript is not well supported by browsers, however the
point is moot as many surfers are now running with all client script
disabled - you may wish to reconsider the design.
 
A

Adrienne

VBScript is a Microsoft invention and is only supported by IE.

Oh my. I knew I didn't like VBScript for some reason, but... Is it
really so clunky as to need all that crud?

The important part - RUNAT=SERVER, the code is to be run at the server, not
the client. Since the default for ASP is VbScript, that declaration is
unnecessary.
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER >
Function kollaData()
TheAt = InStr(2, Registerform.epost.value, "@")
TheDot = InStr(TheAt + 2, Registerform.epost.value, ".")
if Registerform.fnamn.value="" then
MsgBox(" Du m†ste fylla i ditt f”rnamn! ")

However, this is still not going to work for the OP because MsgBox is
server side and will not show on the client. Further, the onclick is
client side and has no way to get to the server script.
 
S

Steve Pugh

Adrienne said:
The important part - RUNAT=SERVER, the code is to be run at the server, not
the client. Since the default for ASP is VbScript, that declaration is
unnecessary.

However, this is still not going to work for the OP because MsgBox is
server side and will not show on the client. Further, the onclick is
client side and has no way to get to the server script.

I saw the RUNAT=SERVER but as the OP said that this did work in IE but
not in NN I thought that this was being ignored and the code was being
run client side. And a quick cut and paste of the code shows that this
script does work client side.

Steve
 
M

Mikael Hellström

About my problems...
I have now a new menu on my site. Works well with ie and netscape.
I talked to my website host early this morning and he told me
that vb script should work ok because the code is running on server-side.
I hava tryed everything but it wont work at all with Netscape. Now i have
decided
to code validation in java script...And that work absolutly ok with
Netscape.
Take a look at my hompage at www.hyresbytet.se
it's a site for people who want to swap their appartment...
Regards Mikael H
Thanks for your help foks..!!
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top