Jump Menu/ Javascrpit problems

  • Thread starter Henry Contreras
  • Start date
H

Henry Contreras

Below is my orginal post, but need desparate help. Question: After you read
my orginal question and some responses I got, my question now is: How do I
fix this problem? Do I have to redo the javascript on every single page or is
there a way to change it once (in my includes header) and apply the changes
to all that way? Or is there a better way of doing it other than some of the
responses I got? Please help!!

I have just uploaded my new site to server. However, I have inserted 2 jump
menus on my header (includes folder). The jump menu works only when I am on
my home page. However, when you are on another page the jump menu does not
work. I have tried opening my remote site and recalculate hyperlinks,....To
no avail. Still the same thing. Can anyone help? Thanks in advance!

You may take look at it yourself: www.healthsourcenutrition.com


Repsonse 1: Hi Henry,

The Jump Menu you are using is similar to one I use a lot. It requires a
<Head> script. YOu have included the script on the head of your index page,
but it looks like you didn't add it to the other pages.

<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>

Response 2:Hi Henry,

The jump menu relies on a javascript function which must be present in the
head of page. If it was me I'd write the jump menus so as not to require the
function then they'll work on every page. Try making the menus like this
<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id1" name="D1">
<option value>Shop By Brand</option>
<option value>------------------------------</option>
<option value="../atkins.htm">Atkins</option>

<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id2" name="D2">
<option value>Shop By Catagory</option>
<option value>-----------------------------------------------</option>
<option value="../amino_acids.htm">Amino Acids</option>

Doing it this way should make life easier.
 
T

Thomas A. Rowe

You need to either insert the function part of the script into all pages using the Include Page or
you need to see if you can get it to work by moving the function part of the script to appear after
the opening <body> tag in the Include Page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
H

Henry Contreras

Thomas,

The odd thing is; the function part of the script is in inserted after
within the <Head> <Head> of the page on my include page (header.htm), but
somehow only picked it up on my index page, not all pages. Should I move it
within the body?

Thomas A. Rowe said:
You need to either insert the function part of the script into all pages using the Include Page or
you need to see if you can get it to work by moving the function part of the script to appear after
the opening <body> tag in the Include Page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Henry Contreras said:
Below is my orginal post, but need desparate help. Question: After you read
my orginal question and some responses I got, my question now is: How do I
fix this problem? Do I have to redo the javascript on every single page or is
there a way to change it once (in my includes header) and apply the changes
to all that way? Or is there a better way of doing it other than some of the
responses I got? Please help!!

I have just uploaded my new site to server. However, I have inserted 2 jump
menus on my header (includes folder). The jump menu works only when I am on
my home page. However, when you are on another page the jump menu does not
work. I have tried opening my remote site and recalculate hyperlinks,....To
no avail. Still the same thing. Can anyone help? Thanks in advance!

You may take look at it yourself: www.healthsourcenutrition.com


Repsonse 1: Hi Henry,

The Jump Menu you are using is similar to one I use a lot. It requires a
<Head> script. YOu have included the script on the head of your index page,
but it looks like you didn't add it to the other pages.

<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>

Response 2:Hi Henry,

The jump menu relies on a javascript function which must be present in the
head of page. If it was me I'd write the jump menus so as not to require the
function then they'll work on every page. Try making the menus like this
<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id1" name="D1">
<option value>Shop By Brand</option>
<option value>------------------------------</option>
<option value="../atkins.htm">Atkins</option>

<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id2" name="D2">
<option value>Shop By Catagory</option>
<option value>-----------------------------------------------</option>
<option value="../amino_acids.htm">Amino Acids</option>

Doing it this way should make life easier.
 
T

Thomas A. Rowe

It has to be after the <body> tag, as the FP Include Page component and Share Border component, only
include the content that is between the opening and closing <body>...</body> tags.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Henry Contreras said:
Thomas,

The odd thing is; the function part of the script is in inserted after
within the <Head> <Head> of the page on my include page (header.htm), but
somehow only picked it up on my index page, not all pages. Should I move it
within the body?

Thomas A. Rowe said:
You need to either insert the function part of the script into all pages using the Include Page
or
you need to see if you can get it to work by moving the function part of the script to appear
after
the opening <body> tag in the Include Page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Henry Contreras said:
Below is my orginal post, but need desparate help. Question: After you read
my orginal question and some responses I got, my question now is: How do I
fix this problem? Do I have to redo the javascript on every single page or is
there a way to change it once (in my includes header) and apply the changes
to all that way? Or is there a better way of doing it other than some of the
responses I got? Please help!!

I have just uploaded my new site to server. However, I have inserted 2 jump
menus on my header (includes folder). The jump menu works only when I am on
my home page. However, when you are on another page the jump menu does not
work. I have tried opening my remote site and recalculate hyperlinks,....To
no avail. Still the same thing. Can anyone help? Thanks in advance!

You may take look at it yourself: www.healthsourcenutrition.com


Repsonse 1: Hi Henry,

The Jump Menu you are using is similar to one I use a lot. It requires a
<Head> script. YOu have included the script on the head of your index page,
but it looks like you didn't add it to the other pages.

