How to make a pdf display from a dbr dropdown box?

S

SAC

I have a table with the name of a shows and the path to corresponding pdf's.
I want to select a show and then have the pdf display.

I know how to do this in a list so I can click the hyperlink path field and
it displays but I haven't been able to make it happen with a dropdown box.

Thanks.
 
K

Kevin Spencer

<select name="something" size="1" onchange="document.location =
this.options[this.selectedIndex]">
<option value="http://www.takempis.com">TAKempis</option>
</select>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
S

SAC

I'm sorry, but I don't know what to do with this.

Where do I put this code.

I think the components would be:

<select name = "showdoc"
size="1"
onchange=[this would have to be the filed name of the dbrw - the field where
the path to the doc is]

(My recordset is rsShows)

would this be something like %rsShows("DocPath")%

I'm not sure what this.options[this.selectIndex]...

I'm not sure what to put in the onchange thing.

Then after all of this, where do I put this code?



Kevin Spencer said:
<select name="something" size="1" onchange="document.location =
this.options[this.selectedIndex]">
<option value="http://www.takempis.com">TAKempis</option>
</select>

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

SAC said:
I have a table with the name of a shows and the path to corresponding pdf's.
I want to select a show and then have the pdf display.

I know how to do this in a list so I can click the hyperlink path field and
it displays but I haven't been able to make it happen with a dropdown box.

Thanks.
 
K

Kevin Spencer

Where do I put this code.

Where you want the dropdown to appear, in your HTML.
I'm not sure what this.options[this.selectIndex]...

Well, your best bet would be to learn JavaScript. However, if you use the
code as I wrote it you don't have to understand it. Still, I would recommend
learning JavaScript and HTML. That is, after all, 98% of what you're using
FrontPage to write. You wouldn't have too good of an idea how to use Word if
you didn't know what a paragraph is, after all.
Then after all of this, where do I put this code?

Where you want the dropdown to appear, in your HTML.

Look, just paste the code I gave you into the HTML of any web page. Preview
the page. You'll see what it does. Or better yet, learn HTML and JavaScript.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

SAC said:
I'm sorry, but I don't know what to do with this.

Where do I put this code.

I think the components would be:

<select name = "showdoc"
size="1"
onchange=[this would have to be the filed name of the dbrw - the field where
the path to the doc is]

(My recordset is rsShows)

would this be something like %rsShows("DocPath")%

I'm not sure what this.options[this.selectIndex]...

I'm not sure what to put in the onchange thing.

Then after all of this, where do I put this code?



Kevin Spencer said:
<select name="something" size="1" onchange="document.location =
this.options[this.selectedIndex]">
<option value="http://www.takempis.com">TAKempis</option>
</select>

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

SAC said:
I have a table with the name of a shows and the path to corresponding pdf's.
I want to select a show and then have the pdf display.

I know how to do this in a list so I can click the hyperlink path
field
and
it displays but I haven't been able to make it happen with a dropdown box.

Thanks.
 
S

SAC

OK, thanks.
Kevin Spencer said:
Where do I put this code.

Where you want the dropdown to appear, in your HTML.
I'm not sure what this.options[this.selectIndex]...

Well, your best bet would be to learn JavaScript. However, if you use the
code as I wrote it you don't have to understand it. Still, I would recommend
learning JavaScript and HTML. That is, after all, 98% of what you're using
FrontPage to write. You wouldn't have too good of an idea how to use Word if
you didn't know what a paragraph is, after all.
Then after all of this, where do I put this code?

Where you want the dropdown to appear, in your HTML.

Look, just paste the code I gave you into the HTML of any web page. Preview
the page. You'll see what it does. Or better yet, learn HTML and JavaScript.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

SAC said:
I'm sorry, but I don't know what to do with this.

Where do I put this code.

I think the components would be:

<select name = "showdoc"
size="1"
onchange=[this would have to be the filed name of the dbrw - the field where
the path to the doc is]

(My recordset is rsShows)

would this be something like %rsShows("DocPath")%

I'm not sure what this.options[this.selectIndex]...

I'm not sure what to put in the onchange thing.

Then after all of this, where do I put this code?



Kevin Spencer said:
<select name="something" size="1" onchange="document.location =
this.options[this.selectedIndex]">
<option value="http://www.takempis.com">TAKempis</option>
</select>

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

I have a table with the name of a shows and the path to corresponding
pdf's.
I want to select a show and then have the pdf display.

I know how to do this in a list so I can click the hyperlink path field
and
it displays but I haven't been able to make it happen with a
dropdown
box.
 

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