Haxcv

a Javascript Framework for builds & WebDesign

jsH

now you are able to write html code with javascript directally without DOM such as loop statement etc...
jsH is new Javascript tecnolgy

Component and render

now you can create component
with jsH script and render it with compilation result

SPA

our framework built to support Single Page Application
with jsH script

Simple jsH script

write html with javascript code inside document without script tag
even script tag can be effected by jsH script

<div fn-init >
{%
   if(true)
   {
    {{ 
        <h1> Hello world </h1>
    }}
   }
   var names = ["manassa" , "joseph" , "Afrim" , "Jad" , "Shiraz" , "Hawa"];

   for(var i =0; i < names.length; i++)
   {
    {{
        <h1> my Name is : {{+names[i]+}} </h1>
    }}
   }
%}
</div>

		

result :

{% if(true) { {{

Hello world

}} } var names = ["manassa" , "joseph"]; for(var i =0; i < names.length; i++) { {{

my Name is : {{+names[i]+}}

}} } %}

Simple Component

simple example About how to create and render Component with fn-click event

<script type="text/jsH" myComponent >	 
    <p >5 x 5 = {@5*5@}</p>
    <p >my name is   {@ ( true ? "manassa" : "Joseph") @}</p>
    {%

	var val  = document.querySelector("input[type=checkbox]");
        var data = {name:"manassa" , father:"Joseph" , age:23};
        if(val.checked){
            for(var key in data){
		       {{
		           <p> {{+key+}} : {{+data[key]+}} </p>
		       }}
		    }
	    }else{
		      {{
		        <h3>sorry but you are not agree </h3>
		      }}
	    }
       
    %}
</script>
I agree <input type="checkbox" />
<div viewer ></div>
<button fn-click="viewer" fn-script="myComponent" > render </button>
			

Example :

I agree

Simple render

simple example About how to create and render Component with creatApp

<script type="text/jsH" myComponent >
    <p >name  : {@prop.name@}</p>    
    <p >age   : {@prop.age@}</p>           
</script>
<div id="viewer" ></div>
<script type="text/javascript" >
 Vum.createApp(
 {
    vectorName:"prop",
    name:"Manassa",    
    phone:"0024968752752",
    vector:function()
    {
        return "#viewer";
    }
    source:function()
    {
        return document.querySelector("*[myComponent]");
    }
 });
</script>				
				

result :

Router Example

you can render external content via ajax with jsH script for example we have simple example about Single Page Application with jsH script

<div  fn-data></div>
<a href="#home"  >home</a>
<a href="#about"  >About Us</a>
<a href="#contact" >Contact Us</a>
<-- Router -->
<script type="text/javascript" >
	var app =  Router.View("fn-data");
	app.createSPA({
	    v1:{
	        when:"page1",
	        title:"",
	        url:"page1.php"
	    },
	    v2:{
	        when:"about",
	        title:"",
	        url:"page2.php"
	    },
	    v3:{
	        when:"contact",
	        title:"",
	        url:"page3.php"
	    },
});
</script>