Hi guys,

Thought I'd let you know that the drop down is fixed thanks to a friend. It
was basically because as it looped through the records and created the new
drop downs I wasn't giving each drop down a unique name, so the JS was
getting a bit confused as to which menu was requesting which URL. One little
counter added to the CFOUTPUT and the problem was solved.

Cheers,
James

-----Original Message-----
From: James Buckingham [mailto:[EMAIL PROTECTED] 
Sent: 03 February 2004 16:36
To: '[EMAIL PROTECTED]'
Subject: [ cf-dev ] Drop down menu and URL links - strange results

Hi guys,
 
I've just built a drop down menu on a form which is created with this code:
 
<cfoutput query="get_tour_information"> 
 
    <select name="tour_selection" id="tour_selection"
onChange="location.href=Menu_form.tour_selection.options[selectedIndex].valu
e">
        <option value="add_new_date.cfm?ID=#Tour_ID#&Tour_ID=#Date_ID#"
selected>Add a new date</option>
        <option value="amend.cfm?ID=#Tour_ID#&Tour_ID=#Date_ID#">Edit
Tour</option>
        <option
value="delete_tour.cfm?ID=#Tour_ID#&Tour_ID=#Date_ID#">Delete this
tour</option>
        <option
value="delete_date.cfm?ID=#Tour_ID#&Tour_ID=#Date_ID#">Delete this
date</option>
    </select>
 
</cfoutput>
 
The idea is that the user clicks an option and they're taken to the
appropriate page depending on the value in the selection. This works great
for most of my results expect for a few and I don't know why. Some of them
throw up a JS error and say 'Menu_form.tour_selection.options' is null or
not an object. It's always the same ones as well.
 
As a test I went into amend.cfm and put in amend.cfm?ID=572&Tour_ID=267 as
an address, which was one of the results which was causing an error and the
information is being displayed just fine.
 
Any ideas what I'm doing wrong here?
 
Cheers,
James

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to