Advertisement

04.02.2008 at 09:43AM PDT, ID: 23289959
[x]
Attachment Details

ColdFusion.navigate Javascript does not work.

Asked by pigmentarts in Cold Fusion Markup Language, JavaScript, ColdFusion Application Server

my problem

i have a page with a simple javascript function on it. if i run this page it works, however if i have a link to this page  like this....  href="javaScript:ColdFusion.navigate('includes/departments-new.cfm','center')" the pages loads but the  javascript function will not work.  using cfdebug it states that the function can not be found. in order to get it to work i have to add the javascript to the main index page but this means that the javascript function is on every page taking up space when i dont want it to.

question

why when i use ColdFusion.navigate to load a page in to my cflayout area why does javascript on that page stop working?


 Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
example this works if i run this page, however if i was to load this into one of my cflayout areas using
javaScript:ColdFusion.navigate('includes/departments-new.cfm','center') 
it stops working, "javascript function textCounter not found"
 
<!---Function to Count and Limit Characters --->
<SCRIPT>
function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}
</script>
 
<form name="myForm" action="" method="post">
<textarea name="message1" wrap="physical" cols="28" rows="5"
onKeyDown="textCounter(document.myForm.message1,document.myForm.remLen1,125)"
onKeyUp="textCounter(document.myForm.message1,document.myForm.remLen1,125)"></textarea>
<br>
<input readonly type="text" name="remLen1" size="3" maxlength="3" value="125">
characters left
<input type="Submit" name="Submit" value="Submit">
<br>
</form>
 
Loading Advertisement...
 
[+][-]04.02.2008 at 10:38AM PDT, ID: 21265394

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cold Fusion Markup Language, JavaScript, ColdFusion Application Server
Sign Up Now!
Solution Provided By: SBennett
Participating Experts: 1
Solution Grade: A
 
 
[+][-]04.02.2008 at 11:36AM PDT, ID: 21266013

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906