Is it possible????

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
crinch
Forum Newbie
Posts: 11
Joined: Fri Jun 16, 2006 6:28 am

Is it possible????

Post by crinch »

Hi,

I am inerested in doing this for first time, therefore assistance is required.
Required:

1- Output should be there on popup window after submitting form with size of 300,300.

Explanation:

There is a form that has some checkboxes, we want that when a user clinks on the button after checked the check boxes a popup window opened and showed the checked box values.
If it is not possible, how can we handle this with a different mechanism.
I am doing all work in php.
Thanks in advance.
Crinch.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

The popup window is done with the javascript window.open() method. Showing the checkbox values in the popup can be done by passing them to the popup or by having the popup use the opener object to get the value from the main window.
(#10850)
crinch
Forum Newbie
Posts: 11
Joined: Fri Jun 16, 2006 6:28 am

Thank.But....

Post by crinch »

Hi.
would u like to give me some hints.




Thanks.
Crinch
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Try here: http://www.devguru.com/Technologies/ecm ... _open.html

Tell us if you still don't get it
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

You'll find that a lot of people on this forum will get mad if you just ask for code. Try to do a little research and post what you've already tried looking for so people don't get mad. Believe me it's happened to me.
crinch
Forum Newbie
Posts: 11
Joined: Fri Jun 16, 2006 6:28 am

Help!!!!!!!

Post by crinch »

Hi,

On button click i want that the form submitted and and the values of the form appear in the new opened popup window.After submitting the form should remain in the same URL.
For this i have done.

Code: Select all

<script language="javascript">
function compare()
{
 //alert("hello");
 //var url1=document.comparison.url.value();
 document.comparison.submit();
 var url ="index.php?option=com_content=+&task=category=+&sectionid=3=+&id=18=+&Itemid=18";
 //url +="?option=com_content";
 //url .="&task=category"; 
 //url .="&sectionid=3";
 //url .="&id=18";
 //url .="&Itemid=33";
 window.location('url');
 window.open('dummy.php');
}
</script>
But i am not getting understand how this layout should be settled.
Waiting for help.

Crinch.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Help!!!!!!!

Post by Christopher »

crinch wrote: On button click i want that the form submitted and and the values of the form appear in the new opened popup window.After submitting the form should remain in the same URL.
If I am understanding correctly, you want the action of the form to be the same page as the form page. So it submits to itself.
crinch wrote:But i am not getting understand how this layout should be settled.
I don't understand what you mean by "how this layout should be settled"? Can you clarify that?
(#10850)
crinch
Forum Newbie
Posts: 11
Joined: Fri Jun 16, 2006 6:28 am

Post by crinch »

Thanks for your interest. The layout mean.
I mean on button click the form page should be same after form submitting and the new popup window opened and we could use the form fiels on this popupwindow.
thanks.

Code: Select all

/////////////////////////////////////////////////
Also check this string is code.
var url="";
 url +="index.php";
 url +="?option="+com_content;
 url +="&task=" +category;
 url +="&sectionid="+2;
 url +="&id="17;
 url +="&Itemid="32;
 window.location= url;
/////////////////////////////////////////////////
This code gives error on this page as no event occurs and showed error on this page.


Waiting for help.
Thanks.
Crinch.
crinch
Forum Newbie
Posts: 11
Joined: Fri Jun 16, 2006 6:28 am

Post by crinch »

Hi,
I have done this with a simple form script and on button clik the form is being submitted lik this.

Code: Select all

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
<form name="comparison" action="dummy.php" method="post" target="_blank">
<input type="button" value="-Compare-" onclick="javascript:compare();">
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
Now the problem this the selected checkboxes in the form are not being givning their values on the popup window, i am trying with this code.

Code: Select all

<?php 
for($k=1; $k<=$_REQUEST['total']; $k++)
 {
    if(isset($_REQUEST['chk'].[$k]))
	{
	 print $_REQUEST['chk'].['$k'];
	}
	else 
                print "not selected";
 }
?>
here the totle is number of checkboxes on the form.

waiting for help.
Crinch.
Post Reply