IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    HTML Date Field Verification
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
I would like to do a verification check on 2 date fields (calendar option). They default to blank, but I would like to have a small popup window that displays if either field is left empty.

The 2 fields are named begdt and enddt.

I am using the HTML layout painter.
Thank you for your help!
-Troy
 
Posts: 24 | Registered: October 09, 2006Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
write Onmouseover/Onclick Event to check for blank and show popup
function BEGDT_onclick(ctrl) {
if (document.getElementById("BEGDT").value==" "){
alert("Beining date is empty...");

//show Calender popup window for BEGDT
}
}

function ENDDT_onclick(ctrl) {
if (document.getElementById("ENDDT").value==" "){
alert("End date is empty...");

//show Calender popup window for ENDDT
}
}
where BEGDT, ENDDT is ID's of the objects in your HTML




Env Prod:WebFOCUS 717 ,Windows xp on 64, SQL Server 2005, IRF Tool
Env 1 Local: DevStudio 717 - MS Windows XP SP2 - Apache Tomcat 5.0.28
Output: HTML, Excel and PDF
 
Posts: 21 | Location: NJ,USA | Registered: May 26, 2004Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
I'm getting an object expected error with that code. Where should I verify that BEGDT / ENDDT is the ID's of the objects?


- Using 764 on WinXP (sp2) - IE7.
 
Posts: 24 | Registered: October 09, 2006Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Hi Tmproff,

i created temporery HTML and used Beging Date and Ending Date and added Onclick events on both the Fields..

see the code below

< !-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<TITLE>HtmlPage
</TITLE>
<BASE href=HTTP://endwwebd1:8080>
<script id=clientEventHandlersJS type=text/javascript>
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
}

function BEGDT_onclick(ctrl) {
	if (document.getElementById("BEGDT").value==""){
		alert("Beining date is empty...");

		//show Calender popup window for BEGDT
	}
}

function ENDDT_onclick(ctrl) {
	if (document.getElementById("ENDDT").value==""){
		alert("End date is empty...");

		//show Calender popup window for ENDDT
	}
}
</SCRIPT>

<script for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

This message has been edited. Last edited by: kerry,




Env Prod:WebFOCUS 717 ,Windows xp on 64, SQL Server 2005, IRF Tool
Env 1 Local: DevStudio 717 - MS Windows XP SP2 - Apache Tomcat 5.0.28
Output: HTML, Excel and PDF
 
Posts: 21 | Location: NJ,USA | Registered: May 26, 2004Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Sorry HTML Code is missing in above post..

This message has been edited. Last edited by: wf1998,




Env Prod:WebFOCUS 717 ,Windows xp on 64, SQL Server 2005, IRF Tool
Env 1 Local: DevStudio 717 - MS Windows XP SP2 - Apache Tomcat 5.0.28
Output: HTML, Excel and PDF
 
Posts: 21 | Location: NJ,USA | Registered: May 26, 2004Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
That worked great, Thanks!


- Using 764 on WinXP (sp2) - IE7.
 
Posts: 24 | Registered: October 09, 2006Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    HTML Date Field Verification

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.