how to embed html tags in form defintion

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

how to embed html tags in form defintion

javaudvikling
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: how to embed html tags in form defintion

Erik Bruchez
Administrator
Edit the source and make sure the HTML elements you add are:

- within the `fr:body` element
- have the `xh` prefix

E.g.:

    <fr:body>
        <xh:div>This is cool!</xh:div>

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: how to embed html tags in form defintion

javaudvikling
This post was updated on .
Hi Erik,

Thanks for you answers.

Can you help me with this problem.. I have to implement a JavaScript function that read the value of an hidden label.. if i write hidden = true it's not hidden when the definition i rendered to html.

e.g. if i have this definition:

    <fr:body>
       <xh:label id="test" value="Test" hidden="true"/>
        ..
then I want to do something like this:

<xh:head>
...
  <xh:script type="text/javascript"> var test = document.getElementById("test").value();  </xh:script>
...
</xh:head>

Does Orbeon have any methods to read a value of an element i JavaScript.. It has to be in JavaScript i have to read that value..


Thanks in advance

regards
Balatharan
Reply | Threaded
Open this post in threaded view
|

Re: how to embed html tags in form defintion

Alessandro  Vernet
Administrator
Hi Balatharan,

Why are you using xh:label in your example? (A label would need to be attached to an input, and labels are in general visible.) Where do the value of the "label" come from? Is it just a static value, that you paste in the form definition in Form Builder, and that never changes? I'm sorry if I ask more questions than provide answers here, but I need to know more about your case before we can help with this.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: how to embed html tags in form defintion

javaudvikling
Hi Alex,

Thanks for your answer.

I found out how I could solve the problem ..
I solved the problem by using Jquery and making following label definition: <xh:label class="mydid" style="display:none">sometext</xh:label>

The idea was to have a hidden label that could be read in JavaScript..


Regards
Balatharan
Reply | Threaded
Open this post in threaded view
|

Re: how to embed html tags in form defintion

Alessandro  Vernet
Administrator
Hi Balatharan,

I am glad you found a solution, and thanks for the update.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet