Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

Fix for issue #28 #29

Merged
merged 1 commit into from Mar 5, 2012
Merged

Fix for issue #28 #29

merged 1 commit into from Mar 5, 2012

Conversation

gtanner
Copy link
Contributor

@gtanner gtanner commented Feb 24, 2012

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.

@tneil
Copy link
Collaborator

tneil commented Feb 24, 2012

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?

@gtanner
Copy link
Contributor Author

gtanner commented Feb 24, 2012

I am currently at the pub away from my computer, could you do this?

I can't get to it until possibly tomorrow morning
Sent on the TELUS Mobility network with BlackBerry

@tneil
Copy link
Collaborator

tneil commented Feb 24, 2012

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?

@gtanner
Copy link
Contributor Author

gtanner commented Feb 24, 2012

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

@tneil
Copy link
Collaborator

tneil commented Feb 24, 2012

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 :)

@tubiz
Copy link

tubiz commented Feb 26, 2012

gtanner thanks for the pull request. Would be grateful if you can show examples on how to implement it

@raakhtar
Copy link

Went nuts with inline javascript today, Thank GOD i saw this issue already highlighted and a fix available. Am gona try now :)

@raakhtar
Copy link

The inline javascript is working fine except for onclick events for buttons where the functions defined inline never get executed.

@tubiz
Copy link

tubiz commented Mar 1, 2012

@raakhtar pls how do i insert inline javascript code.
Would be grateful if you can show an example.
This is my code but having issues with it
I have already included jquery in the index.html page

<!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>

@raakhtar
Copy link

raakhtar commented Mar 1, 2012

download the latest BBUi.js which was committed by gtanner. only then you can use the inline code. what you are using seems correct.

@tubiz
Copy link

tubiz commented Mar 1, 2012

I have already done that can u please show an example of how u are using it
in your app.

tneil pushed a commit that referenced this pull request Mar 5, 2012
@tneil tneil merged commit 8a94694 into blackberry:master Mar 5, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants