Focal Point
how to pass a variable in calender( in html) if the variable is in javascript

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4437065516

January 18, 2012, 05:22 AM
Prajakta
how to pass a variable in calender( in html) if the variable is in javascript
I have to create launch page wherein depending on the selection of radi buttons i have to change the calender begin date and end date. how to hold those variables in javascript and how do i pass them in the calender. Please help me with it. Smiler
Currently i m holding the start and end variables in as
var BEG_D = "!IBI.AMP.BEG_D1;"
var END_D = "!IBI.AMP.END_D1;"

is that a correct method to hold a variable in javascript?
if yes how do we pass it to the calender field?


Webfocus 8.1.0.5
Windows, all output
January 18, 2012, 08:19 AM
njsden
If you already have the values you need in JavaScript variables, you could assign them to any element in your HTML document using JavaScript as well:

document.getElementByID('calendar1').value = BEG_D;
document.getElementByID('calendar2').value = END_D;




Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
January 18, 2012, 03:46 PM
Waz
Do you store the dates for each radio button ?

You may have to do more js coding to set for each radio button.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 18, 2012, 11:23 PM
Prajakta
i have created a XML file for calender! the calender code first checks for the value of radio button and then goes to that part of calender accordingly! But i dont know how to include that XMl file in html! Can someone help me with it!


Webfocus 8.1.0.5
Windows, all output