473,508 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with popup win

6 New Member
I'm really confused here...i'll need some help with the following... i have a sceipt that will open a popup win which is actually a calendar and i'm trying to apply a style on the popup...

Here's the popup code:
Expand|Select|Wrap|Line Numbers
  1.                 var cal1 = new calendar1(document.forms['test'].elements['input1']);
  2.                 cal1.year_scroll = true;
  3.                 cal1.time_comp = false;
calendar1 is:
Expand|Select|Wrap|Line Numbers
  1. function calendar1(obj_target) {
  2.  
  3.     // assigning methods
  4.     this.gen_date = cal_gen_date1;
  5.     this.gen_time = cal_gen_time1;
  6.     this.gen_tsmp = cal_gen_tsmp1;
  7.     this.prs_date = cal_prs_date1;
  8.     this.prs_time = cal_prs_time1;
  9.     this.prs_tsmp = cal_prs_tsmp1;
  10.     this.popup    = cal_popup1;
  11.  
  12.     // validate input parameters
  13.     if (!obj_target)
  14.         return cal_error("Error calling the calendar: no target control specified");
  15.     if (obj_target.value == null)
  16.         return cal_error("Error calling the calendar: parameter specified is not valid target control");
  17.     this.target = obj_target;
  18.     this.time_comp = BUL_TIMECOMPONENT;
  19.     this.year_scroll = BUL_YEARSCROLL;
  20.  
  21.     // register in global collections
  22.     this.id = calendars.length;
  23.     calendars[this.id] = this;
  24. }
and cal_popup1 is:
Expand|Select|Wrap|Line Numbers
  1. function cal_popup1 (str_datetime) {
  2.     if (str_datetime)
  3.         this.dt_current = this.prs_tsmp(str_datetime);
  4.     else 
  5.         this.dt_selected = this.dt_current = this.prs_tsmp(this.target.value);
  6.  
  7.     if (!this.dt_current) return;
  8.  
  9.     var obj_calwindow = window.open(
  10.         'calendar.html?id=' + this.id + '&s=' + this.dt_selected.valueOf() + '&c=' + this.dt_current.valueOf(),
  11.         'Calendar', 'width=200,height=' + (this.time_comp ? 215 : 190) +
  12.         ',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
  13.     );
  14.     obj_calwindow.opener = window;
  15.     obj_calwindow.focus();
  16. }
What i'm trying to do is to apply the following somewhere inside one (?) of the above three functions...
Expand|Select|Wrap|Line Numbers
  1. var win = new Window({className: "spread", title: "Ruby on Rails", 
  2.                       top:70, left:100, width:300, height:200, 
  3.                       url: "calendar.html", showEffectOptions: {duration:1.5}})
Nov 17 '07 #1
3 1959
acoder
16,027 Recognized Expert Moderator MVP
How is Window defined and where?
Nov 17 '07 #2
mikaint
6 New Member
you are asking for this?
Expand|Select|Wrap|Line Numbers
  1.             <form action="" method="post" name="test">
  2.             <input type="Text" name="input1" value=""><a href="javascript:cal1.popup();"><img src="img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
Nov 17 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
I meant the Window object which you're calling with "var win = new Window(...)".

I see that you're using window.open to open a popup. You won't be able to style that like you would a DHTML pseudo-popup. You can make a few changes, e.g. change the height, width, position, but you should do that before opening the window.
Nov 18 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
5820
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields,...
1
383
by: Medical Watch | last post by:
Can anyone help me on this: I want to be able to open my paypal "view shopping cart" window with. window.open(url, cartid,window attrb) but it gets blocked by the popup blockers. window size is...
3
1389
by: Chris | last post by:
Hi, I have a parent page that loads a popup and when the OK button is press it pass the value back to the parent form textbox. It passes the value but it doesn't close the popup but also open...
8
1119
by: Chris | last post by:
Hi, I want to use a popup control in my asp app like the one in outlook web access and msn. This will be used to notify users of a change in the database. I plan on using the one on codeproject,...
4
2669
by: Chris | last post by:
Hi, I am trying to create a popup calender so a user can click on a button on the main form, a calender will then popup, the user will select a date and then click ok on the popup. The date will...
5
2022
by: Chris | last post by:
Hi, I have been trying for days, yes days, to use the calender from the asp.net timetracker starter kit. I am now frustrated. I finally get the popup calender to popup but when I click ok to...
3
1265
by: Richard Bell | last post by:
I'm working on a VB application that must run 24x7 for a LONG time, think 60 days of so. As part of what it does it must automate an instance of IE and navigate to many different URLs, think many...
1
1457
by: mailme.grover | last post by:
Below is my code, which is kind of virtual and with its help ill use it in my main project. Now what i am looking for is can anybody write all the code inside a class...so that I can reuse it. I...
9
2217
by: rousseaud | last post by:
I'm having some trouble getting popup forms to work properly. I have a main form that contains 4 fields that I want to fill in by using a series of 4 popup forms that I initiate by clicking a...
0
1249
by: NewJavaBee | last post by:
please guide me. i have the following problem: i have a parent window that has a dropdown that is showing names and which is getting its value from a table.table conatins two columns, one is Name...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7036
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.