Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run in ie occur exception : Juicer Compile Exception: Unexpected token #37

Closed
Shelley opened this issue Jun 8, 2013 · 7 comments
Closed

Comments

@Shelley
Copy link

Shelley commented Jun 8, 2013

Hello,everyone,

I just use juicer to use my custom function,and in ie it occur exception, and in chrome and firfox is well,

my custom function is in below:
function default_value(self_value, default_val){
if(!self_value || self_value == "undefined") {
return default_val;
}
return self_value;

}
juicer.register('default', default_value);

and the template write like:

<textarea rows="${alt.custom_attr.input_rows}" cols="${alt.custom_attr.input_cols|default,80}" ></textarea>

image

if I delete the "|default,80", it can run well in ie.

doesn't id support custom function?

does anybody know?
Thanks a lot.

@PaulGuo
Copy link
Owner

PaulGuo commented Jun 13, 2013

I tried your codes using juicer-0.6.5, but it's ok.
Maybe you can check the version of your juicer.

Please try again using juicer-0.6.5 and give me a feedback, thx.

@Shelley
Copy link
Author

Shelley commented Jun 13, 2013

Many thanks for your email.
I checked my version, it's 0.6.5

my custom function is as below:
function default_value(self_value, default_val){
if(!self_value || self_value == "undefined") {
return default_val;
}
return self_value;
}
juicer.register('default', default_value);

in firefox and chrome both well,but in ie is always occur exception.

2013/6/13 GuoKai notifications@github.com

I tried your codes using juicer-0.6.5, but it's ok.
Maybe you can check the version of your juicer.

Please try again using juicer-0.6.5 and give me a feedback, thx.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-19381321
.

@PaulGuo
Copy link
Owner

PaulGuo commented Jun 13, 2013

Thanks for your feedback, i'll check this bug later and then fix it. :)

@PaulGuo
Copy link
Owner

PaulGuo commented Jun 14, 2013

Please try another name like default_fn, the default in IE may have been reserved.

@PaulGuo PaulGuo closed this as completed Jun 14, 2013
@sumory
Copy link

sumory commented Jun 14, 2013

delete maybe also one keyword reserved on IE7/8, WTF!

@PaulGuo
Copy link
Owner

PaulGuo commented Jun 14, 2013

@sumory delete keyword has been reserved also in some version of safari(ios).

@Shelley
Copy link
Author

Shelley commented Jun 14, 2013

2013/6/14 GuoKai notifications@github.com

@sumory https://github.com/sumory delete keyword has been reserved also
in some version of safari(ios).


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-19449458
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants