hello,
I am beginner with SC and i have a problem with defining javascript code in onclick ajax event in grid application. I have an html image field and i want tu define an ajax ONCLICK event to this field using javascript. Can you some one help me please???
hi,
could you show your code pls? and what should happend in the onclick event?
thank you for your reply,
my javascript code is:
echo ’
,
document.getElementById("lin3_col1").innerHTML = "my title";
';
what should happen in these event? I’ll try to recognize
in this event we have to make php code or javascript code???
i noticed that the javascript alert(“msg”); doesn’t work in this event
you have to use php code and if you want to use javascript, you need to do ?>
<?php and then `-script> -/script>`i am testing this code
?>
<-script type=“text/javascript”>,
alert("ttt");
<-/script>
<?php here is what i obtain:  i think that javascript code is not performedFor some months, I had the same problem, I try to find my solution… I do not recognize the application
it can be a problem with the navigator???
pls try sc_ajax_message($javascript_message, $javascript_title);
I made a workaround… I created a javascript method:
confirm(“Der Abschlag wurde bereits ausgezahlt, keine Änderung mehr möglich!”);
self.parent.tb_remove();
parent.window.reload();
windows.parent.document.forms[0].submit();
In my ajax event, I called these method with macro: sc_ajax_javascript(‘name_of_method’);
edit
nice, scriptcase updated it, before update, you have to use a javascript method in the point programming… there you can write javascript, and in the ajax event you can use sc_ajax_javascript() to call you java code…
happy to helped you!
edit2
I am not able to answer again, maximum amount of replys… pls click like, if you are happy with my help
edit3
you know what I mean?
edit4
Ok, so, I think that is your solution:
create a global variable, like [dynamical header]
this global variable you insert in the title of your header
after that, you create onclick event for the field you want… code there:
[dynamical_header] = ‘ok!!’;
?>
-<meta http-equiv=“refresh” content=“0”;-> => without “-”
where have you defined your method ? in onapplicationinit event???
i think that sc_ajax_javascript doesn’t work in ajax event of grid application
you are in form application,
my problem is in grid application
yes i understood what you mean, but my problem is with grid application
thank you very much,
i will give you a reply after testing this
bilouchka - did you ever make this work? Trying to do the same thing, update a header filed on a menu