Hi,I am having an issue checking a condition in inner if .. Below is the code of wht I am trying to do ...after checking the Category section name and entering into the if statement, it is not checking the condition in the inner if statement ....-- if I comment out the section related to Regulated page checking statements and test it, the PT would generate page, but-- when I comment out the Regulated Page checking statements it throws out errors ...Could anyone please point where am I having an issue in below if loops..[HTML]<br> $category_section_name = "testcenter";<br><br> if ($category_section_name eq "testcenter" || $category_section_name eq ""prodcenter")<br> {<br> my $checking_page_type = iwpt_dcr_value('dcr.sample_datatype.document.metainformation.pageType');<br> #$checking_page_type = "Regulated";<br> <br> #--- REGULATED PAGE CONDITION CHECK ----<br> if ($checking_page_type eq "Regulated") <br> {<br> alert("TEST CENTER PAGE DISPLAYED IS REGULATED ONE");<br> }<br> else<br> {<br> alert("NON REGULATED PAGE");<br> } <br> #-- END OF REGULATED PAGE CONDITION CHECK<br><br> }<br><br>[/HTML]-----------Thanks all,Phanie
Well, "alert" is the method of DOM Window object. How do you expect Perl interpreter to evaluate that may be a topic for a lively conversation
Well alert *could* be a function that outputs the data. I love making my perl look like JS.
Here is a little quiz: How many syntactical and logical errors can you find in two lines of code? I see three...$category_section_name = "testcenter";if ($category_section_name eq "testcenter" || $category_section_name eq ""prodcenter"){
its done, thanks for all points in this post ... [html] <br>$category_section_name = "testcenter"; <br>if ($category_section_name eq "testcenter" || $category_section_name eq "prodcenter") <br>{ <br> <%@ include file="Header.jsp"%> <%@ include file="/inc/routineheader.jsp"%> <br> } <br> [/html]
Hi,I am having an issue checking a condition in inner if .. Below is the code of wht I am trying to do ...after checking the Category section name and entering into the if statement, it is not checking the condition in the inner if statement ....-- if I comment out the section related to Regulated page checking statements and test it, the PT would generate page, but-- when I comment out the Regulated Page checking statements it throws out errors ...Could anyone please point where am I having an issue in below if loops..
<iw_perl><![CDATA[$category_section_name = "testcenter"; if ($category_section_name eq "testcenter" || $category_section_name eq ""prodcenter") { my $checking_page_type = iwpt_dcr_value('dcr.sample_datatype.document.metainformation.pageType'); #$checking_page_type = "Regulated"; #--- REGULATED PAGE CONDITION CHECK ---- if ($checking_page_type eq "Regulated") {alert("TEST CENTER PAGE DISPLAYED IS REGULATED ONE"); } else {alert("NON REGULATED PAGE"); } #-- END OF REGULATED PAGE CONDITION CHECK }]]></iw_perl>