Jump to content

Using <select> as an input


conradin

Recommended Posts

Hi All,I am trying to use a select box to show file names of any given users account where clicking on any of the select box item would then load the data into flot. I know flot is probably beyond the scope of this forum. What I am trying to do is use <select> as an input type. A tutorial I followed uses the value tag of a select box to store the urls until the OnChange event occurs.http://www.davesite.com/webstation/js/theory1jump.shtmlhowever, the URLs I have are different for every user. I tried creating a value tag set as a variable but that wouldn't work.What i want to do is have a select box that is filed with the sort file names of a users files. When a user clicks on the file name, the data loads. as this pertains to flot, I only know how to load data from a button or a select box. Also note, I'm using coldfussion, and my server doesn't have php. Below, is a (snippet) code for a working input button, and a non-working select box. I would really appreciate any help I can get.

<input class="fetchSeries" type="button" value="First dataset"> -      <a href="<cfoutput>#FileURL#</cfoutput>">data</a> -      <span></span>    </p><!--- Select List box --->		<!--- Populate a SELECT (list box control) --->    <!--- Form is listed for compatability issues. jump2 said location --->		<form name="jump2">		<!--- Files list for user --->        <select 	 class="fetchSeries"		name="jumpBox" 		size="5" 		id="Files"		OnChange="location.href=jump2.jumpBox.options[selectedIndex].value"		value="<cfoutput>#FileURL#</cfoutput>"		multiple>          <cfoutput query="FileListJSON">            <CFIF len(FileListJSON.Name) LE 4>					<cffile					  action = "copy"					  source = "#PathJSON##FileListJSON.Name#" 					 destination = "#PathJSON#NoName.json">					<cffile 					 action = "delete"					  file = "#PathJSON##FileListJSON.Name#">			<CFELSE>				<cfset FileToGraph = LEFT(FileListJSON.Name, len(FileListJSON.Name) - 4)>            	<option value="#FileToGraph#">#FileListJSON.Name#</option>			</CFIF>          </cfoutput>        </select>		</form>

If anyone really wants to be my hero and try using a set test set up I created, goto:http://icn2.umeche.maine.edu/newnav/NewNav...r/LoginForm.cfmlogin with the username: testotpassword: 111111then navigate to http://icn2.umeche.maine.edu/newnav/NewNavigator/e/ajax.cfm

Link to comment
Share on other sites

you may have better lucking posting in (or asking this to get moved to) the coldfusion forum

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...