BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-16-2008, 10:18 AM   #1
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default Error: Java Script is not enabled

Please Login to Remove!

Hi every body,

I am getting the following message when I click on the button of my application.

"The request action could not be performed. Java Script is not enabled on this handheld"

Thanks in advance
Offline  
Old 05-18-2008, 07:57 AM   #2
rab1
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 25
Default

It looks that you accessing a page that have javascript. You need to enable javascript on the device or in you application.
If you are using a browser field to display your page, enable javascript in your code as follows:

_renderingSession.getRenderingOptions().setPropert y(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.JAVASCRIPT_ENABLED, true);

The other way, should be from the browser settings on the BB device.

Rab
Offline  
Old 05-19-2008, 03:18 AM   #3
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default

Quote:
Originally Posted by rab1 View Post
It looks that you accessing a page that have javascript. You need to enable javascript on the device or in you application.
If you are using a browser field to display your page, enable javascript in your code as follows:

_renderingSession.getRenderingOptions().setPropert y(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.JAVASCRIPT_ENABLED, true);

The other way, should be from the browser settings on the BB device.

Rab
Thanks Rab for your reply, I have changed my code as you suggested. But I get the same error. Can you look my code?

Code:
class ShowFeed {
    
    String s1="<br><br><h3>Current Feeds:</h3><br><br>";
    String s2="<a href=http://www.andreasstorm.de/index.php?id=314&type=100>Andreas Storm</a>";
 
    String s3="<INPUT TYPE=BUTTON"+" "+"OnClick"+"="+"return confirm("+"'"+"Are you sure"+"'"+")"+" "+"VALUE=Add_New_Feed>";
    
    String s=s1+s2+s3;   

    FeedLauncher feedLauncher=new FeedLauncher();
    
    public static void main(String args[])
    {
        new ShowFeed();
    }   
    
    ShowFeed() {
        feedLauncher.webLauncher(s);           
    }
}
Code:
class FeedLauncher
 {   
    RenderingSession _renderingSession;
    

    public void webLauncher(String xmlstr)     
    { 
        String htmlString=xmlstr;
        byte[] temp = new byte[ 1024 ];        
        temp=htmlString.getBytes();         
               
        try{        
            ByteArrayOutputStream output = new ByteArrayOutputStream();
            Base64OutputStream boutput = new Base64OutputStream( output );
            output.write( "data:text/html;base64,".getBytes() );
            boutput.write(temp); 
            boutput.flush();
            boutput.close();
            output.flush();
            output.close(); 
            
            _renderingSession = RenderingSession.getNewInstance();
        
            BrowserSession browserSession = Browser.getDefaultSession();
            _renderingSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, RenderingOptions.JAVASCRIPT_ENABLED, true);   
            
            browserSession.displayPage(output.toString());        
        
            System.exit(0);
         }catch (IOException e)
        {
        }        
    }
}
Offline  
Old 05-19-2008, 09:41 AM   #4
rab1
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 25
Default

Your code looks fine. But I think that the displayPage() uses an instance of the BB web browser. The solution I mentioned applies to when you are using a browser field. That could be the reason.
In this case you need to try the second alternative I mentioned.
Click on the Browser icon in the home screen, to open the Blackberry browser, click on menu, select "Oprions" then "Browser Configuration" , then check the option "Support Javascript". then "save options" from the pop-up menu. This will hopefully enable it.

Rab
Offline  
Old 05-19-2008, 10:32 AM   #5
ahmadgee
Thumbs Must Hurt
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: do not know
Posts: 51
Default

Thanks Rab
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


KEYENCE LR-TB5000CL Laser Sensor with Built-in Amplifier picture

KEYENCE LR-TB5000CL Laser Sensor with Built-in Amplifier

$289.99



Biamp Tesira AMP-450BP AVB/TSN Enabled 4 Channel Amplifier w/ PoE+ (G155) picture

Biamp Tesira AMP-450BP AVB/TSN Enabled 4 Channel Amplifier w/ PoE+ (G155)

$250.00



OPTIMIZED CONTROL LTD AMPLIFIER EAP001-504 EUROAMP/10 REV B picture

OPTIMIZED CONTROL LTD AMPLIFIER EAP001-504 EUROAMP/10 REV B

$229.99



Portable Voice Amplifier, Towevine Rechargeable Microphone Speaker picture

Portable Voice Amplifier, Towevine Rechargeable Microphone Speaker

$14.99



FANUC A06B-6093-H151 K.  Servo Amplifier Unit 50/60Hz.    5.1A 1PH.  3.2A 3PH  picture

FANUC A06B-6093-H151 K. Servo Amplifier Unit 50/60Hz. 5.1A 1PH. 3.2A 3PH

$375.00



Honeywell Ultraviolet Flame Amplifier RM7890 A 1015 picture

Honeywell Ultraviolet Flame Amplifier RM7890 A 1015

$199.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.