Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Javascript: can textlink change content of formfield?

Javascript: can textlink change content of formfield?
Thread Tools
Dedicated MacNNer
Join Date: Nov 2000
Location: Netherlands
Status: Offline
Reply With Quote
Oct 22, 2001, 05:46 AM
 
I would like to change the content of a formfield by clicking on a textlink. Is this possible? I know how to do it with a button or an image.
"Chance is irrelevant. We will succeed."
== 7 of 9 ==
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Oct 23, 2001, 05:10 AM
 
if you know how to do it by clicking an image it should be simple to adapt that for a text link

just put the javascript in an onClick=" " thing in the a tag

eg

<a href="#" onClick="Whatever();">Text Link</a>
     
Mac Elite
Join Date: Aug 2000
Location: Minneapolis, MN
Status: Offline
Reply With Quote
Oct 23, 2001, 11:03 AM
 
I've done this to a 'framed' site to allow it to display the page title in a text field from each page as its loaded. I bet you can modify it to allow you to change to whatever you like.
http://bluedog.dyndns.org/bookssansfrontieres/

This was a mock-up site for a startup book importer (who decided to do more lucrative importing of sporting goods instead). This site was never completed so its just a shell, but can give you a good example of the text field changing.

My technique also changes the text field from a different frame. Its all about knowing the document object model and how to specify elements of a page.

Enjoy!

[ 10-23-2001: Message edited by: bluedog ]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:47 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2