Conversation
Cool.. could you possibly also update the README.md in the section for "Loading Screen Specific JavaScript" to now include the ability to use inline JS with a quick example? |
I am currently at the pub away from my computer, could you do this? I can't get to it until possibly tomorrow morning |
Looking at the code it looks like it also deletes the script tag by its id.. is this the case? So in the example we should also make sure there is a unique id value in the <script> tag correct? |
Not sure ;P It did that in the original code as well, wasn't sure the exact use case you were going for there ;) Sent on the TELUS Mobility network with BlackBerry |
It was the only way I could figure out with my limited Padawan JavaScript knowledge of being able to pull it back out again from the document without keeping a handle to it somewhere :) |
gtanner thanks for the pull request. Would be grateful if you can show examples on how to implement it |
Went nuts with inline javascript today, Thank GOD i saw this issue already highlighted and a fix available. Am gona try now :) |
The inline javascript is working fine except for onclick events for buttons where the functions defined inline never get executed. |
@raakhtar pls how do i insert inline javascript code. <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<div data-bb-type="screen" data-bb-effect="fade">
<script type="text/javascript">
$("document").ready(function() {
$("#content").load("http://localhost/finalbbapp/logic/logic.php");
});
</script>
<div data-bb-type="title" data-bb-caption="lindaikeji.blogspot.com"></div>
<div>
<h4>Testing Feeds APID</h4>
<div id="content"></div>
</div>
</div>
</div> |
download the latest BBUi.js which was committed by gtanner. only then you can use the inline code. what you are using seems correct. |
I have already done that can u please show an example of how u are using it |
This fix will fix the issue for including javascript in subpages and the code not executing (see #28).
I have tested this on both the OS5 and OS7 simulators as well as in Ripple.
Will support both tags with external src and embedded script tags.