Solved

clicking on button should open a popup window to processing

Posted on 2009-07-10
6
315 Views
Last Modified: 2013-12-24
Hi i want that when i should click the rate buttn, a popup should open and rating selected should

be updated in the table.

Here is my form below

<cfform>
<table width="100%" border="0">
  <tr>
    <td width="13%">
        <input type="radio" name="RateType" value="1" style="width:16px;">
        <input type="radio" name="RateType" value="2" style="width:16px;">
        <input type="radio" name="RateType" value="3" style="width:16px;">
        <input type="radio" name="RateType" value="4" checked="yes" style="width:16px;">
        <input type="radio" name="RateType" value="5" style="width:16px;"></td>
    <td width="87%"><cfoutput>
    <input type="button" class="button" value="Rate" onClick="WinOpen('imgrated.cfm?rate=#form.rateType#','400','400');">
	</cfoutput>
    </td>
  </tr>
</table>
</cfform>

Open in new window

0
Comment
  • 4
  • 2
6 Comments
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 24825499
it is not working as i am getting a error:

Undefined ratetype in form
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 24825512
window.open is the js function uset to open a window.

change WinOpen
to
window.open



example URL:

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
<input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
0
 
LVL 13

Accepted Solution

by:
srikanthmadishetti earned 500 total points
ID: 24825554


<form name="test>
<table width="100%" border="0">
  <tr>
    <td width="13%">
        <input type="radio" name="RateType" value="1" style="width:16px;">
        <input type="radio" name="RateType" value="2" style="width:16px;">
        <input type="radio" name="RateType" value="3" style="width:16px;">
        <input type="radio" name="RateType" value="4" checked="yes" style="width:16px;">
        <input type="radio" name="RateType" value="5" style="width:16px;"></td>
    <td width="87%"><cfoutput>
    <input type="button" class="button" value="Rate" onClick="window.open('imgrated.cfm?rate='+document.form.RateType.value,'400','400');">
        </cfoutput>
    </td>
  </tr>
</table>
</form>
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 24826068
it is not working, when i click the button, nothing happens

What is going wrong.
0
 
LVL 16

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 31602180
Just need to rename the document.form to the name of form as document.test and it worked

Cheers
0
 
LVL 16

Author Comment

by:Gurpreet Singh Randhawa
ID: 24826248
if i want to add one more string then how do i do, i mean one more value in the onclick event
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question