Grabbing Paramaters from a web page.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Grabbing Paramaters from a web page.

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    6

    Grabbing Paramaters from a web page. - [SOLVED]

    I am trying to grab text from the paramaters values in an html file. Well, before I get to that point, I am getting an error in my applet during compile time. The error message reads:
    cannot find symbol - method getParamater(java.lang.String)
    at the line:
    pString = getParamater("nameofparam");
    is highlighted. This is in BlueJ.
    PHP Code:
    import java.applet.*; 
    import java.awt.*; 
    import javax.swing.*; 

    class 
    MessagePanel2 extends JPanel 

        public 
    void paintComponent(Graphics grafObj) { 
            
    super.paintComponent(grafObj); 
            
    grafObj.drawString(Wel3.myText5050); 
        } 


    public class 
    Wel3 extends JApplet 

        
    // instance variables - replace the example below with your own 
        
    static String myText
         
         
    /** 
         * Called by the browser or applet viewer to inform this JApplet that it 
         * has been loaded into the system. It is always called before the first 
         * time that the start method is called. 
         */ 
        
    public void init() 
        { 
             
            
    // provide any initialisation necessary for your JApplet 
            
    Container messageArea getContentPane(); 
            
    String pString
            
    pString getParamater("nameofparam"); 
             
            if (
    pString == null
                
    myText "html page parameter missing"
            else 
    myText pString
             
            
    MessagePanel2 myMessagePanel = new MessagePanel2(); 
            
    messageArea.add(myMessagePanel); 
        } 
         
    public 
    void start() 
        { 
            
    // provide any code requred to run each time 
            // web page is visited 
        


        
    /** 
         * Called by the browser or applet viewer to inform this JApplet that 
         * it should stop its execution. It is called when the Web page that 
         * contains this JApplet has been replaced by another page, and also 
         * just before the JApplet is to be destroyed. 
         */ 
        
    public void stop() 
        { 
            
    // provide any code that needs to be run when page 
            // is replaced by another page or before JApplet is destroyed 
        


         
        public 
    void destroy() 
        { 
            
    // provide code to be run when JApplet is about to be destroyed. 
        



    Last edited by gjon; 10-30-2005 at 11:34 AM.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    getParamater ? hmm...

    it's getParameter

    PS: I need new glasses too
    eschew obfuscation

  3. #3
    Join Date
    Oct 2005
    Posts
    6
    doh, thnx!

Similar Threads

  1. Send web page by email
    By Travis in forum ASP.NET
    Replies: 0
    Last Post: 06-04-2002, 09:51 AM
  2. Replies: 4
    Last Post: 08-10-2001, 05:35 PM
  3. Reading Data from a Web page
    By Jawahar Rajan in forum Web
    Replies: 1
    Last Post: 06-20-2001, 11:04 AM
  4. ->Re: Cost of Web Page Design
    By Jon Crosse in forum Architecture and Design
    Replies: 0
    Last Post: 11-27-2000, 02:56 PM
  5. Visual Studio.NET Resources
    By Robert Scoble in forum ASP.NET
    Replies: 0
    Last Post: 07-20-2000, 05:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center