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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup within <CFIF> statement

Status
Not open for further replies.

aleci

Programmer
May 22, 2001
40
GB
A simple one i hope,

<cfif isdefined(&quot;variable&quot;)>
I want a popup window to be generated here (passing the variable into new window)
<cfelse>
Nothing
</cfif>

Is this possible using javascript seeing as the user wont be physically clicking a link or submitting a form?
thanks
 
When you say a 'popup window' to 'pass the value to the new window', what exactly do you mean? Javascript has an alert() function, but that doesn't do much for passing variables or values....

What exactly are you trying to do?

MG
 
Hi MG,
I have limited JavaScript knowledge so i may be confused with the word 'popup'.

Forget about passing variables etc, what im trying is to automatically generate a new browser window (which is a simple cfm page) IF the variable defined in the CFIF statement exists.

So the page is run, and if this variable exists then a cfm page is popped up.
Im looking for exactly the same effect as the alert() function but with a page that i can format etc, so im not stuck with that gray box :)
Does that make sense and if so any ideas?
thanks
 
Just do this:

<cfif isdefined(&quot;variable&quot;)>
<script language=&quot;javascript&quot;>
window.open(...)
</script>
</cfif>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top