Note that there are some explanatory texts on larger screens.

plurals
  1. POam i calling the function correctly?
    primarykey
    data
    text
    <p>In this code im comparing two dates , but when it does not work when i save it. I have declared function fnDate but i didn't declare function fnDateCheck because i didn't think i have to declare it, because of a previous code i saw online. below is when i call the function</p> <pre><code> htp.p('&lt;input class="" type="text" name="pvResvType" size="28" maxlength="150" value="'||pvPropertyId||'"&gt;'); htp.p('&lt;a href="javascript:getResvType();"&gt;&lt;b&gt;oo&lt;/b&gt;&lt;/a&gt;'); htp.p('&lt;/td&gt;'); htp.p('&lt;/tr&gt;'); htp.p('&lt;tr&gt;'); htp.p('&lt;td width=2&gt;&amp;nbsp;&lt;/td&gt;'); htp.p('&lt;td colspan=2 class="tablelabel"&gt;Not Offered From:&lt;/td&gt;'); htp.p('&lt;td colspan=2 class="tabletext1"&gt;'); htp.p('&lt;input class="" type="text" name="pvNotFrom" javascript:funcDate(1); size="15" maxlength="150" value="'||pvPropertyId||'"&gt;' || '&amp;nbsp;'||Util_Pkg.get_calendar_link('document.form1.pvNotFrom') ); </code></pre> <p>And here is the javascript part, this is a check to make sure the dates are not bigger or smaller.</p> <pre><code> ' function fnDate(vVal)'||CHR(10)|| '{'||CHR(10)|| 'var sysdate="'||TO_CHAR(SYSDATE)||'";'||CHR(10)|| 'if(form1.pvNotTo.value!="" &amp;&amp; vVal==1) '||CHR(10)|| 'if(!fnDateCheck(sysdate,form1.pvNotTo.value)) ' ||CHR(10)|| '{'||CHR(10)|| ' alert("Start Date must be equal to or greater than Todays date"); ' ||CHR(10)|| 'form1.pvNotTo.select();' ||CHR(10)|| ' return; }' ||CHR(10)|| 'if(form1.pvNotFrom.value!="" &amp;&amp; form1.pvNotTo.value!="")'||CHR(10)|| '{'||CHR(10)|| 'if(!fnDateCheck(form1.pvNotTo.value,form1.pvNotFrom.value)) ' ||CHR(10)|| ' { ' ||CHR(10)|| ' alert("End Date must be greater than Start Date"); ' ||CHR(10)|| ' form1.pvNotFrom.focus(); ' ||CHR(10)|| 'form1.pvNotFrom.value="";'||CHR(10)|| ' return;' ||CHR(10)|| ' }' ||CHR(10)|| ' }' ||CHR(10)|| 'return;'||CHR(10)|| ' }' ||CHR(10)|| </code></pre> <p>Does anybody see what could be going on wrong</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload