Welcome Guest, Not a member yet? Register   Sign In
dont out javascript code
#1

[eluser]ClaudioX[/eluser]
Hi all!

I'm start loading one simple page. By $.ajax i load from controller one view where i have some javascript code, the problem is: this code does not appear on the final page, apparently it is not returned.

I need some care with a view? a buffer, anything?

The code of this innerHtml is something like:

Code:
<table>
<tr>
  <td>Telephone</td>
  <td>&lt;?=form_input($Tel)?&gt;</td>
</tr>
<table>
[removed]
$("#Name").mask("(99)9999-9999");
[removed]

The table is returned ok, but the script not.

Thanks for the help!!
#2

[eluser]ClaudioX[/eluser]
Sorry about the script tag, i really forget..

Do testing here, the alert is called, but in Firefox i still dont see the code... becouse that, i dont know if the mask is there or not..

Does anyone have some idea?
#3

[eluser]slowgary[/eluser]
The view does not scrub your markup, but it's possible that the $ from your ajax call is being interpreted as a PHP variable. Can you post your PHP?
#4

[eluser]ClaudioX[/eluser]
Hi slowgary, and really thanks for the reply.

PHP from where are you asking?

I will put much of the route to genarate de mask, hope its help you to helpme.

function ajax call the html form
Code:
edited

tel.form
Code:
edite
Code:
edited

I try it in the initial page, and works ok, now i think the matter is the jquery plugin works on ready() stage.. and its dont work on $.load function...

Advance my sincere thanks

I dont know if i making it on the best the way, but what im doing is one way to generate form masks.




Theme © iAndrew 2016 - Forum software by © MyBB