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


MSA ALTAIR 4XR picture

MSA ALTAIR 4XR

$700.00



MSA altair 4X multi gas meter Monitor detector, O2,H2S,CO,LEL Charger calibrated picture

MSA altair 4X multi gas meter Monitor detector, O2,H2S,CO,LEL Charger calibrated

$340.00



MSA Altair 5 Gas Detector  picture

MSA Altair 5 Gas Detector

$98.99



MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty* picture

MSA Altair 5X Gas Detector Meter *Recently Calibrated and 30 Day Warranty*

$795.00



MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2) picture

MSA 10042621 Altair 5X Sampling Probe Straight Air-Line 1' Color Black (E2)

$295.00



New MSA Altair Pro O2 Gas Detector (Part Number 10074137c) - Open Box picture

New MSA Altair Pro O2 Gas Detector (Part Number 10074137c) - Open Box

$269.99







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