LelloLello
asked on
Coldfusion questions - criteria for the url.
Please review my complete querry...
Based on my querry could you please help identify the criteria i should add to my url to go directly to my topic number 2 without selection topic.
This is my url for example: http://www.zbc.ca/members/org/forum/candidate_e.cfm
Whenever change i select i only see that url:
I will attach the code in my next comments.
Based on my querry could you please help identify the criteria i should add to my url to go directly to my topic number 2 without selection topic.
This is my url for example: http://www.zbc.ca/members/org/forum/candidate_e.cfm
Whenever change i select i only see that url:
I will attach the code in my next comments.
ASKER
.cfm?sortOption=2&candidat e_id=96939 8&topic_id =16&respon se_id=106
how i'm able to implement this in my code ?
how i'm able to implement this in my code ?
Where is the javascript function attached to the select box?
This could be why it is not working.
Please post that code.
This could be why it is not working.
Please post that code.
ASKER
<script>
function fnChangeCandidate(num){
if (num == 0){
document.frmCandidate.meth od = "post"
document.getElementById('x action').v alue = "true"
document.frmCandidate.acti on = "candidate_e.cfm"
document.frmCandidate.subm it()
}
else if(num == 1){
document.frmCandidate.meth od = "post"
document.getElementById('x action').v alue = "true"
document.frmCandidate.subm it()
}
else if(num == 2){
document.frmCandidate.meth od = "post";
document.getElementById('x action').v alue = "true"
document.frmCandidate.acti on = "responseToTopic.cfm";
document.frmCandidate.subm it();
}
else if(num == 3){
document.frmCandidate.meth od = "post";
document.getElementById('x action').v alue = "false"
document.frmCandidate.acti on = "responseToTopic.cfm";
document.frmCandidate.subm it();
}
else if(num == 4){
document.frmCandidate.meth od = "post";
document.getElementById('x action').v alue = "true"
document.getElementById('a ctivateTop ic').value = "true"
document.frmCandidate.acti on = "candidate_e.cfm";
document.frmCandidate.subm it();
}
}
function imposeMaxLength(Object, MaxLen)
{
return (Object.value.length <= MaxLen);
}
function openChild()
{
window.open('addComment.cf m','child' ,'status=0 , toolbar=0, location=0, menubar=0','');
}
</script>
function fnChangeCandidate(num){
if (num == 0){
document.frmCandidate.meth
document.getElementById('x
document.frmCandidate.acti
document.frmCandidate.subm
}
else if(num == 1){
document.frmCandidate.meth
document.getElementById('x
document.frmCandidate.subm
}
else if(num == 2){
document.frmCandidate.meth
document.getElementById('x
document.frmCandidate.acti
document.frmCandidate.subm
}
else if(num == 3){
document.frmCandidate.meth
document.getElementById('x
document.frmCandidate.acti
document.frmCandidate.subm
}
else if(num == 4){
document.frmCandidate.meth
document.getElementById('x
document.getElementById('a
document.frmCandidate.acti
document.frmCandidate.subm
}
}
function imposeMaxLength(Object, MaxLen)
{
return (Object.value.length <= MaxLen);
}
function openChild()
{
window.open('addComment.cf
}
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you will need to convert url variables into the form scope automatically
<cfset form = url />
What's interesting about that code is it doesn't actually overwrite the FORM scope. It creates a local variable referencing URL scope ie #variables.FORM#. The system FORM scope is left intact. To avoid subtle bugs, it's safer to copy the values from one scope to the other imo. Especially as structures are already passed by reference.
<!--- warning, this will overwrite any values in the FORM scope with the same name --->
<cfloop collection="#URL#" item="key">
<cfset FORM[key] = URL[key]>
</cfloop>
'
<cfset form = url />
What's interesting about that code is it doesn't actually overwrite the FORM scope. It creates a local variable referencing URL scope ie #variables.FORM#. The system FORM scope is left intact. To avoid subtle bugs, it's safer to copy the values from one scope to the other imo. Especially as structures are already passed by reference.
<!--- warning, this will overwrite any values in the FORM scope with the same name --->
<cfloop collection="#URL#" item="key">
<cfset FORM[key] = URL[key]>
</cfloop>
'
ASKER
Open in new window