18 Posts
mikikado
9 years ago
2
Topic

Hi there!

I need help. I want to bring seblod to run the script I have in the Custom JS.... I am driving crazy... I do not nknow how to do.... here is a sample I tried: http://prntscr.com/6ifyv8

It is used here: http://www.maksy-clean.de/angebote

For your answer thank you in advance.

Greetings Michael

Get a VIP membership
9 years ago
1
Level 1

Hello mikikado,

welcome on SEBLOD forum.


Where you put your code, script will be embeded in :

jQuery(document).ready(function($) {  your code });<br>

so if you put a function here, it will not available for an external call.

Here you can add code on event, like 

$("#id").on("change", function(){ your code });<br>


Best regards.

Lionel

18 Posts
mikikado
9 years ago
0
Level 2

Sorry, but being "newbie" I haven't understood what you mean!

When I change option in field e.g. "myfield", I want to run code in a javascript file "/myfile.js" (myfile is on server). Actually I want to call with the code in myflie.js xml-file and search there by generated searchstring in myfile.js. After all the result shall be gave to a field on my form (e.g. named: "resultfield").

May I ask you to helpo me how the code should look like and where to put this code and what have I to do to run myfile.js when "myfield" is changed?

Hope you are able and you will help.

Thank you in advance and best regards.

Michael

Get a Book for SEBLOD