> THE FUNCTION
>
> <script language="JavaScript">
> <!--
> function popUp(URL,wwidth,wheight) {
> day = new Date();
> id = day.getTime();
> eval("page" + id + " = window.open(URL, '" + id + "',
>
'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="
> + wwidth + ",height=" + wheight + ",left = 75,top = 75');");
> }
> //-->
> </script>
>
>
> THE LINK
>
> <a href="javascript:popUp('pop.cfm,300,300')">Click me</a>

See, I can do the popup thing no problem. The problem is understanding this
bit of weirdness:

If you put a form tag in your page, like so:
<form action="survey_results.cfm" method="post">
What is most important to you when purchasing a Home?<br>
<input name="question1" type="radio" value="Area"> 1. Area<br>
<input name="question1" type="radio" value="Amenities"> 2. Amenities<br>
<input name="question1" type="radio" value="Schools"> 3. Local Schools<br>
<input name="question1" type="radio" value="Price"> 4. Price<br>
<input name="" type="submit" value="Submit">
</form>

The behaviour I'm looking for, is when you submit this single question, a
popup window pops up, and you see details on your answer, and
simultaneously, your answer is stored in a database. I have no problem with
the query to display details on your answer, nor do I have a problem with
storing the answer in the database. What I AM confused on, is that, if I put
an "action" attribute in my form tag, how do I make "survey_results.cfm" be
the popup? The way it's written now, if you press "submit" you GO to
survey_results.cfm. I'd like to keep you on the same page, popup
survey_results.cfm, and use survey_results.cfm as the popup and details
window.

Make sense?

I wasn't aware that you could just tack on the variable at the end (URL
scope) and still pass it via FORM scope. It's not working for me right now,
so I'm obviously doing something wrong. In other words, this isn't working:

<form action="survey_results.cfm" method="post">
What is most important to you when purchasing a Home?<br>
<input name="question1" type="radio" value="Area"> 1. Area<br>
<input name="question1" type="radio" value="Amenities"> 2. Amenities<br>
<input name="question1" type="radio" value="Schools"> 3. Local Schools<br>
<input name="question1" type="radio" value="Price"> 4. Price<br>
<input name="" type="submit" value="Submit"
onClick="('survey_results.cfm?question1=#question1#', '250,250')">
</form>

Should I just remove the "action" attribute from my form tag? I tried, and
that wasn't working...but maybe there's a combination of it that I'm
missing.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to