Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

[v 2014.1]Can't get input type text value from code

$
0
0

Hi everyone,

 

i've noticed that there are a lot of changes between 2014.0 and 2014,1 version.

 

In the older version i used to put an input type text and get its value this way:

 

//-------------------- put code -----------------------------------

var text_element= sym.$("t_element")

text_element.html("");

inputtext_element = $('<input />').attr({'type':'text', 'placeholder':'', 'id':'text_element', 'size':'30'});

inputtext_element.css ('background-color', '#ffffff');

inputtext_element.css ('font-size', '14px');

inputtext_element.css ('color', '#000000');

inputtext_element.css ('outline', 'none');

inputtext_element.css ('border', 'none');

inputtext_element.appendTo(text_element);

 

//------------------- get Code -------------------------------

 

var input_value = $("#text_element").val();

if(  input_value == "something" ) {

 

doSomething();

 

} else {

 

doSomethingElse();


}

 

//-------------------- end code ------------------------------

 

 

 

But now i can't use this system.

i've inserted the input type text this way:

 

sym.$("t_element").html("<input type='text' placeholder='write here!!' id='textElement' size='30' style='border:none ; background-color:#FFF ; font-size:11pt ; color:#000000;'/>");

 

but now i can't retrive its value.

 

 

thanks for the help!


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>