<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>

Response 2:Hi Henry,

The jump menu relies on a javascript function which must be present in the
head of page. If it was me I'd write the jump menus so as not to require the
function then they'll work on every page. Try making the menus like this
<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id1" name="D1">
<option value>Shop By Brand</option>
<option value>------------------------------</option>
<option value="../atkins.htm">Atkins</option>

<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id2" name="D2">
<option value>Shop By Catagory</option>
<option value>-----------------------------------------------</option>
<option value="../amino_acids.htm">Amino Acids</option>

Doing it this way should make life easier.
 
R

Ronx

See my response in the original thread.

--
Ron Symonds (Microsoft MVP - FrontPage)
Reply only to group - emails will be deleted unread.


Henry Contreras said:
Thomas,

The odd thing is; the function part of the script is in inserted after
within the <Head> <Head> of the page on my include page (header.htm), but
somehow only picked it up on my index page, not all pages. Should I move
it
within the body?

Thomas A. Rowe said:
You need to either insert the function part of the script into all pages
using the Include Page or
you need to see if you can get it to work by moving the function part of
the script to appear after
the opening <body> tag in the Include Page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


message
Below is my orginal post, but need desparate help. Question: After you
read
my orginal question and some responses I got, my question now is: How
do I
fix this problem? Do I have to redo the javascript on every single page
or is
there a way to change it once (in my includes header) and apply the
changes
to all that way? Or is there a better way of doing it other than some
of the
responses I got? Please help!!

I have just uploaded my new site to server. However, I have inserted 2
jump
menus on my header (includes folder). The jump menu works only when I
am on
my home page. However, when you are on another page the jump menu does
not
work. I have tried opening my remote site and recalculate
hyperlinks,....To
no avail. Still the same thing. Can anyone help? Thanks in advance!

You may take look at it yourself: www.healthsourcenutrition.com


Repsonse 1: Hi Henry,

The Jump Menu you are using is similar to one I use a lot. It requires
a
<Head> script. YOu have included the script on the head of your index
page,
but it looks like you didn't add it to the other pages.

<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel)
el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>

Response 2:Hi Henry,

The jump menu relies on a javascript function which must be present in
the
head of page. If it was me I'd write the jump menus so as not to
require the
function then they'll work on every page. Try making the menus like
this
<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id1" name="D1">
<option value>Shop By Brand</option>
<option value>------------------------------</option>
<option value="../atkins.htm">Atkins</option>

<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id2" name="D2">
<option value>Shop By Catagory</option>
<option value>-----------------------------------------------</option>
<option value="../amino_acids.htm">Amino Acids</option>

Doing it this way should make life easier.
 
R

Ronx

If you do, FrontPage may move it back (this appears to be a behaviour you
are using, if the code is the same as Steve's), or it may duplicate the code
in the <head>.

--
Ron Symonds (Microsoft MVP - FrontPage)
Reply only to group - emails will be deleted unread.


Henry Contreras said:
Thomas,

The odd thing is; the function part of the script is in inserted after
within the <Head> <Head> of the page on my include page (header.htm), but
somehow only picked it up on my index page, not all pages. Should I move
it
within the body?

Thomas A. Rowe said:
You need to either insert the function part of the script into all pages
using the Include Page or
you need to see if you can get it to work by moving the function part of
the script to appear after
the opening <body> tag in the Include Page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


message
Below is my orginal post, but need desparate help. Question: After you
read
my orginal question and some responses I got, my question now is: How
do I
fix this problem? Do I have to redo the javascript on every single page
or is
there a way to change it once (in my includes header) and apply the
changes
to all that way? Or is there a better way of doing it other than some
of the
responses I got? Please help!!

I have just uploaded my new site to server. However, I have inserted 2
jump
menus on my header (includes folder). The jump menu works only when I
am on
my home page. However, when you are on another page the jump menu does
not
work. I have tried opening my remote site and recalculate
hyperlinks,....To
no avail. Still the same thing. Can anyone help? Thanks in advance!

You may take look at it yourself: www.healthsourcenutrition.com


Repsonse 1: Hi Henry,

The Jump Menu you are using is similar to one I use a lot. It requires
a
<Head> script. YOu have included the script on the head of your index
page,
but it looks like you didn't add it to the other pages.

<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
var href=el.options[el.selectedIndex].value; if(sel)
el.selectedIndex=0;
if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>

Response 2:Hi Henry,

The jump menu relies on a javascript function which must be present in
the
head of page. If it was me I'd write the jump menus so as not to
require the
function then they'll work on every page. Try making the menus like
this
<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id1" name="D1">
<option value>Shop By Brand</option>
<option value>------------------------------</option>
<option value="../atkins.htm">Atkins</option>

<select size="1"
onchange="if(this.options.selectedIndex>1)location.href=this.options[this.options.selectedIndex].value;"
id="id2" name="D2">
<option value>Shop By Catagory</option>
<option value>-----------------------------------------------</option>
<option value="../amino_acids.htm">Amino Acids</option>

Doing it this way should make life easier.
 

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