NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page JavaScript to populate a text box

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 09-21-2005, 02:46 PM THREAD STARTER               #1 (permalink)
NamePros Member
 
kpm547's Avatar
Join Date: May 2005
Location: Canada
Posts: 171
kpm547 is an unknown quantity at this point
 



JavaScript to populate a text box


I have a program that has a save function. To save you input the name into a textbox and press save. I have also shown what the current file name that is being worked on is. I would like to make this filename a link. When the link is clicked, I want it to put the name into the save box so you can save over the existing file.

I'm no javascript genius, so I need some code for it. Does anyone know where I can find some code for this or will anyone post some code that will do this? All I need is to pass the name of the link to the textbox.

Thanks
__________________
www.twocrazyducks.com - Two Crazy Ducks Web Hosting - Lethbridge, Alberta
www.lasara.org - Lethbridge Area Search and Rescue
themuellers.ca - The Mueller Family Webpage
jobsitestructures.com - Job Site Structures Ltd. - for all your site office and accomodation needs!
kpm547 is offline  
Old 09-23-2005, 09:58 AM THREAD STARTER               #2 (permalink)
NamePros Member
 
kpm547's Avatar
Join Date: May 2005
Location: Canada
Posts: 171
kpm547 is an unknown quantity at this point
 



Nobody has any ideas?

I found this piece of code, but it doesn't work. Could someone fix this up?

Code:
<form name="myForm">
The form's name is: <input type="text" name="text1" size="20">
<br /><br />
<a href="" onClick="myform.text1.value="thename"">push me</a>
</form>
When you click the link I want it to put "thename" into the text box.

Nevermind, figured it out. Here's the code for others that might need something similar.

Code:
<form name="myForm">
The form's name is: <input type="text" name="text1" size="20">
<br /><br />
<a style="color:blue;text-decoration:underline;cursor:pointer;"  onClick="document.myForm.text1.value='thename'">push me</a>
</form>
__________________
www.twocrazyducks.com - Two Crazy Ducks Web Hosting - Lethbridge, Alberta
www.lasara.org - Lethbridge Area Search and Rescue
themuellers.ca - The Mueller Family Webpage
jobsitestructures.com - Job Site Structures Ltd. - for all your site office and accomodation needs!
Last edited by kpm547; 09-23-2005 at 10:19 AM.
kpm547 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Good Article: An SEO Checklist Ferman Search Engines 2 05-28-2005 11:51 AM
Why can't I get clicks majinbuu1023 Google Adsense 43 04-15-2005 10:24 PM
HTML Part I [For the beginners Mystic Webmaster Tutorials 0 03-29-2005 07:39 AM
cannot find script sickle Web Design Discussion 5 04-03-2004 07:36 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 11:35 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger