> What would be the best way to insert a hyperlink using JS? > If a user clicks on one of the documents it will close the open window (the > list) and insert a hyperlink into the window underneath (into a form input > field called "document") with a URL like: > > <a href="o_viewdoc.cfm?id=#id#">my hyperlink</a> - ID will depend on which > document they clicked on.
I think you'd give the <a href> an ID attribute, such as "docLink", and use: parent.docLink.href = 'o_viewdoc.cfm?id=#docId#'; 'href' is a property of each <a> element in the DOM, and can be changed like this. hth, - Gyrus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net - PGP key available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

