Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Alert 1

Status
Not open for further replies.

BobLaw

Programmer
Oct 2, 2000
27
US
Hello,

I am stuck again, here is what I need to do.

<cfif findProduct.recordcount EQ 0>

<script>
alert('Sorry, that Product was not found.');
</script>

<CFLOCATION url=&quot;transfer_Product.cfm&quot; addtoken=&quot;No&quot;>
<cfelse>

The problem is that as long as I have the line
<CFLOCATION url=&quot;transfer_Product.cfm&quot; addtoken=&quot;No&quot;>
in that <cfif statement the alert will not work it
seems to just ignore it, if I remove the <CFLOCATION I
receive the alert.

Any idea's on how to solve this?

Thanks. [sig][/sig]
 
You may try something like:

<script>
alert('Sorry, that Product was not found.');
window.location=&quot;transfer_product.cfm&quot;
</script>

I've run into the same problem in the past. Using Javascript to redirect had solved this for me. If anyone has another way I'd love to hear it! [sig][/sig]
 
Thanks! that did what I needed to do, I would still like
to know why the other method fails.

Take care...
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top