Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

ASP and Javascirpt problem

 
   Web Hosting and Web Master Forums (Home) -> IIS RSS
Next:  How To Repair IIS Mapping After You Remove and Re..  
Author Message
marcinzmyslows

External


Since: Oct 13, 2004
Posts: 2



(Msg. 1) Posted: Wed Oct 13, 2004 11:26 pm
Post subject: ASP and Javascirpt problem
Archived from groups: microsoft>public>inetserver>iis (more info?)

Hello all!

I have problem with code. Firstly I have created the VBScript code which
count me the time and days which left to the end of working week. I work
from 8:00 am till 4 pm.
I would like to show this information on the screen by using "input form
element" and using onload event which is refreshed after every 1 second.
Unfortunately I don`t want
to replace vbscript code on javascript code to do so. I want to have
vbscirpt. Could you do me a favour and rebuild this code below to make it
properly working.

I would be very grateful if you could help me
Regards
and thanx for help
Marcin from Poland
----------------------------------------------------------------------------
-----------------------

<HTML>
<HEAD>

<% @language=vbscript %>
<%
function funkcja_czas()
dim roznica_koniec_dnia_pracy,roznica_koniec_tygodnia, roznica_czas_m,
roznica_czas_h, roznica_czas_s, znacznik_dnia1,znacznik_dnia2,
znacznik_dnia, czas

roznica_koniec_tygodnia=(7-weekday(date,vbMonday))

roznica_koniec_dnia_pracy=roznica_koniec_tygodnia-2
roznica_czas_h=(DateDiff("h",Time,CDate("16:00:00"))-1)

if Hour(Time)<16 then
czas=Cdate(Cstr(Hour((Time+Cdate("01:00:00")))) & ":00:00")
roznica_czas_m=(DateDiff("n",time,czas))
czas=Cdate(Cstr(Hour(Time) & ":" & Minute(Time+Cdate("00:01:00")) & ":00"))
roznica_czas_s=(DateDiff("s",time,czas))
if roznica_czas_s=60 then
roznica_czas_s=0
end if
else
roznica_czas_m=0
end if


if roznica_koniec_dnia_pracy=1 then
znacznik_dnia1="dzieñ"
else
znacznik_dnia1="dni"
end if

if roznica_koniec_tygodnia=2 then
znacznik_dnia2="dzieñ"
else
znacznik_dnia2="dni"
end if

funkcja_czas= ("Koniec tygodnia nastapi za " & roznica_koniec_tygodnia & " "
& znacznik_dnia2 & "<BR>" & "Koniec tygodnia pracy nastapi za " &
roznica_koniec_dnia_pracy &" "& znacznik_dnia1 & " " & roznica_czas_h & ":"
& roznica_czas_m & ":" & roznica_czas_s & " sec.")
end function
ff="1"
%>



<SCRIPT LANGUAGE="JavaScript">
<!--

function clock()
{

document.clock.time.value=
<%
ff
%>;
window.setTimeout("clock()", 900);
}

// -->
</SCRIPT>

</HEAD>

<BODY onload="clock();">

<form name="clock">
Time <input type=text name="time" size="20" style="border: 0">
</form>

 >> Stay informed about: ASP and Javascirpt problem 
Back to top
Login to vote
user2280

External


Since: Oct 13, 2004
Posts: 4



(Msg. 2) Posted: Wed Oct 13, 2004 11:26 pm
Post subject: Re: ASP and Javascirpt problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi, try this:
Dim objFSO,NomePasta

set objfso = createobject("scripting.filesystemobject")
FolderName = "vilmar_" & day(date) & "-" & month(date) & "-" & year(date)
if not objfso.folderexists(FolderName) then
objfso.createfolder(FolderName)
inputbox "Criada a pasta: " & FolderName,vbinformation,"informações do
sistema"
else
inputbox "A pasta a seguir já foi criada: " &
FolderName,vbcritical,"informações do sistema"
end if

bye,
Vilmar

"Kamyk" <marcinzmyslowski.DeleteThis@poczta.onet.pl> escreveu na mensagem
news:ckjs73$gku$1@news.onet.pl...
 > Hello all!
 >
 > I have problem with code. Firstly I have created the VBScript code which
 > count me the time and days which left to the end of working week. I work
 > from 8:00 am till 4 pm.
 > I would like to show this information on the screen by using "input form
 > element" and using onload event which is refreshed after every 1 second.
 > Unfortunately I don`t want
 > to replace vbscript code on javascript code to do so. I want to have
 > vbscirpt. Could you do me a favour and rebuild this code below to make it
 > properly working.
 >
 > I would be very grateful if you could help me
 > Regards
 > and thanx for help
 > Marcin from Poland
 > --------------------------------------------------------------------------
