• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 649
  • Last Modified:

triggering cflocation on click

The codes are:

<a href="##" onClick="this.disabled=true;this.innerHTML='Please wait...';f=document.forms[0];f.TargetURL=this.href;f.submit();return false">Go Next</A>

<cflocation url="Cacl2.cfm">

I want to trigger <cflocation url="Cacl2.cfm"> ONLY when 'Go Next' (the link above) is clicked.
Otherwise, <cflocation url="Cacl2.cfm"> should remain inactive.

Any ideas?
0
ethanjohnsons
Asked:
ethanjohnsons
  • 2
2 Solutions
 
usachrisk1983Commented:
CFLOCATION cannot be changed at runtime (exception: some type of complex AJAX implimentation may help, but would likely be more trouble than it's worth, if it worked).  Can you tell us exactly what you're trying to accomplish and perhaps there is a better way?
0
 
ethanjohnsonsAuthor Commented:
Simply, the cflocation HAS to be in effect when the link is clicked so that the page can stay the same as long as the link is not clicked.
0
 
bwasyliukCommented:
The cflocation code is run server-side, whereas the onclick code (javascript) is run client-side in the browser.  One really has little to do with the other - the way you have it coded here.

Can you elaborate on what you mean by "cflocation has to be in effect"?

It looks like you dont need the cflocation code at all - the page will stay the same until the link is clicked.
0
 
ethanjohnsonsAuthor Commented:
thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now