26-09-2004, 22:09
|
#1
|
|
Inactive
Join Date: Jun 2003
Location: On top of this heat sink
Age: 46
Services: Sky+ & 8mb ADSL + BT Together option 3
Posts: 2,345
|
Help!!!! javascript
OK, attached is a file that acts as the options controller for a toolbar that i am developing for I-Web Solutions.
The problem i have is SP2!!!!!!
Because the page uses javascript to split the page (not a problem, if push comes to shove, i will put it all on 1 page), but it also stores a username and password (and will eventually also store domain name and hosting type) so that users can login straight to their panel, but Internet explorer with SP2 keeps bringing up a yellow bar, and you have to click on it and then click allow for the page to work...
Im not sure if that makes sense, but if you view the page and you have SP2 you will know what i mean.
Basically is there any other way of doing this?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML><HEAD><TITLE>I-Web Solutions Toolbar Configuration</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>FORM {
MARGIN: 0px
}
BODY {
BACKGROUND-COLOR: #ffffff
}
P {
FONT: 11px verdana, arial,helvetica,sans-serif,geneva; COLOR: #333333; TEXT-ALIGN: justify
}
TABLE {
FONT: 11px verdana, arial,helvetica,sans-serif,geneva; COLOR: #333333; TEXT-ALIGN: justify
}
TR {
FONT: 11px verdana, arial,helvetica,sans-serif,geneva; COLOR: #333333; TEXT-ALIGN: justify
}
UL {
FONT: 11px verdana, arial,helvetica,sans-serif,geneva; COLOR: #333333; TEXT-ALIGN: justify
}
B {
FONT: 700 11px verdana, arial,helvetica,sans-serif,geneva; COLOR: #555555
}
CENTER {
FONT: 11px verdana, arial,helvetica,sans-serif,geneva; COLOR: #333333
}
.bold {
FONT: 700 11px verdana, arial,helvetica,sans-serif,geneva; COLOR: #333333
}
.title {
FONT: 700 13px verdana, arial,helvetica,sans-serif,geneva; COLOR: #333333
}
A {
COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
COLOR: #ff0000; TEXT-DECORATION: none
}
.h_on {
COLOR: #ffffff
}
A.h_on:hover {
COLOR: #ffffff
}
A.h_on:unknown {
COLOR: #ffffff
}
A.h_on:active {
COLOR: #ffffff
}
.h_off {
COLOR: #000000
}
A.h_off:hover {
COLOR: #ff0000
}
A.h_off:unknown {
COLOR: #000000
}
A.h_off:active {
COLOR: #000000
}
</STYLE>
<SCRIPT language=JavaScript type=text/JavaScript>
dom = (document.getElementById)? true : false;
nn4 = (document.layers)? true : false;
ie4 = (document.all && !dom)? true : false;
/*=-=[ Show content-block ]=-=*/
function show_cnt(elemId) {
if (dom) document.getElementById(elemId).style.display = "block";
else if (ie4) document.all[elemId].style.display = "block";
else alert ("Error: your browser doesn't support 'display' property");
}
/*=-=[ Hide content-block ]=-=*/
function hide_cnt(elemId) {
if (dom) document.getElementById(elemId).style.display = "none";
else if (ie4) document.all[elemId].style.display = "none";
else alert ("Error: your browser doesn't support 'display' property");
}
/*=-=[ Switch ON ]=-=*/
function highlight_on (menu, lnk) {
if (dom) {
document.getElementById(menu).bgColor = "#586876";
document.getElementById(lnk).className = "h_on";
}
else if (ie4) {
document.all[menu].bgColor = "#586876";
document.all[lnk].className = "h_on";
}
}
/*=-=[ Switch OFF ]=-=*/
function highlight_off (menu, lnk) {
if (dom) {
document.getElementById(menu).bgColor = "#FFFFFF";
document.getElementById(lnk).className = "h_off";
}
else if (ie4) {
document.all[menu].bgColor = "#FFFFFF";
document.all[lnk].className = "h_off";
}
}
function hide_all () {
hide_cnt ("cnt_general");
hide_cnt ("cnt_layout");
hide_cnt ("cnt_login");
highlight_off ("menu_general", "lnk_general");
highlight_off ("menu_layout", "lnk_layout");
highlight_off ("menu_login", "lnk_login");
}
/*=-=[ Navigate to the.. ]=-=*/
function navigate (id) {
hide_all ();
show_cnt ("cnt_" + id);
highlight_on ("menu_" + id, "lnk_" + id);
return (false);
}
</SCRIPT>
<script>
var MyTool=null;
function ToolBarInit(tool)
{
MyTool=tool;
}
function setname()
{
if(MyTool) {
MyTool.userName=document.autolog.username.value;
MyTool.userpasswd=document.autolog.userpasswd.value;
document.autolog.submit();
}
}
</script>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY onload="hide_all (); navigate ('general');">
<TABLE cellSpacing=1 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=center><SPAN class=title>I-Web Solutions Toolbar Configuration
</SPAN></TD>
</TR>
<TR>
<TD align=middle height=10></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=1 cellPadding=1 width=600 align=center bgColor=#586876 border=0>
<TBODY>
<TR>
<TD id=menu_general align=center width=33% bgColor=#586876><A class=h_on id=lnk_general onclick="return navigate ('general');" href="#">General Settings</A></TD>
<TD id=menu_layout align=center width=33% bgColor=#ffffff><A class=h_off id=lnk_layout onclick="return navigate ('layout');" href="#">Add/Remove Toolbar Buttons</A></TD>
<TD id=menu_login align=center width=33% bgColor=#ffffff><A class=h_off id=lnk_login onclick="return navigate ('login');" href="#">Autologin Settings</A></TD>
</TR>
<TR bgColor=#dce2e2>
<TD colSpan=3>
<TABLE width=450 id="cnt_general">
<TBODY>
<TR>
<TD vAlign=top width=20><INPUT id=OpenNew type=checkbox></TD>
<TD>Open a new window to display results each time you search</TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=AutoComplete type=checkbox></TD>
<TD>Auto Complete</TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=KeepHistory type=checkbox></TD>
<TD>Keep a search history in a drop-down list under the search box</TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=RunSearchAutomatically type=checkbox></TD>
<TD>Automatically run a search when you select from the search history</TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=RunSearchDragAutomatically type=checkbox></TD>
<TD>Run Search Drag Automatically</TD></TR>
<TR>
<TD vAlign=top><INPUT id=DescriptiveText type=checkbox></TD>
<TD>Show Descriptive Text</TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=UpdateAutomatically type=checkbox></TD>
<TD>Update toolbar automatically</TD>
</TR>
<TR>
<TD colspan="2" vAlign=top><table>
<tr>
<td colspan=2>Search-box width:</td>
</tr>
<tr>
<td valign=top><input type=radio name=EditWidthcombo1 id=Widthcombo10>
</td>
<td> Narrow</td>
</tr>
<tr>
<td valign=top><input type=radio name=EditWidthcombo1 id=Widthcombo11>
</td>
<td> Normal</td>
</tr>
<tr>
<td valign=top><input type=radio name=EditWidthcombo1 id=Widthcombo12>
</td>
<td> Wide</td>
</tr>
</table></TD>
</TR>
</TBODY>
</TABLE>
<TABLE id="cnt_layout" width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width=250>
<TABLE cellSpacing=1 cellPadding=0 width=250 border=0>
<TBODY>
<TR>
<TD vAlign=top><input type=checkbox id=tb_search_area></TD>
<TD><b>Search area</b></TD>
</TR>
<TR>
<TD vAlign=top width=20><input type=checkbox id=tb_button_search></TD>
<TD width="100%"><b>Search Button</b></TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=ShowHighlightButton type=checkbox></TD>
<TD><b>Highlight Button</b></TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=tb_button1 type=checkbox></TD>
<TD><b>I-Web Solutions Site Guide Button</b></TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=tb_button2 type=checkbox></TD>
<TD><b>Support Center Button</b></TD>
</TR>
<TR>
<TD vAlign=top><INPUT id=tb_button3 type=checkbox></TD>
<TD><b>Control Panel Button</b></TD>
</TR>
</TBODY></TABLE>
</TD>
</TR></TBODY></TABLE>
<table id="cnt_login" width="100%" border=0>
<tbody>
<tr>
<td valign=top width=250><form name="autolog" method="post" action="options_us.html">
<table width=100% border=0 cellpadding=1 cellspacing=0>
<tr>
<td valign=top width=20>
<input name="username" type="text">
</td>
<td width=100%><b>Username</b></td>
</tr>
<tr>
<td valign=top width=20><input type="password" name="userpasswd"></td>
<td width=100%><b>Password</b></td>
</tr>
<tr>
<td valign=middle><div align="center"><a href="javascript: setname()"><strong><font size="3">SAVE</font></strong></a>
</div></td>
<td> </td>
</tr>
</table></form></td>
</tr>
</tbody>
</table>
</BODY></HTML>
|
|
|
26-09-2004, 22:20
|
#2
|
|
Inactive
Join Date: Jun 2003
Location: 127.0.0.1
Age: 61
Posts: 15,868
|
Re: Help!!!! javascript
I suspect there will be something that can be retuned in IE's security settings (tools > Internet Options), but don't know what.
XP SP2, turns on high security settings by default. You might need to add the website into trusded zones, or allow scripts or controls to run automatically.
Of course now that M$ can't supply java as part of IE or windows, anything using javascript seems to cause problems for many users simply cos the default PC might not be able to run it without them knowing where to go and download java stuff.
|
|
|
26-09-2004, 22:24
|
#3
|
|
Inactive
Join Date: Jun 2003
Location: On top of this heat sink
Age: 46
Services: Sky+ & 8mb ADSL + BT Together option 3
Posts: 2,345
|
Re: Help!!!! javascript
Yeah, you "should" be able to go in and turn down security settings, however.......... you try and do it, it kicks up and says that the security setting is not suitable for this type and must be set to medium or higher :@
Also, i dont know if this makes a difference, but the file is actually put onto the users hard disk... rather than being done accross the web......
|
|
|
26-09-2004, 22:31
|
#4
|
|
Inactive
Join Date: Jun 2003
Location: On top of this heat sink
Age: 46
Services: Sky+ & 8mb ADSL + BT Together option 3
Posts: 2,345
|
Re: Help!!!! javascript
On further investigation, this only occurs when being run locally....... if i run it from the web it works perfectly.............. :S :S
any suggestions?
|
|
|
26-09-2004, 23:09
|
#5
|
|
Inactive
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 46
Posts: 6,343
|
Re: Help!!!! javascript
Quote:
|
Originally Posted by MovedGoalPosts
I suspect there will be something that can be retuned in IE's security settings (tools > Internet Options), but don't know what.
XP SP2, turns on high security settings by default. You might need to add the website into trusded zones, or allow scripts or controls to run automatically.
Of course now that M$ can't supply java as part of IE or windows, anything using javascript seems to cause problems for many users simply cos the default PC might not be able to run it without them knowing where to go and download java stuff.
|
Java is not related to Javascript in any way.
|
|
|
27-09-2004, 09:16
|
#6
|
|
Inactive
Join Date: Jun 2003
Location: 127.0.0.1
Age: 61
Posts: 15,868
|
Re: Help!!!! javascript
Quote:
|
Originally Posted by Richard M
Java is not related to Javascript in any way.
|
You learn something new every day
So slightly  when I get messages on newly loaded PC's that can't run things like menu systmes, you see little bits of text in the bottom left corner of the IE windows status bar area saying something to do with java but nothing is happening, is that likely to be the java or javascript or what that my PC needs? I usually resolve it by downloading from www.java.com, but am I right
|
|
|
27-09-2004, 09:37
|
#7
|
|
Inactive
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
|
Re: Help!!!! javascript
Quote:
|
Originally Posted by KingPhoenix
On further investigation, this only occurs when being run locally....... if i run it from the web it works perfectly.............. :S :S
any suggestions?
|
That's SP2 for you man .. I preview all my site's locally, anything with javascript or flash will give you the bar, I'm sure you can alter the local settings so it doesn't do it but I've not discovered it yet, and like you say, it'll work fine when it's actually uploaded.
|
|
|
27-09-2004, 17:31
|
#8
|
|
Inactive
Join Date: Jun 2003
Location: On top of this heat sink
Age: 46
Services: Sky+ & 8mb ADSL + BT Together option 3
Posts: 2,345
|
Re: Help!!!! javascript
Ok, im gonna need to test it to see if it will store the settings locally then i guess :S....
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 10:39.
|