CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 popup window

Print topic Send  topic

Author Message
Jim
Posted: 11/05/2003, 8:53 AM

Hi!

How can i pass some records to a popup window?

What i want is, when i click on a record, it open a customizable window (with no browser tools, set with custom height and width...)

I can open a popup, but my records are not in it.
Did i have to add javascript code in the "onclick" event of the link or if i had "target=_blank" next to the href in the HTML? If the last solution is ok, where do i put my custom code for the height, width...?

Thanks for helping me :)
ryan
Posted: 11/05/2003, 3:19 PM

Jim :

I assume you already have a form. Maybe this example from my previous project will help
On CCS html template.

------------------------------------------------
<form name="frm_TimeRange" method="post" onsubmit="return TimeRange_valid(this)">
<table class="GiantStepsFormTABLE" cellspacing="0" cellpadding="3" width="{TW}">
<tr>
<td class="GiantStepsFieldCaptionTD">Choose
Time Range </td>
<td class="GiantStepsDataTD">From  </td>
<td class="GiantStepsDataTD">{RangeFrom} </td>
<td class="GiantStepsDataTD">To  </td>
<td class="GiantStepsDataTD">{RangeEnd} </td>
</tr>

<tr>
<td class="GiantStepsFieldCaptionTD">Rooms </td>
<td class="GiantStepsDataTD"> </td>
<td class="GiantStepsDataTD"><input type="hidden" name="DateReserved" value="{DateReserved}">
<select class="GiantStepsSelect" name="{Rooms_Name}">
{Rooms_Options}
</select>
 </td>
<td class="GiantStepsDataTD"> </td>
<td class="GiantStepsDataTD"> </td>
</tr>

<tr>
<td class="GiantStepsFooterTD" nowrap colspan="5"><input class="GiantStepsButton" type="submit" value="Submit"> </td>
<!--td class="GiantStepsFooterTD"> </td>
<td class="GiantStepsFooterTD"> </td>
<td class="GiantStepsFooterTD"> </td>
<td class="GiantStepsFooterTD"> </td>
<td class="GiantStepsFooterTD"> </td-->
</tr>

</table>
<!--input class="GiantStepsButton" onclick="javascript:location.replace('{ThePage}?{GetQstr}');" type="button" value="Default"-->
</form>
------------------------------------------------

Now TimeRange_valid is a Javascript therefore place this function B/W your <head>..........</head>

------------------------------------------------
/*
It's up to you to set the form field names <input name="urinputname"... />
*/
//NewWindow popup script
var win= null;
//pass params TimeTo,OR_UnitsSubID,DateReserved,GrpTimeID
function NewWindow(mypage,myname,w,h,scroll){

var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=no';
win=window.open(mypage,myname,settings);
//win = window.showModalDialog(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function TimeRange_valid(theForm)
{

if( (parseInt(theForm.RangeFrom.value) == 0) || (parseInt(theForm.RangeEnd.value) == 0) )
{
alert("kindly choose a valid time range");
return(false);
}


if(parseInt(theForm.RangeFrom.value) > parseInt(theForm.RangeEnd.value))
{
alert("time range FROM should be LESS THAN the time range TO");
return(false);
}

if(parseFloat(theForm.RangeFrom.value) >= parseFloat(theForm.RangeEnd.value))
{
alert("time range FROM should be LESS THAN the time range TO");
return(false);
}

else
{
//qstring_ = "u_ShowDatePost.asp?RangeFrom="+theForm.RangeFrom.value+"&RangeEnd="+theForm.RangeEnd.value+"&OR_UnitsSubID="+theForm.Rooms.value+"&DateReserved="+theForm.DateReserved.value+"&dummy=dummy";
qstring_ = "u_BeforeShowDatePost.asp?RangeFrom="+theForm.RangeFrom.value+"&RangeEnd="+theForm.RangeEnd.value+"&OR_UnitsSubID="+theForm.Rooms.value+"&DateReserved="+theForm.DateReserved.value+"&dummy=dummy";
//qstring_ = 'u_ShowDatePost.asp?RangeFrom=RangeFrom&OR_UnitsSubID=-1&GrpTimeID=GrpTimeID&DateReserved=9/4/2003&OR_UnitsID=1';
//alert(qstring_);
//NewWindow('u_ShowDatePost.asp?RangeFrom=RangeFrom&OR_UnitsSubID=-1&GrpTimeID=GrpTimeID&DateReserved=9/4/2003&OR_UnitsID=1','name','223','213','yes');
//NewWindow(qstring_,'name','223','213','yes');
NewWindow(qstring_,'name','373','395','yes');

return(false);
}

return(true);
}


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.