Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: Edit Web app

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Edit Web app

    Hi can someone please guide me through how I can edit a page in a web app..
    this is the web app I want to edit..
    www.ehour.nl


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Edit Web app

    Are you asking how to make changes to a page of html?

    How does this relate to java programming?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Edit Web app

    Quote Originally Posted by Norm View Post
    Are you asking how to make changes to a page of html?

    How does this relate to java programming?
    No that's not what i'm asking..I am a web developer but not a java developer..
    and
    www.ehour.nl
    is a java web app..I don't know how it works..
    and I don't have problem with the editing a webpage..but the problem is it is
    in java..

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Edit Web app

    If you don't understand java programming, what do you expect to happen?

    If you are having problems with java code, paste the code here and ask some questions about the problems you are having.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Nov 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Edit Web app

    I did some reading and I think I can't edit it..and need to recreate the app using the source but I don't want to do that..
    so , I figured I'll just use javascript and css to change what I need and not touch the .class
    ..my problem now is..is it possible to know if the member that logged in is a user or admin..through javascript?..

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Edit Web app

    Try asking those questions on a javascript forum.
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Nov 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Edit Web app

    Can java pass a value to javascript?

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Edit Web app

    It used to be able to. I'm not sure what the current version of java allows.

    I have an html page with an applet I use locally. This code is 8 years old.
    This code calls the applet from a javascript function:
       // Start the search	 
    //    alert("startSearch with " + str); 
        document.MyApplet.startSearch(str);
     
    ..... Later in same page:
     
    <APPLET  CODE=SearchApplet name="MyApplet" archive="SearchFiles.jar"
               id ="MyApplet" width="1" height="1" codebase="." MAYSCRIPT>
     <PARAM NAME=Source Value="E:/">
     <PARAM NAME=Depth  Value=8>
     <PARAM NAME=Mask   Value="*.html">
     <PARAM Name=Debug  Value="YesXXX">
    </APPLET>
    Then in the SearchApplet class:
      //------------------------------------------------------------------------------------
       // Called from JavaScript to start the search and build a new window with the results
       public void startSearch(String s) {

    To talk to the browser:
     netscape.javascript.JSObject   win = JSObject.getWindow(this);
     
    ...
     
       //---------------------------------------------------------------------
       // Write the results to a new Window
       private void writeToWindow(String txt) {
          // Problem if text contains HTML control chars???
    //      String outText = txt.replace('\n', ' ').replace('\r', ' ').replace('"', '\'');
          // Use a simple string - fails with \n!!!
    //      outText="Does this make it to the window?\\n On two lines!";    // simple string WORKS???
    //      System.out.println("outText=" + outText + "<");
     
          try {
             //  Create the window           
             win.eval("var newWin=window.open(\"\", \"\","
                + " 'width=700,height=400,top=0,left=0,"
                +"resizable=yes,location=yes,toolbar=yes,scrollbars=yes,status=yes,menubar=yes');");
     
             // Now put some text in the new window
             ByteArrayInputStream bais = new ByteArrayInputStream(txt.getBytes());
             BufferedReader br  = new BufferedReader(new InputStreamReader(bais));
             String line = "";
             while((line = br.readLine()) != null) {
                line = line.replace('"', '\'').replace('\\', '/');  // <<<<<<<<< NEEDS work HERE
                // Other changes ???
                win.eval("newWin.document.write(\"" + line + "\\n\");");
             }
             win.eval("newWin.document.close();");  // Where does this go???
          }catch(Exception ex) {
             ex.printStackTrace();
          }
       } // end writeToWindow()
     
    } // end class
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. How to edit Fonts of Java app... !!!!
    By b.shek49794 in forum Java ME (Mobile Edition)
    Replies: 4
    Last Post: September 5th, 2013, 01:54 AM
  2. Want to make a web app to upload,edit and download user's file
    By Dark_prince in forum Java Networking
    Replies: 0
    Last Post: August 10th, 2013, 01:36 AM
  3. Use Of Filter in Web App
    By noorul11 in forum Web Frameworks
    Replies: 2
    Last Post: January 12th, 2013, 01:44 AM
  4. Java web app, Saving to desktop?
    By Java Programmer in forum What's Wrong With My Code?
    Replies: 14
    Last Post: January 21st, 2012, 04:41 PM
  5. will pay 20$ for a web app
    By imohi999 in forum Paid Java Projects
    Replies: 3
    Last Post: December 7th, 2011, 11:28 AM