drop down box in shared border.

R

Ron McIntire

I am trying to add a drop down box that will contain
different product types in it. I found some code and am
trying to work with it in my shared border. I can't seem
to get the link to direct to different pages without
getting an error message. You can see the box on this
page: http://www.yourcrafts.com/yourcrafts2/
Any help you can give me would be appreciated.
Thank-You,
Ron McIntire
 
J

Jim Buyens

Your drop-down list is calling a JavaScript function
named formHandler(), and no such function appears in your
page.

Most likely, you put the code for the formHandler()
function in the <head> section of the left.htm page. This
causes a problem because when FrontPage adds shared
border content to a page, it only add the portion between
<body> and </body>.

To fix this, either put the formHandler() code inside the
<body> section of left.htm, or get FrontPage 2003 and
start using Dynamic Web Templates.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
R

Ron McIntire

Jim,
Once again Thank-You for your help!
Your suggestion worked great.

I have one more for you. Lets say I want two of the drop
down boxes in the same left shared border. What part if
any of the code would I change for the second one?

Thanks,
Ron McIntire
 
S

Stefan B Rusynko

None - since the same script can fire from either dropdown

--




| Jim,
| Once again Thank-You for your help!
| Your suggestion worked great.
|
| I have one more for you. Lets say I want two of the drop
| down boxes in the same left shared border. What part if
| any of the code would I change for the second one?
|
| Thanks,
| Ron McIntire
|
| >-----Original Message-----
| >Your drop-down list is calling a JavaScript function
| >named formHandler(), and no such function appears in your
| >page.
| >
| >Most likely, you put the code for the formHandler()
| >function in the <head> section of the left.htm page. This
| >causes a problem because when FrontPage adds shared
| >border content to a page, it only add the portion between
| ><body> and </body>.
| >
| >To fix this, either put the formHandler() code inside the
| ><body> section of left.htm, or get FrontPage 2003 and
| >start using Dynamic Web Templates.
| >
| >Jim Buyens
| >Microsoft FrontPage MVP
| >http://www.interlacken.com
| >Author of:
| >*------------------------------------------------------*
| >|\----------------------------------------------------/|
| >|| Microsoft Office FrontPage 2003 Inside Out ||
| >|| Microsoft FrontPage Version 2002 Inside Out ||
| >|| Web Database Development Step by Step .NET Edition ||
| >|| Troubleshooting Microsoft FrontPage 2002 ||
| >|| Faster Smarter Beginning Programming ||
| >|| (All from Microsoft Press) ||
| >|/----------------------------------------------------\|
| >*------------------------------------------------------*
| >
| >>-----Original Message-----
| >>I am trying to add a drop down box that will contain
| >>different product types in it. I found some code and am
| >>trying to work with it in my shared border. I can't seem
| >>to get the link to direct to different pages without
| >>getting an error message. You can see the box on this
| >>page: http://www.yourcrafts.com/yourcrafts2/
| >>Any help you can give me would be appreciated.
| >>Thank-You,
| >>Ron McIntire
| >>.
| >>
| >.
| >
 
R

Ron McIntire

I have tried to get the second box to go to it's links
with no luck. For some reason it goes to whatever link the
first drop down box has been to resently. It doesn't
matter what link you follow in the first one when you hit
the second drop down box it goes to that page.
Any ideas?
http://www.yourcrafts.com/yourcrafts2/

Ron McIntire

-----Original Message-----
None - since the same script can fire from either dropdown

--




"Ron McIntire" <[email protected]>
wrote in message [email protected]...
 
J

Jim Buyens

Ron McIntire said:
I have tried to get the second box to go to it's links
with no luck. For some reason it goes to whatever link the
first drop down box has been to resently. It doesn't
matter what link you follow in the first one when you hit
the second drop down box it goes to that page.
Any ideas?
http://www.yourcrafts.com/yourcrafts2/

Try coding the goToURL function this way:

function goToURL(menu)
{
var myindex=menu.selectedIndex
if(!myindex=="")
{
window.location.href=menu.options[myindex].value;
}
}

and invoking it like this:

<select name="dropdownmenu" size="1" onchange="goToURL(this)">

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
X

xmas

Ron,

Copy this and then paste it in "Notepad" first ... then copy from notepad
and paste into page in HTML View... Should work??

<form>
<select onchange="if(this.selectedIndex > 0 ) location.href='http://' +
this.options[this.selectedIndex].value">
<option>Select link</option>
<option value="www.microsoft.com">Microsoft</option>
<option value="msdn.microsoft.com">MSDN</option>
</select>
</form>
/* End of first form Drop-Down box */

<form>
<select onchange="if(this.selectedIndex > 0 ) location.href='http://' +
this.options[this.selectedIndex].value">
<option>Select link</option>
<option value="www.microsoft.com">Microsoft</option>
<option value="msdn.microsoft.com">MSDN</option>
</select>
</form>

/* End of Second form Drop-Down box */

Worth a try....
--
xmas
www.xmas-i-am.com
====================
Jim Buyens said:
Ron McIntire said:
I have tried to get the second box to go to it's links
with no luck. For some reason it goes to whatever link the
first drop down box has been to resently. It doesn't
matter what link you follow in the first one when you hit
the second drop down box it goes to that page.
Any ideas?
http://www.yourcrafts.com/yourcrafts2/

Try coding the goToURL function this way:

function goToURL(menu)
{
var myindex=menu.selectedIndex
if(!myindex=="")
{
window.location.href=menu.options[myindex].value;
}
}

and invoking it like this:

<select name="dropdownmenu" size="1" onchange="goToURL(this)">

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
X

xmas

Forgot to tell you...

Then go back to "design" view and right click on the DD-Box
Then >Form field Properties> New window
At the top give the form a name (must start with a letter) F1 for the first
and F2 for the second will do nicely...
Also in the height box put 1 on both... (you can also set the tab order if
you like..

Sorry for not getting this in the first post...
--
xmas
www.xmas-i-am.com
====================

xmas said:
Ron,

Copy this and then paste it in "Notepad" first ... then copy from notepad
and paste into page in HTML View... Should work??

<form>
<select onchange="if(this.selectedIndex > 0 ) location.href='http://' +
this.options[this.selectedIndex].value">
<option>Select link</option>
<option value="www.microsoft.com">Microsoft</option>
<option value="msdn.microsoft.com">MSDN</option>
</select>
</form>
/* End of first form Drop-Down box */

<form>
<select onchange="if(this.selectedIndex > 0 ) location.href='http://' +
this.options[this.selectedIndex].value">
<option>Select link</option>
<option value="www.microsoft.com">Microsoft</option>
<option value="msdn.microsoft.com">MSDN</option>
</select>
</form>

/* End of Second form Drop-Down box */

Worth a try....
--
xmas
www.xmas-i-am.com
====================
Jim Buyens said:
Ron McIntire said:
I have tried to get the second box to go to it's links
with no luck. For some reason it goes to whatever link the
first drop down box has been to resently. It doesn't
matter what link you follow in the first one when you hit
the second drop down box it goes to that page.
Any ideas?
http://www.yourcrafts.com/yourcrafts2/

Try coding the goToURL function this way:

function goToURL(menu)
{
var myindex=menu.selectedIndex
if(!myindex=="")
{
window.location.href=menu.options[myindex].value;
}
}

and invoking it like this:

<select name="dropdownmenu" size="1" onchange="goToURL(this)">

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 

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