How to capture page title

T

terry

Here is my problem. I would like to add a button on a web page that will do
two things. First capture the page title Second open a form and paste (or
fill in the captured data to one of the fields. New to front page please
provide as much detail as possible.. Thank you in advance for your help or
suggestions
FrontPage 2003
 
J

Jon Spivey

Hi Terry,
Can't visualise exactly what you want but for a strat try sticking this on a
page
<form>
<input type="text" name="PageTitle">
<input type="button" onclick="this.form.PageTitle.value=document.title;">
</form>

Does that give you a start?

Cheers,
Jon
 
R

Rob Giordano \(Crash\)

nifty...wonder what the point of it is though

--
~~~~~~~~~~~~~~~~~~
Rob Giordano
Microsoft MVP Expression
 
J

Jon Spivey

Don't know. If I've read the question correctly it sounds like what he wants
:)

Cheers,
Jon
 
T

terry

Thanks for the input I will try this. But to clear up what this is, let me
explain.
The site is a funeral home.We post the obits for each deceased. and change
the page title to the deceased name. On the same page family and friends can
send a online condolence. (this is where the form load comes in) We would
like to capture the page title and paste it into the first field on the form
so that when it is sent to the database all records are sorted by the
Deceased name (Page title) then we will print a report from Access for with
all of the online condolences for that individual
 
R

Rob Giordano \(Crash\)

or you could just put the deceased name in a hidden form field maybe



--
~~~~~~~~~~~~~~~~~~
Rob Giordano
Microsoft MVP Expression
 
J

Jon Spivey

Hi,
I think Rob's idea of putting the deceased's name into a hidden field makes
most sense. You can do this with whatever scripting you have (ASP or
similar) or you could use javascript to populate the field like this
<form>
<input type="hidden" name="Deceased">
....other form fields...
</form>
<script type="text/javascript">
document.forms[0].Deceased.value=document.title;">
</script>

Cheers,
Jon
 
T

terry

Jon
Just to make sure I am on the right page.
1) Where would I place that JS Script. Please understand I know nothing
about scripting.
2)Also we use the same form for all deceased and should I be loadiing the
form in a new window instead of a link?

Thanks for your understand and help
--
Terry


Jon Spivey said:
Hi,
I think Rob's idea of putting the deceased's name into a hidden field makes
most sense. You can do this with whatever scripting you have (ASP or
similar) or you could use javascript to populate the field like this
<form>
<input type="hidden" name="Deceased">
....other form fields...
</form>
<script type="text/javascript">
document.forms[0].Deceased.value=document.title;">
</script>

Cheers,
Jon
 

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