I have intergarted a popup CKFinder (php) on a webpage that have three input fields + Browse server buttons to select three different images, with the code in the _samples\js\popup.html file.
I can get only one field to work. If a name my input field's (the id) with 'img1", "img2" and "img3",
what must i change on the SetFileField function to work with three different id's?
Cheers,
Niles
I can get only one field to work. If a name my input field's (the id) with 'img1", "img2" and "img3",
what must i change on the SetFileField function to work with three different id's?
// This is a sample function which is called when a file is selected in CKFinder.
function SetFileField( fileUrl )
{
document.getElementById( 'img1' ).value = fileUrl ;
}Cheers,
Niles

Re: How can i use multiple input fields / CKFinder selections?
Re: How can i use multiple input fields / CKFinder selections?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * CKFinder * ======== * http://www.ckfinder.com * Copyright (C) 2007-2008 Frederico Caldeira Knabben (FredCK.com) * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CKFinder - Sample - Standalone</title> <script type="text/javascript" src="../../ckfinder.js"></script> <script type="text/javascript"> function BrowseServer(field) { // It can also be done in a single line, calling the "static" CKFinder.Popup( '../../', null, null, function(url) {SetFileField(field, url)} ) ; } function SetFileField( field, fileUrl ) { document.getElementById( field ).value = fileUrl ; } </script> </head> <body> <h1> CKFinder - Sample - Popup<br /> </h1> <hr /> <p> CKFinder may be used in standalone mode inside any page, to create a repository manager with easy. You may define a custom JavaScript function to be called when an image is selected (double-clicked).</p> <p> Field 1<br /> <input id="xFilePath1" name="FilePath1" type="text" size="60" /> <input type="button" value="Browse Server" onclick="BrowseServer('xFilePath1');" /><br /> Field 2<br /> <input id="xFilePath2" name="FilePath2" type="text" size="60" /> <input type="button" value="Browse Server" onclick="BrowseServer('xFilePath2');" /> </p> </body> </html>Re: How can i use multiple input fields / CKFinder selections?
http://www.fckeditor.net/forums/viewtopic.php?f=10&t=8136#p21413