Loading HTML with javascript from SDCard

Hi - my first post so please be kind
My handset is a BES connected 8100 running v4.2.1.66.
I've only recently discovered how to load files from the local media card using the file:///SDCard/example.html semantics, but I'm very frustrated I cannot seem to load scripts embedded in these files, that will load and run normally when the file is retrieved using http.
Is there some magic extension I need to give my files to enable processing of scripts from local files?  I've tried the obvious file extensions without luck (htm, html, wml, jsp, asp).
It seems to me that for local files the handset is setting the MIME type from the extension alone, given the error you get when you load a file with an unknown extension - "The returned page had no content type, and therefore cannot be processed."
Can anybody help me shed any light on this behavior and how to get around my lack of javascript on locally loaded files?
Feel free to slap me if this is a know bug in the software I'm running, or has been answered 50 times.
Many thanks; Andrew.

Under which folder we can put the html and javascript files. I have installed balackberry sdk4.6(i.e;
Research In Motion\BlackBerry JDE 4.6.1).
Objective:To open and see a local html file  in blackberry browser.

Similar Messages

  • Pages not loading completely with JavaScript enabled

    This just started in the last day or so. I have Safari extensions disabled.
    When I go to the ThinkProgress.org site/blog, I'm getting an incomplete page unless I disable JavaScript. With JavaScript, I'll get the first post on the blog, but nothing else. With JavaScript off I get the site looking pretty much normal.
    I get a similar problem if I go to Economist.com and click to read one of the stories. In that case, I get the story's headline, but it cuts off before the text of the article, right after a link to Tweet the story. Again, disabling JavaScript allows the page to load correctly.
    I suspect some third-party service is providing a script, which broke in the last day or so, but nobody's paying attention because of the Holidays.
    The problem doesn't appear to effect Chrome. Safari was upgraded to 5.0.3 in November, but this problem is more recent than that.
    Has anyone else seen this?

    Hi Jonathan,
    Go to the Economist.com site.
    From your Safari menu bar click Safari / Preferences then select the Advanced tab. Select the box next to: Show Develop menu in menu bar.
    Now click Develop / Disable Runaway JavaScript Timer.
    See if that makes a difference.
    Otherwise, check Safari / Preferences - Extensions or try disabling Safari plugins, Safari / Preferences - Security.
    And delete the cookies associated with those url's in Safari / Preferences - Security. Show Cookies
    Carolyn

  • Importing HTML with Javascript

    Hi folks,
    I have multiple (but simple) HTML forms that need to be imported as they are. Basically, I want to avoid the work of editing each button's Javascript manually in Acrobat, so I have the form ready in HTML with some JavaScript. Each form button has an onClick event calling the function below. The form works well in a browser, but, unfortunately, when I try to import it, the Javascript embedded in the page header disappears and the buttons do not work as programmed.
    Is there anyway to import the HTML *WITH* the Javascript?
    Here is the embedded Javascript code (pretty simple):
    <head>
    <script type="text/javascript">
    function DisplayCost(){
    var numPass = 0;
    var numTIDS = 0;
    var numExp = 0;
    var amtPass = 0;
    var amtTIDS = 0;
    var amtExp = 0;
    var amtTotal = 0;
    for(j=1; j <= 4; j++)
    tester = document.batch.elements["a" + j];
    exp_tester = document.batch.elements["b" + j];
    for( i = 0; i < tester.length; i++ ){
      if( tester[i].checked == true ){
    //   alert(tester[i].value)
       if(tester[i].value == "35") { numPass += 1; amtPass += parseInt(tester[i].value);
                if (exp_tester.checked == true) { numExp += 1; amtExp += parseInt(exp_tester.value);}}
       if(tester[i].value == "55") { numTIDS += 1; amtTIDS += parseInt(tester[i].value);
    if (exp_tester.checked == true) { numExp += 1; amtExp += parseInt(exp_tester.value);}}
       if(tester[i].value == "0") {exp_tester.checked=false}
    if(document.getElementByName('numPass') != null) { document.getElementByName('numPass').value = numPass;
           document.getElementByName('amtPass').value = amtPass; }
    if(document.getElementByName('numTIDS') != null) { document.getElementByName('numTIDS').value = numTIDS;
           document.getElementByName('amtTIDS').value = amtTIDS;}
    document.getElementByName('numExp').value = numExp;
    document.getElementByName('amtExp').value = amtExp;
    document.getElementByName('amtTotal').value = amtPass + amtTIDS + amtExp;
    </script>
    </head>
    Any help wuld be much appreciated.
    Regards,
    CodeChaser

    As it has already been said, there are fundamental differences between HTML "documents" and PDF documents. This also applies to JavaScript. Acrobat JavaScript and web browser JavaScript have things in common, and that is called the "Core" (get Flanagan's JavaScript, the Definitve Guide, published by O'Reilly, and you will see very clearly what objects etc. are relevant, and what not. Also, the document object model in PDF and in HTML are fundamentally different. And the field events are fundamentally different as well (as there is no onClick event in PDF, but mouseUp is used for clicking.
    What you can do, if you develop both, HTML forms and PDF forms, is to separate everything user interface-related from the raw (core) functions. The core functions can be used in either place, if their arguments are neutral, and you define them accordingly in your respective documents.
    You also can create your HTML form, and then get it into Acrobat, using WebCapture. The fields will be created, as well as labels etc. You will nevertheless rename your fields, in order to make them usable. Adding JavaScript to the appropriate events will be rather simple and straightforward.
    It would really be worthwile to have a closer look at the Acrobat JavaScript documentation (which is part of the Acrobat (X) SDK, downloadable from the Adobe website.
    For heavy duty application, you might look at a rather high-end forms design tool, OneForm Plus by Amgraf, which does create PDF forms and HTML forms from the same document, and is pretty good when it comes to the look of the forms. It also creates back-end code which is used to process submitted data. It is then also possible to have hybrid workflows when data gets displayed in PDF, and in HTML in the subsequent step and vice versa.
    Hope this can help.
    Max Wyss.

  • Call an applet in other page html with javascript

    Hi
    I found many exemples with javascript, to call applet method in the same html page, but never cross pages
    There is a way to call with javascript an applet in other window/page?
    Thanks

    By other WORKSPACE do you mean another location (as defined in dads.conf)?<br><br>Either way, you just have to make the url relative or just hard code the entire path. If location 1 is pls/htmldb and location 2 is pls/htmldb_two then all you need to do is:<br><br>
    owa_util.redirect_url( '/pls/htmldb_two/f?p=TLL:3:&SESSION.::::F119_TAB_CONDITION:1');<br>
    that is if I understood your question correctly...<br><br>
    chet<br>

  • Load Grid with data from System.Data.DataTable

    Hi all.
    A have a System.Data.DataTable e need load a grid with data from this DataTable.
    How Load a Grid with data from System.Data.DataTable?

    Hi Francisco,
    actually i don't think that you can use a .NET datatable to fill a business one grid.
    the business one has it's own datatable.
    in c# it would look like this:
    oForm.DataSources.DataTables.Add("MyDataTable");
    ((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).DataTable = oForm.DataSources.DataTables.Item("MyDataTable");
    oForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT Field FROM [dbname].dbo.TABLE");
    ((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).CollapseLevel = 1;
    ((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).AutoResizeColumns();
    ((SAPbouiCOM.Grid)(oForm.Items.Item("grid").Specific)).SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single;
    good night
    lg David

  • How to play with javascripts from command line?

    This is a problem that I always have no clue how to deal with.
    To begin with, take a look at this page: http://jsharer.com/file/1345737.htm
    If you click on "[TUTHE@ManYv][D`z][FLCL][05][H264_Vorbis][E4273181].mkv", after a little while a little window pops up and if you right click on the "点击此处开始下载", you can copy the direct download link.
    I previously used a simple bash script using curl to parse direct download links from this site. I like to do it at command line. It was easy because the link used to be directly shown in the page source code (though I had to call curl twice for it, it was fine.)
    But now I can't. It's all javascript. I ain't got no idea how to deal with this kind of stuff. I made my attempt to look at the page source, all I can tell is that the <div id="download_block"> part and the <div id="lord_content"> line seems to be important.
    I want to use my old good command line instead of click click click!
    Can somebody help me with this? Or please just give me some hints. It'd be fully appreciated. Thanks!

    If you know python, the package community/python-mechanize lets you automate a lot of this kind of thing. You can tell it to go to url so-and-so, simulate a click on the third link matching regexp such-and-such, preserving cookies the original page gave you, and so on.
    Has made most of my webpage scraping a hell of lot easier.
    EDIT: but I don't know whether it processes embedded Javascript, perhaps not.
    Last edited by Profjim (2009-09-03 11:22:37)

  • Trying to load disc with Photos from 35MM/Film

    Place disc from 35mm film into iphoto. When I place disc into computer , nothing indicates that I have done that? What am I missing?

    d Garmendia
    Welcome to the Apple users forum
    When I place disc into computer , nothing indicates that I have done that? What am I missing?
    what format is the disk and what format are the photos - where did the disk come from - this sounds like a computer problem not an iPhoto problem - could be either hardware or OS related unless you can provide more information - until you can see the disk on your computer and see that the uinformation on it is compatible with yoru computer none of the programs on the computer including iPhoto will be able to access the information on it
    LN

  • I would like to load a custom javascript from my machine to have a toolbar button in firefox that allows me to set class tags to target on a webpage.

    I want to be able to create a java script function that allows me to target certain class names on specific websites. I want to make a custom button to initialize the function in the Mozilla toolbar. Similar to Adblock but as a toggle button so I can turn it on when i feel like it.

    hello Kalevera, you could build a simple extension to achieve that, but this will obviously go beyond the scope of this support forum.
    for some resources to get started you could refer to
    https://developer.mozilla.org/en-US/Add-ons/SDK
    https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_button_toggle
    https://forums.mozilla.org/viewforum.php?f=7

  • Calling javascript from JavaFX

    This is well documented, yet I am having trouble communicating with JavaScript from JavaFX. The relevant snippet is:
    WebView wv = new WebView();
    WebEngine we = wv.getEngine();
    String content = FileUtils.readFileToString(new File("test.html"));
    we.loadContent(content);
    we.executeScript("changeBackground();");Which reads the following content:
    test.html:
    <html>
    <body>
    <script type="text/javascript">
    document.bgColor = "#cccccc";
    function changeBackground()
      document.bgColor = "#ff0000";
    </script>
    </body>
    </html>giving error:
    netscape.javascript.JSException: ReferenceError: Can't find variable: changeBackground
         at com.sun.webpane.platform.WebPage.twkExecuteScript(Native Method)
         at com.sun.webpane.platform.WebPage.executeScript(WebPage.java:1438)
         at javafx.scene.web.WebEngine.executeScript(WebEngine.java:811)
         at com.javainc.tmi.WebTest.init(WebTest.java:30)
         at com.javainc.tmi.WebTest.start(WebTest.java:44)
         at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
         at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
         at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
         at java.lang.Thread.run(Unknown Source)I've tried it without the semi colons at the end as well as every permutation I can think of.
    When I remove the executeScript code, the webview displays and turns the screen grey as it should.
    Is this a bug or am I missing something obvious?
    I am using 64 bit jdk1.7.0_09 on Windows 7.
    - Pat

    The document loads into the WebEngine asynchronously.
    You have to wait for it to finish loading before you try to run a script on it.
    For example, you can listen to the document property:
    we.documentProperty().addListener(new ChangeListener<Document>() {
      @Override public void changed(ObservableValue<? extends Document> observableValue, Document document, Document newDoc) {
        if (newDoc != null) {
          we.documentProperty().removeListener(this);
          we.executeScript("changeBackground();");
    });Or you could grab the WebEngine's LoadWorker and listen for it's state change.
    Some shorthand where you provide the load or loadContent method with a CallBack to be executed in the event of a successful page load might be convenient, so you could file a request in jira if you'd like that, but the listener methods work ok too.
    Full executable example (using your test.html):
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.Scene;
    import javafx.scene.web.WebEngine;
    import javafx.scene.web.WebView;
    import javafx.stage.Stage;
    import org.w3c.dom.Document;
    import java.io.*;
    public class ScriptExecutive extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(final Stage stage) {
        final WebView wv = new WebView();
        final WebEngine we = wv.getEngine();
        we.documentProperty().addListener(new ChangeListener<Document>() {
          @Override public void changed(ObservableValue<? extends Document> observableValue, Document document, Document newDoc) {
            if (newDoc != null) {
              we.documentProperty().removeListener(this);
              we.executeScript("changeBackground();");
        String content = FileUtils.readFileToString(new File("test.html"));
        we.loadContent(content);
        stage.setScene(new Scene(wv));
        stage.show();
      static class FileUtils {
        public static String readFileToString(File file) {
          try {
            StringBuilder builder = new StringBuilder();
            String line;
            BufferedReader reader = new BufferedReader(new FileReader(file));
            while ((line = reader.readLine()) != null) builder.append(line);
            return builder.toString();
          } catch (FileNotFoundException e) {
            System.out.println("Cannot find: " + file);
            return "";
          } catch (IOException e) {
            System.out.println("Oh snap, it broke: " + e);
            return "";
    }

  • Button with Javascript appearance changed.

    Hi,
    I created button with javascript from
    Re: Button and Function
    Everything works fine, But button looks different now
    No appearance of button is there & button label is displayed in orange color.
    Have i missed something or i will never like original.

    I have done some changes suggested by ATD for another thread.
    In your app, through Shared Components, Templates create a new button template based on a copy of an existing one (pick whichever existing template you prefer, the normal Button may be ok). When the new template is created, edit it. You should see something like the following in the "Template" setting:
    a href="#LINK#" class="t12Button" #BUTTON_ATTRIBUTES#>#LABEL#</a
    There may be other HTML around this, but this is the important part as it is the actual button itself. Change this to:
    a href="#" class="t12Button" #BUTTON_ATTRIBUTES#>#LABEL#</a
    Now, on your button on the page, change it to use your new button template. In the Button Attributes setting, add in:
    onclick="javascript:checkText();"
    everything works fine except appearance of button.
    Edited by: TEJU on Jun 4, 2009 10:21 AM
    Edited by: TEJU on Jun 4, 2009 10:22 AM
    Edited by: TEJU on Jun 4, 2009 10:24 AM

  • Search for an IFrame with Javascript

    Hi WebDyn Pro's!
    I have 2 IFrames. In IFrame1 is a Html-Page with some JavaScript. Now i want to  set the source for the IFrame2 with JavaScript from Html-Page in IFrame1. I do this with parent.frames[1].location.href=http://... it works fine.
    My Question is: How can i find the ID from IFrame2? Because i thing when i start the app in Portal, parent.frames[1] might be the wrong IFrame and parent.frames[1] is not really a good Solution.
    i try:
    parent.frames[1].id -> gives me: undefined
    parent.frames[1].name -> gives me: ""
    parent.frames[1].innerHeight -> gives me: undefined
    parent.frames[1].innerWidth -> gives me: undefined
    parent.frames[1].outerHeight -> gives me: undefined
    parent.frames[1].outerwidth -> gives me: undefined
    parent.frames[1].bgColor -> gives me: undefined
    Has Anyone an Idea?
    Thanks!
    Waldemar

    Hello Arun,
    i already tried to search by the Portal Content / Search tab, but it doesn't help, and just looks through name, description and ID of the objects.
    There might be another way (even if it's a coding one) to do this no ?
    Thanks again for your answer.
    Regards
    SMF

  • Change Tooltip with Javascript

    i want to change the tooltip-text with javascript.
    is there a way to do that?
    i have a lot of checkboxes and want to change the caption AND tooltip with javascript from an array. it works fine with the caption-text
    thanks
    herbert

    Hi,
    Try this.
    this.assist.toolTip.value = "Hi from Avoka";
    Regards
    Philip

  • "JavaScript Error encountered while loading HTML"

    Hi,
    I have been trying to embed a google map on a InDesign CC page, NO LUCK YET.
    I spoke several Adobe InDesign help line people, unfortunately they couldn't solve it.
    Here is the problem: I tried with different versions
    1- version) I copy of a map code and paste the code on a page, shows grey square round image and nothing (no map)
    2- version) From Object menu:
        "Select insert HTML.."
        "This is an HTML snippet."
    I paste the codes into HTML box, a second later, small box message,
         "JavaScript Error encountered while loading HTML"
    I have 64bit 12gb ram computer with windows 8.1
    InDesign CC version 9.2.1 x64
    Java 7 update 51
    I have tried with Internet explorer, google chrome and fire fox, and different maps, still no luck.
    Can anyone solve this problem?
    Thank you in advance,
    atamtan

    Yes, Google changed something and not for the better.
    Try a bing map instead. They work fine.

  • JSON from HTML embed Javascript to AS

    Hi,
    I know how to get JSON working if loading from external file
    by using LoadVars.
    But i don't know how to get JSON from the HTML embed
    Javascript and get to work in flash?
    I have tried different ways and search at google about
    related cases but nothing found yet.
    Can somebody help me?
    that's the code that i have used:

    Thanks for the suggestion.
    Well, as near as I can tell the "do javascript" will in no way, shape or form pass info back out to Applescript from Bridge, and I need to grab the long user name from system info there.
    To be honest, I was just trying to do a nice elegant dialog box with Bridge because Illustrator CS2 didn't know Script UI and I thought since everyone has CS3 Bridge on their machines already... But I've settled for 3 Applescript dialogs instead, so the fight is over.
    1.5 days tinkering with JS. 1.5 hours recoding in AS. Whee...

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

Maybe you are looking for

  • Cadastro de Empresa como Fornecedor e Centro

    Prezados, Estou com um problema com relação à criação de Fornecedor para Empresa e atrelamento de Centro: Cenário: Tenho 1 Empresa onde a mesma tem um Grupo de Contas para Fornecedor e outra pra Centro. Empresa: 1000 Grupo de Contas Transferência : T

  • Exporting from SharePoint 2010 to Import into SharePoint Foundation 2010

    I have a need to Export several site collections from SharePoint 2010 and to import them to an isolated SharePoint Foundation 2010 server.  Is it possible?  What problems might I incounter? Thanks for your assistance.

  • Archiving object CRM_SERORD

    Hi everyone- I need to clean up my transaction monitor screen (delete/archive old test messages). I am able to delete the basis part of the message fine by running the report Z_DELETE_BASIC_NOTIFICATIONS per note 566225, however I need some help in a

  • Org Unit Field in IT 0001

    Hi Folks- The Org Unit field in IT 0001in PA is not capturing the ORG unit stored in OM.Integration is active between OM and PA currently.The Job and position fields are carrying over without any issues. Used RHINTE30- and the org unit is allready th

  • Yoga 13 - external optical drive?

    Is there an external CD drive for the Yoga 13?  Moderator comment: Subject edited for clarity. Duplicate thread removed.