--
 > -----------------------
 >
 > <HTML>
 > <HEAD>
 >
 > <% @language=vbscript %>
 > <%
 > function funkcja_czas()
 > dim roznica_koniec_dnia_pracy,roznica_koniec_tygodnia, roznica_czas_m,
 > roznica_czas_h, roznica_czas_s, znacznik_dnia1,znacznik_dnia2,
 > znacznik_dnia, czas
 >
 > roznica_koniec_tygodnia=(7-weekday(date,vbMonday))
 >
 > roznica_koniec_dnia_pracy=roznica_koniec_tygodnia-2
 > roznica_czas_h=(DateDiff("h",Time,CDate("16:00:00"))-1)
 >
 > if Hour(Time)<16 then
 > czas=Cdate(Cstr(Hour((Time+Cdate("01:00:00")))) & ":00:00")
 > roznica_czas_m=(DateDiff("n",time,czas))
 > czas=Cdate(Cstr(Hour(Time) & ":" & Minute(Time+Cdate("00:01:00")) &
":00"))
 > roznica_czas_s=(DateDiff("s",time,czas))
 > if roznica_czas_s=60 then
 > roznica_czas_s=0
 > end if
 > else
 > roznica_czas_m=0
 > end if
 >
 >
 > if roznica_koniec_dnia_pracy=1 then
 > znacznik_dnia1="dzieñ"
 > else
 > znacznik_dnia1="dni"
 > end if
 >
 > if roznica_koniec_tygodnia=2 then
 > znacznik_dnia2="dzieñ"
 > else
 > znacznik_dnia2="dni"
 > end if
 >
 > funkcja_czas= ("Koniec tygodnia nastapi za " & roznica_koniec_tygodnia & "
"
 > & znacznik_dnia2 & "<BR>" & "Koniec tygodnia pracy nastapi za " &
 > roznica_koniec_dnia_pracy &" "& znacznik_dnia1 & " " & roznica_czas_h &
":"
 > & roznica_czas_m & ":" & roznica_czas_s & " sec.")
 > end function
 > ff="1"
 > %>
 >
 >
 >
 > <SCRIPT LANGUAGE="JavaScript">
 > <!--
 >
 > function clock()
 > {
 >
 > document.clock.time.value=
 > <%
 > ff
 > %>;
 > window.setTimeout("clock()", 900);
 > }
 >
 > // -->
 > </SCRIPT>
 >
 > </HEAD>
 >
 > <BODY onload="clock();">
 >
 > <form name="clock">
 > Time <input type=text name="time" size="20" style="border: 0">
 > </form>
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: ASP and Javascirpt problem 
Back to top
Login to vote
marcinzmyslows

External


Since: Oct 13, 2004
Posts: 2



(Msg. 3) Posted: Thu Oct 14, 2004 1:58 am
Post subject: Re: ASP and Javascirpt problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

U¿ytkownik "Vilmar Brazão de Oliveira" <xx.RemoveThis@xx.com.br.xx> napisa³ w
wiadomo¶ci news:%23QjPciVsEHA.2196@TK2MSFTNGP14.phx.gbl...
 > hi, try this:
 > Dim objFSO,NomePasta
 >
 > set objfso = createobject("scripting.filesystemobject")
 > FolderName = "vilmar_" & day(date) & "-" & month(date) & "-" & year(date)
 > if not objfso.folderexists(FolderName) then
 > objfso.createfolder(FolderName)
 > inputbox "Criada a pasta: " & FolderName,vbinformation,"informações do
 > sistema"
 > else
 > inputbox "A pasta a seguir já foi criada: " &
 > FolderName,vbcritical,"informações do sistema"
 > end if
 >
 > bye,
 > Vilmar


-------------------
Could you translate the description into English, because I am not sure what
you mean.

By the way
Poland win a football watch against Wales 2:3. I am happy of it:)

Thanx
Marcin<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: ASP and Javascirpt problem 
Back to top
Login to vote
user2280

External


Since: Oct 13, 2004
Posts: 4



(Msg. 4) Posted: Thu Oct 14, 2004 3:01 pm
Post subject: Re: ASP and Javascirpt problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I so sorry! I made some mistakes because I forgot to translate the whole
script(VBScript) phrase to english. You can save the code bellow in a file
named as create_folder.vbs. See it:

Dim objFSO,FolderName

set objfso = createobject("scripting.filesystemobject")
FolderName = "backup_" & day(date) & "-" & month(date) & "-" & year(date)
'it creates a name thus: backup_12_11_2004

if not objfso.folderexists(FolderName) then
objfso.createfolder(FolderName)
inputbox "Created the folder: " & FolderName,vbinformation,"System
Information"
else
inputbox "A pasta a seguir já foi criada: " &
FolderName,vbcritical,"System Information"
end if


--
I hope it helps you!

---------------------------
Vilmar Brazão de Oliveira
HI-TEC Informática
Brazil

"Kamyk" <marcinzmyslowski RemoveThis @poczta.onet.pl> escreveu na mensagem
news:ckk55i$bem$1@news.onet.pl...
 >
 > U¿ytkownik "Vilmar Brazão de Oliveira" <xx RemoveThis @xx.com.br.xx> napisa³ w
 > wiadomo¶ci news:%23QjPciVsEHA.2196@TK2MSFTNGP14.phx.gbl...
  > > hi, try this:
  > > Dim objFSO,NomePasta
  > >
  > > set objfso = createobject("scripting.filesystemobject")
  > > FolderName = "vilmar_" & day(date) & "-" & month(date) & "-" &
year(date)
  > > if not objfso.folderexists(FolderName) then
  > > objfso.createfolder(FolderName)
  > > inputbox "Criada a pasta: " & FolderName,vbinformation,"informações
do
  > > sistema"
  > > else
  > > inputbox "A pasta a seguir já foi criada: " &
  > > FolderName,vbcritical,"informações do sistema"
  > > end if
  > >
  > > bye,
  > > Vilmar
 >
 >
 > -------------------
 > Could you translate the description into English, because I am not sure
what
 > you mean.
 >
 > By the way
 > Poland win a football watch against Wales 2:3. I am happy of it:)
 >
 > Thanx
 > Marcin
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: ASP and Javascirpt problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
IIS 5 Problem? - Dear : I have Windows 2000 professional SP4 installed the case when I review the Event Log i see this information hundrends of times: Event Type: Error Event Source: Service Control Manager Event Category: None Event ID: 7031 Date: 12/09/2004 Time: ..

Possible IIS problem? - I am running Merak Mail Server, which acts as a web server to provide me with webmail running on my old PC. It's setup to allow http access via port 80, and https via 443. My routers' firewall is configured to send the required ports to this PC on my..

problem - My win 2000 server is connected with MS SQL server 2000 There are around 10 applications on this server. Some webpage will be refereshed itself within 20 seconds to retrieve update data in sql server This server run 2 years till now. Recently we face....

MS DTC problem - Dear people, I'm having a problem with a W2k IIS 5.0 server with Index service running When I put a website in High Isolated Mode and I try to search something in the website I get an "HTTP 500" error. When I put the same website in LOW (II...

an ip problem - hi all, i used to use dynamic ips,i changed it into an static ip days ago in order to establish a web server with iis6,but after i finished ,my web site can not response,i send a http request to my site with ie6,but the statubar shows it is connecting to...
   Web Hosting and Web Master Forums (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]