|
yes my dear,
.....
Name of the file ts_pick.js
The code:
// Title: Timestamp picker
// Description: See the demo at url
// Version: 1.0
// Date: 2001-05-12 (yyyy-mm-dd)
// Notes: Permission given to use this script in any kind of applications if
// header lines are left unchanged. Feel free to contact the author
// for feature requests and/or donations
function show_calendar(str_target, str_datetime) {
var arr_months = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"];
var mons=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];
var week_days = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
var n_weekstart = 1; // day week starts from (normally 0 or 1)
var dt_datetime = (str_datetime == null || str_datetime =="" ? new Date() : str2dt(str_datetime));
var dt_prev_month = new Date(dt_datetime);
dt_prev_month.setMonth(dt_datetime.getMonth()-1);
var dt_next_month = new Date(dt_datetime);
dt_next_month.setMonth(dt_datetime.getMonth()+1);
var dt_firstday = new Date(dt_datetime);
dt_firstday.setDate(1);
dt_firstday.setDate(1-(7+dt_firstday.getDay()-n_weekstart)%7);
var dt_lastday = new Date(dt_next_month);
dt_lastday.setDate(0);
// html generation (feel free to tune it for your particular application)
// print calendar header
var str_buffer = new String (
"\n"+
"\n"+
" <title>Calendar\n"+
"\n"+
"\n"+
"\n"+
"\n\n\n"+
"\n"+
"\n \n"+
" \n\n");
var dt_current_day = new Date(dt_firstday);
// print weekdays titles
str_buffer += "\n";
for (var n=0; n<7; n++)
str_buffer += " \n";
// print calendar table
str_buffer += "\n";
while (dt_current_day.getMonth() == dt_datetime.getMonth() ||
dt_current_day.getMonth() == dt_firstday.getMonth()) {
// print row heder
str_buffer += "\n";
for (var n_current_wday=0; n_current_wday<7; n_current_wday++) {
if (dt_current_day.getDate() == dt_datetime.getDate() &&
dt_current_day.getMonth() == dt_datetime.getMonth())
// print current date
str_buffer += " \n";
dt_current_day.setDate(dt_current_day.getDate()+1);
}
// print row footer
str_buffer += "\n";
}
// print calendar footer
str_buffer +=
"\n\n\n" +
"");
str_buffer=str_buffer+("");
for(inc=0;inc"+arr_months[inc]);
else
str_buffer=str_buffer+(""+arr_months[inc]);
}
str_buffer=str_buffer+("");
str_buffer=str_buffer+new String(" | ");
str_buffer=str_buffer+("");
for(inc=1900;inc<=2100;inc++)
{
if(dt_datetime.getFullYear()==inc)
str_buffer=str_buffer+(""+inc);
else
str_buffer=str_buffer+(""+inc);
}
str_buffer=str_buffer+("");
str_buffer=str_buffer+new String(" | "+
""+
week_days[(n_weekstart+n)%7]+" | ";
else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
// weekend days
str_buffer += " | ";
else
// print working days of current month
str_buffer += " | ";
if (dt_current_day.getMonth() == dt_datetime.getMonth())
// print days of current month
str_buffer += ""+
"";
else
// print days of other months
str_buffer += ""+
"";
str_buffer += dt_current_day.getDate()+" | "+
""+
" | \n" +
" | \n" +
"\n" +
"\n";
var vWinCal = window.open("", "Calendar",
"width=196,height=195,status=no,resizable=yes,top=200,left=200");
vWinCal.opener = self;
vWinCal.focus();
var calc_doc = vWinCal.document;
calc_doc.write (str_buffer);
calc_doc.close();
}
// datetime parsing and formatting routimes. modify them if you wish other datetime format
function str2dt (str_datetime) {
str_datetime=str_datetime+" ";
var re_date = /^(\d+)\-(\d+)\-(\d+)\s$/;
if (!re_date.exec(str_datetime))
return alert("Invalid Datetime format: "+ str_datetime);
return (new Date (RegExp.$1, RegExp.$2-1, RegExp.$3, RegExp.$4, RegExp.$5, RegExp.$6));
}
function dt2dtstr (dt_datetime) {
//return (new String (dt_datetime.getDate()+"-"+(dt_datetime.getMonth()+1)+"-"+dt_datetime.getFullYear()+" "));
var mon=dt_datetime.getMonth()+1;
if (mon<10) mon='0'+mon;
var dt =dt_datetime.getDate();
if(dt<10) dt='0'+dt;
return (new String (dt_datetime.getFullYear()+"-"+mon+"-"+dt));
// return (new String (dt_datetime.getDate()+"-"+document.cal.month.value+1+"-"+document.cal.year.value));
}
function dt2tmstr (dt_datetime) {
//return (new String (
// dt_datetime.getHours()+":"+dt_datetime.getMinutes()+":"+dt_datetime.getSeconds()));
return("");
}
vivek
|
|
|
|
|
Hi All,
I'm using a webservices that uses RPC encoding , where i'm passing my request using httprequest object.
I've created a test application, where its working fine, but when i want it to use in my existing project where there are 3 tiers, its just bugging me saying "underlying connection is closed".
The error occurs when i'm reading response in stream.
Can anybody please tell me what could be wrong?
Please mail me to satish.nagdev@gmail.com
thanks in advance
satish
|
|
|
|
|
I want to disable or Hide the Close button [X] of the Browser. The browser is IE 6.0.
Satyajit S.Vetal
|
|
|
|
|
Can't be done - at least not in a webpage
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi!
I want to create a email box with spellchecker. can anyone tell me code of spellchecker.
Thanks
Arpita
|
|
|
|
|
arpita2006 wrote: can anyone tell me code of spellchecker
CODE001 lol
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
|
In both IE & Firefox I am getting a lot of:
- Error in parsing value for property 'cursor'.
- Error in parsing value for property 'top'.
- Error in parsing value for property 'display'.
in CSS & HTML files. Here are some snippets of code I use:
img.menuButton
{
cursor: hand;
}
.Freezing
{
top: expression(-2 + this.offsetParent.scrollTop);
}
203085
I also get window.event has no properties:
when I use it for window.event.srcElement.dragDrop();
Can someone help me clear up these errors please.
|
|
|
|
|
The "hand" value only exists in IE. The corresponding standard value is "pointer".
Expressions are only supported in IE.
---
b { font-weight: normal; }
|
|
|
|
|
The funny thing is VS2003 throws a warning if you use the value pointer, and VS2005 doesn't have hand as selectable value in intellisense but doesn't throw a warning either if you use it. Oh well.
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
Is it possible to change the alert box caption which is displayed in top left corner ("Microsoft Internet Explorer") to my own caption.
Thanks in advance
Warm Regards
Prakash-B
|
|
|
|
|
|
Hi guys,
I only have a pc here, so I can test various browsers fine, but I can't test to see how pages will display on a Mac. Is there a site or a tool one can use to simulate a Mac browsing a site?
Thanks
A mum and loving it!
|
|
|
|
|
|
Thanks Deepak!
On a particular site I've been asked to display a warning to Mac users only (still looking up how to do this), and once I've figured it out I'll obviously want to test and see if it works. Bit hard without a Mac though which is why I'm hoping for some kind of simulator. .
A mum and loving it!
|
|
|
|
|
Megan Forbes wrote: display a warning to Mac users only (still looking up how to do this)
Just in case anyone else is interested:
<script type="text/javascript"><!--<br />
<br />
var detect = navigator.userAgent.toLowerCase();<br />
var OS;<br />
<br />
function checkIt(string)<br />
{<br />
var place, thestring;<br />
place = detect.indexOf(string) + 1;<br />
thestring = string;<br />
return place;<br />
}<br />
<br />
function isMac(){<br />
var OS;<br />
if (!OS)<br />
{<br />
if (checkIt('mac'))<br />
{<br />
OS = "mac";<br />
alert("Mac");<br />
}else<br />
{<br />
alert("Not Mac");<br />
}<br />
}<br />
}<br />
Still looking for a Mac browser emulator though if anyone knows of one?
A mum and loving it!
|
|
|
|
|
Here's a site which will allow you see how Apple's Safari displays the website.
http://www.snugtech.com/safaritest/[^]
Have used the site a couple of times before.
Graham.
[Edit]
Just found this: http://fundisom.com/g5/[^]
It's offline at the moment, but apparently it will test Safari 2.0, Internet Explorer 5.2.3, Mozilla 1.7.7
-- modified at 22:45 Friday 16th June, 2006
|
|
|
|
|
Thanks very much Graham!
A mum and loving it!
|
|
|
|
|
Hi Everybody,
I would like my frames to not exceed 528px but somehow the always resize themselves to the 100% of the page width.
<br />
<frameset framespacing="0" <font color="Red">cols="528"</font> rows="60,300,30"> <br />
<frame id="Header" frameborder="no" noresize scrolling="no" src="../GlobalFiles/Header.htm"> <br />
<frameset border="0" framespacing="0" frameborder="no" rows="300" cols="*,5,220"> <br />
<frame noresize name="Blog" id="Blog" scrolling="auto" src="Blog.aspx"> <br />
<frame noresize name="spacer" scrolling="no" src=""> <br />
<frame noresize name="navi2" scrolling="no" src="Navi2.aspx" Target="blog"> <br />
</frameset> <br />
<frame id="Bottom" frameborder="no" noresize scrolling="no" src="../GlobalFiles/Bottom.htm"> <br />
</frameset> <br />
Thank you in advance,
/Peace2u my friend
|
|
|
|
|
A frameset always fills the entire window or frame.
Put another frameset around the current frameset, add a frame with a blank page in it, and use cols="528,*" to make the blank page use the rest of the width.
You could use cols="528,*" in the current frameset, but then you need to add three blank frames to it.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you gruffa.
I ow you
/Peace2u my friend
|
|
|
|
|
|
Hello,
I am using IIS 6.0 and faced with a possible authorization problem on the web server. The problem that I faced is occured in "global.asa" on Application("variable") statement. The system is generating following page on web browser and I never encounter anything in "event log";
error '8002801d'
/LM/W3SVC/1/Root/global.asa, line 13
Also, "global.asa" as below;
<SCRIPT LANGUAGE=VBScript RUNAT=Server><br />
<br />
'EventName Description<br />
'Session_OnStart Runs the first time a user runs any page in your application<br />
'Session_OnEnd Runs when a user's session times out or quits your application<br />
'Application_OnStart Runs once when the first page of your application is run for the first time by any user<br />
'Application_OnEnd Runs once when the web server shuts down<br />
<br />
</SCRIPT><br />
<br />
<SCRIPT LANGUAGE=VBScript RUNAT=Server><br />
Sub Application_OnStart<br />
Application("ConnSMC_ConnectionString") = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Connect Timeout=15;Extended Properties=""DRIVER=SQL Server;SERVER=asya;UID=sa;APP=Microsoft® Access;WSID=KEMAL;DATABASE=SMC"";Locale Identifier=1033;"<br />
Application("ConnSMC_ConnectionTimeout") = 15<br />
Application("ConnSMC_CommandTimeout") = 30<br />
application("lang")="TRK" 'dil secenegi<br />
End Sub<br />
</SCRIPT>
So, has anyone an idea that what caused this problem on the IIS?
Regards,
Orkun GEDiK
SAP R/3 BASIS and Development Consultant
ASTRON
-- modified at 2:21 Friday 16th June, 2006
|
|
|
|
|
|
Hi there,
Would any one of you suggest me a good java script debugger for Linux?
regards,
Gobi
|
|
|
|