cancel
Showing results for 
Search instead for 
Did you mean: 

Read page attribute inside javascript

prabhu_s2
Active Contributor
0 Kudos

Hi

Is there a way to read the page attribute value inside a javascript? i want to make a decision in java script based on a page attribute value set. how it can be done?

please any pointers on it is much appreciated

Code in java script - "onload" is page attribute

function getURLParam()

        {

         if <%= onload %> != 'X';

         { do someting}

       }

inside the OnInputProcessing event the page attribute is set as:

onload = 'X'.

Accepted Solutions (1)

Accepted Solutions (1)

lisa_miller3
Participant
0 Kudos

You could try placing it as a hidden field with id='onload' in your .htm, then you should be able to reference it in your javascript as :

     var onload = document.getElementById('onload').value;

Answers (0)