Solved

clicking on button should open a popup window to processing

Posted on 2009-07-10
6
312 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…

803 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