Wrox Programmer Forums
|
BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0
This is the forum to discuss the Wrox book Professional JavaScript for Web Developers by Nicholas C. Zakas; ISBN: 9780764579080
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 23rd, 2005, 06:21 PM
Registered User
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding onclick stuff to an INPUT via javascript

I have an INPUT box, for the sake of brevity it shall hitherto be known as turkey, that I want to edit. Unfortuinately for me, there html page that it is located in is read only. Luckly, in the HEAD of the page, it loads a javascript file that is not read only.

Now, is there a way through javascript that I can edit turkey to add something like "onclick="javascript:dofunction()""?

 
Old November 29th, 2005, 01:08 PM
Registered User
 
Join Date: Oct 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yeah, so long as u can get a hold of it. Does turkey have an id? that way u can do a getElementById and once u have a referance to it you can use the addEventListener function to the dom, check out page 269 in the book.

-Paul Maneesilasan





Similar Threads
Thread Thread Starter Forum Replies Last Post
onclick="javascript: return false" on vista gabrieldcr2 Javascript 2 June 4th, 2008 09:40 AM
Adding Input Boxes ann86 Beginning PHP 1 April 7th, 2008 04:06 AM
input form ( onclick) bubblegirl Javascript How-To 1 March 6th, 2006 01:48 AM
Adding an OnClick procedure to repeater johno Classic ASP Databases 1 September 15th, 2005 03:36 AM
javascript onclick question robs Javascript 1 January 19th, 2005 05:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.