...

View Full Version : Javascript links and many other problems



beattsme
05-28-2005, 04:41 AM
hi im not to experienced with the whole java script programming so i thought i might just get help doing it saving alot of wasted time so here it goes...

i am building a 1 page website that will lead to other websites online, it contains of a frameset consisting of three frames displayed veritcally. all done in html. now the problem starts. i will list the scripting along with the file names then will describe my problems

(index.htm)
<HTML>
<HEAD>
<TITLE>mypage</TITLE>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
</HEAD>
<FRAMESET ROWS="21,*,25" COLS="1" FRAMESPACING="0" FRAMEBORDER="0">
<FRAME SRC="header.htm" NAME="header" FRAMEBORDER="0" SCROLLING="No" NORESIZE

MARGINWIDTH="0" MARGINHEIGHT="0">
<FRAME SRC="content.htm" NAME="main" FRAMEBORDER="0" SCROLLING="auto" MARGINWIDTH="0"

MARGINHEIGHT="0">
<FRAME SRC="footer.htm" NAME="footer" FRAMEBORDER="0" SCROLLING="No" NORESIZE

MARGINWIDTH="0" MARGINHEIGHT="0">
</FRAMESET>
</HTML>
(header.htm)
<HTML>
<HEAD>
<TITLE>mypage</TITLE>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" TYPE="text/css" HREF="msgrtabs.css">
</HEAD>
<BODY BGCOLOR="#ffffff" TOPMARGIN="0" LEFTMARGIN="0">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"

BACKGROUND="img/gradient_top_tile.gif">

<TR>
<TD HEIGHT=21 CLASS="Header" STYLE="padding-left: 8px;">mypage</TD>
<TD ALIGN="right" STYLE="padding-right: 8 px;">
<A HREF="jscript:ShowMenu()" CLASS="add" ID="goto">go to<SPAN STYLE="font-family:

Marlett; font-size:smaller;">6</SPAN>
</A>
</TD>
<DIV ID="dropdown" STYLE="display:none" ALIGN=right></DIV>
</TD>
</TR>
</TABLE>
<SCRIPT>
function ShowMenu() {
window.location="http://www.mypageurl.com.au";
}
</SCRIPT>
</BODY>
</HTML>
(content)
<HTML>
<HEAD>
<TITLE>Adventure Works Tab Content</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="REFRESH" CONTENT=1200><!--20 minute refresh-->
<SCRIPT>
function toggle(i) {
if (i.style.display=="none")
{
i.style.display="block";
glyph.src="img/collaps.gif";
}
else
{
i.style.display="none";
glyph.src="img/expand.gif";
}
}
</SCRIPT>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="msgrtabs.css">
</HEAD>
<BODY BGCOLOR="#ffffff" TOPMARGIN=0 LEFTMARGIN=5 BACKGROUND="img/watermark.jpg" BGPROPERTIES="FIXED">
<TABLE width=100% border="0" cellspacing="0" cellpadding="0">
<TR id="aa"><TD>
<TABLE width=100% border="0" cellspacing="0" cellpadding="0">
<TR>
<TD colspan="3"><IMG src="img/spacer.gif" width="1" height="8" alt="" border="0"></TD>
</TR>
<TR>
<TD align=left>
<A href="#" onClick="toggle(a)">
<IMG ID="glyph" src="img/collaps.gif" width="15" height="15" border="0" alt="">
</A>
</TD>
<td width="100%" align="left" background="img/line.gif" style="padding-left: 5px;">
<A class="label" href="#" onClick="toggle(a)" title="">Order History</A>
</td>
<TD align=right background="img/line.gif">&nbsp;</TD>
</TR>
<TR id="a">
<TD></TD>
<TD COLSPAN="2">
<IMG SRC="img/bullet.jpg" WIDTH="12" HEIGHT="12" BORDER="0" ALT="">
<A CLASS="alert" HREF="#">Northwind Traders Backpack</A>
<BR>
<IMG SRC="img/bullet.jpg" WIDTH="12" HEIGHT="12" BORDER="0">
<A CLASS="alert" HREF="#">Contoso X3 Mountain Bike</A>
In a working environment, these links could take the user to an order history page by launching another browser window. For code required to open another browser window, see Automatic Authentication Issues.

</TD>
</TR>
<TR>
<TD COLSPAN="3"><IMG SRC="img/spacer.gif" WIDTH="1" HEIGHT="8" ALT="" BORDER="0"></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD colspan="3"><IMG SRC="img/spacer.gif" WIDTH="1" HEIGHT="8" ALT="" BORDER="0"></TD>
</TR>
</TABLE>
</BODY>
</HTML>
(footer.htm)
<HTML>
<HEAD>
<TITLE>Adventure Works Tab Footer</TITLE>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" TYPE="text/css" HREF="msgrtabs.css">
<SCRIPT LANGUAGE=JScript>
function OpenWithAuth(TargetURL, SiteID)
{
var bNoAuth = true;
var p,e;
e = window.external;

if (e != null)
{
p = e.MsgrHost;
if (p != null )
{
p.OpenWithAuth(TargetURL, SiteID);
bNoAuth = false;
}
}
if (bNoAuth)
window.open(TargetURL);
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#ffffff" TOPMARGIN="0" LEFTMARGIN="0">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" BACKGROUND="img/gradient_bottom_tile.gif">
<TR>
<TD><IMG SRC="img/img_add_alert.gif" WIDTH="18" HEIGHT="19" ALT="" BORDER="0"></TD>
<TD NOWRAP STYLE="padding-left: 4 px;"> <div align="center"><A HREF="javascript:OpenWithAuth('http://www.comspec.com.au/', 99999)" TITLE="Visit the Comspec NT Home Pages">
Visit The Comspec Nt Home page </A> </div></TD>
<TD><IMG SRC="img/spacer.gif" WIDTH="15" HEIGHT="25" ALT="" BORDER="0"></TD>
</TR>
</TABLE>
</BODY>
</HTML>
ok so problem 1

is in the header file... the problem is the goto menu i want it to atleast just open a new window and goto a direct page, but what would be beter is it displaying many option that will in turn go to a new window and to the directed site.
this as is will not do it it will just come up with page cannot be displayed and the address is jscript:ShowMenu()???

problem 2
is in the content file (see attached bmp) my problem is as shown in the pic i dont want the pic to be repeated just where that top white square is i just want one arrow... (erm by the way it looks like my ****ty dialup wont load the image so im gona have to ask you to take the scripts and load it up with a image called line.gif i think its called, and then you can see the prob sorry 4 any inconvienence!!!)

and so far that is all i think if not i will post more problems thanks in advanced for any help or assistance

A1ien51
05-28-2005, 07:38 PM
jscript: should be javascript:

for you image problem...google CSS background image repeat

Eric

beattsme
06-01-2005, 12:28 AM
jscript: should be javascript:

for you image problem...google CSS background image repeat

Eric
erm yeh that didnt exactly work for the drop down menu that is any other ideas?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum