Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to show "Month" and date in Title - HTA Script

Posted on 2015-01-30
4
Medium Priority
?
351 Views
Last Modified: 2015-02-02
Hi Guys,

Can anybody help me out to modify HTA script code so the current date (month with date) auto update in the title of popup window?

Here is the beginning of HTA script code....

<head>

<title>Subject: IS Alert: Scheduled Maintenance: Friday, January 2 at 6:00 PM to Saturday January 3 at 1:00AM

</title> <body background = "background.jpg">
<HTA:APPLICATION APPLICATIONNAME="NetworkGroup" SCROLL="NO" SINGLEINSTANCE="yes" WINDOWSTATE="normal" SYSMENU="no">
0
Comment
Question by:Szuromi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40580697
I don't think that you can do that.  I can only get VBscript to 'write' in the <body> and not in the <head> section.
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 40581090
I spoke too soon.  I had something out of order.  This demo shows how to do it.
<HTML>
<HEAD>
<HTA:APPLICATION ID="HelloExample" 
   BORDER="thick" 
   BORDERSTYLE="complex"/>
<SCRIPT LANGUAGE="VBScript">
DIM Mydate
Mydate = Date
DIM Mdays 
Mdays = Array("Surfin' Sunday","Moody Monday","Too Much Tuesday","Wild Wednesday","Thrilling Thursday","Finally Friday","Shopping Saturday")
DIM Mmonth
Mmonth = Array("Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec")
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Document.Write "<TITLE>HTA - Hello World " & Mdays(Weekday(Mydate)-1) & "</TITLE>"
</script>

</HEAD>
<BODY>
<H2>HTA - Hello World</H2>
<SCRIPT LANGUAGE="VBScript">
Document.Write Mdays(Weekday(Mydate)-1)
</script>

</BODY>
</HTML>

Open in new window

0
 

Author Closing Comment

by:Szuromi
ID: 40584514
Hi Dave,

It is excellent.

Thank you very much!

Emese
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 40584536
You're welcome, glad to help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question