Modify the contents in Dynamic HTML

Hi friends,
I want to modify the contents in a HTML page. This page is dynamically generated from some JSP. First of all, is it possible to modify the content in a HTML page that was generated at run time. If so, Pls. give me an example of the same.
Tons of thanks in advance....
SIVA

Here's an example:
You have a JSP page that has a form tag called myForm.
You have a textfield named 'textField1' in the form.
You have a button on the form with an onClick event, in the javascript
function that is called for the onClick, you can change
the contents of the textfield by writing something like this:
document.myForm.textField1.value="new contents";
For further information on this, I suggest reading up on Javascript. One book on this is 'Javascript, the definitive guide".

Similar Messages

  • Sharepoint error - Search Issue - The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1).

    i see this error everywhere - In ULS logs, on site. On the site > Site settings > search keywords; I see this - 
    The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>IIS 7.0 Detailed Error - 500.19 - Internal Server Error</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;background:#CBE1EF;} code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} .config_source code{font-size:.8em;color:#000000;} pre{margin:0;font-size:1.4em;word-wrap:break-word;} ul,ol{margin:10px 0 10px 40px;} ul.first,ol.first{margin-top:5px;} fieldset{padding:0 15px 10px 15px;} .summary-container fieldset{padding-bottom:5px;margin-top:4px;} legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} legend{color:#333333;padding:4px 15px 4px 10px;margin:4px 0 8px -12px;_margin-top:0px; border-top:1px solid #EDEDED;border-left:1px solid #EDEDED;border-right:1px solid #969696; border-bottom:1px solid #969696;background:#E7ECF0;font-weight:bold;'.
    I am facing issues in searching, my managed metadata service is not running, search results page throws internal error. Any Idea why this above error comes.
    P.S: We use windows authentication in our environment.

    Hi IMSunny,
    It seems you have solved this issue based on your another post.
    http://social.technet.microsoft.com/Forums/en-US/aa468ab0-1242-4ba8-97ea-1a3eb0c525c0/search-results-page-throws-internal-server-error?forum=sharepointgeneralprevious
    Thanks
    Daniel Yang
    TechNet Community Support

  • WCF returning "The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)"

    I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.
    Does anyone have any suggestions on how to solve this probelm?
    Here is the error:
    The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <title>500 - Internal server error.</title>
    <style type="text/css">

    I have the same issue on Windows 7 machine. The service works fine using a SoapUI client but a .Net client faisl to get a response.
    Hi,
    I have a WCF service which works perfectly when using SoapUI but throws error in my .Net client.
    {"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first
    1024 bytes of the response were: '<HTML><HEAD><link rel=\"alternate\" type=\"text/xml\" href=\"http://xyz.mysite.com/ysa/Broker.svc?disco\"/><STYLE type=\"text/css\">#content{ FONT-SIZE: 0.7em;
    PADDING-BOTTOM: 2em; MARGIN-LEFT: 30px}BODY{MARGIN-TOP: 0px; MARGIN-LEFT: 0px; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: white}P{MARGIN-TOP: 0px; MARGIN-BOTTOM: 12px; COLOR: #000000; FONT-FAMILY: Verdana}PRE{BORDER-RIGHT: #f0f0e0 1px solid; PADDING-RIGHT:
    5px; BORDER-TOP: #f0f0e0 1px solid; MARGIN-TOP: -5px; PADDING-LEFT: 5px; FONT-SIZE: 1.2em; PADDING-BOTTOM: 5px; BORDER-LEFT: #f0f0e0 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: #f0f0e0 1px solid; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e5e5cc}.heading1{MARGIN-TOP:
    0px; PADDING-LEFT: 15px; FONT-WEIGHT: normal; FONT-SIZE: 26px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 3px; MARGIN-LEFT: -30px; WIDTH: 100%; COLOR: #ffffff; PADDING-TOP: 10px; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #003366}.intro{MARGIN-LEFT: -15px}</STYLE><TITLE>Broker
    Service</TITLE></HEAD><BODY><DIV id=\"content\"><P class=\"head'."}
    I have the same service hosted on my local machine and when I point to the local service I can execute the operation with no issues. The message encoding is Soap11. I tried changing to Soap12 but I get exact same error. Any ideas greatly appreciated.
    I do have windows Activation Features installed and I am using .Net Framework 4.
    Thanks
    Sofia Khatoon

  • How to design and modify the content area in Dsktop Inerpage?

    hello:
         I have created my New Portal Desktop,but I don't know how to modify the content area in Dsktop Inerpage?
       Anyone can help me ?
       Thanks
        lexian

    Hi Le,
    What exactly do you want to modify. The Desktop inner page consists of your detailed navigation and the <b>Content Area</b> iview. The content area iview renders all the iviews, pages and whatever you add to your roles.
    So do you want to change the layout of this section or something else?

  • Weblogic-Modifying the content type

    Hi All,
    Is there a way to modify the content type in the Weblogic server.
    Basically what I want to do is, make IE6 to IE8 compatible for CSS3. I read somewhere that ".htaccess" file should be modified to make it work. I would like to add the below line...
    AddType text/x-component .htc
    So, where do I add this ?? Can some1 guide me as I dont know how to play around with WLS. I dont even know if there is such setting in WLS.
    WLS: 10g
    Thanks in advance..

    Tom and I exchanged several emails on this topic. It would appear that the problem (mail setting the content-type to ISO-2022-JP) is caused when certain characters in the quoted text of a reply are encoded; mail decides it needs to specify ISO-2022-JP. Characters identified as causing the problem are smart quotes and apostrophes. If you look at the apostrophe in the raw text it appears as =1B$B!G=1B(B and the smart quotes as =1B$B!H=1B(B and =1B$B!I=1B(B
    AK

  • How to modify the content of a xml element using java?

    Hi all,
    In my usecase I need to export some data from the database to the external file (Ms Word) using java.
    The data which I get from the database will be in the form of a xml file. In that xml file
    I got to modify the content of an attribute of a xml element in the java class. Kindly comeup with your help
    to achieve this.
    Thanks,
    Phanindra.
    Edited by: 887737 on Dec 5, 2011 5:52 AM

    Why don't you try Xerces2?Why don't you tell him to use the javax.xml APIs that are already built in? And that use Xerces2 under the hood? Instead of throwing out a suggestion that might lead to him adding another copy of Xerces into his application?
    @OP there are several techniques:
    - string replacement as suggested by jschell
    - XML parsing to a DOM and then use the DOM API
    - XSLT
    Which you should use depends on the complexity of your requirement.

  • Where can I modify the content of #BOX_BODY#

    Hi,
    when I run my page, the #BOX_BODY# code is translated if you view it by viewing the source of html page.
    It creates a table(<table width="100">...)
    I'd like to modify the cellpadding and cellspacing of that dynamique table.
    I've checked the templates to no luck
    Does one know where can this be modified ?
    Thanks,
    Regis

    Hello,
    I've put and example of what I consider the easiest solution right here.
    http://htmldb.oracle.com/pls/otn/f?p=11933:28
    Put all your regions in one column. Then using HTML regions with "No Template" build the table to hold those region. This will allow you complete control of the particular table cell the hold the region.
    This is the region setup running on that page. The region titles of the regions that hold the html mirror what should be in the region content section.
    Display Point: Page Template Body (1)
    <b>* HTML: &lt;table&gt;&lt;tr&gt;&lt;td valign="top"&gt; (0)</b>
    * HTML: Page Template BODY_BOX (70)
    <b>* HTML: &lt;/td&gt;&lt;td&gt; (72)</b>
    * HTML: Page Template BODY_BOX (Column 2) (130)
    <b>* HTML: &lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt; (131)</b>
    * HTML: Page Template BODY_BOX (Row2 (140)
    <b>* HTML: &lt;/td&gt;&lt;td valign="top"&gt; (141)</b>
    * HTML: Page Template BODY_BOX (Row2 (150)
    <b>* HTML: &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; (160)</b>
    Carl

  • Search for a tag in xml and modify the content

    Hi,
    I am quite new to using xml db and i want to know how to search a xml, modify a tag value inside xml and replace the content in xml.
    Please help me to find a solution for this.
    Regards,
    Sprightee

    Hi,
    First important thing : give your database version (SELECT * FROM v$version).
    Please also provide some sample data :
    - a typical XML document you're working with (or abridged version)
    - explain what change(s) you want to do, or give expected output
    - if you're using a table to store the XML (which is preferred), give the DDL

  • Can i get the content of a HTML tag?

    I would like knowing if it is possible,
    instead of getting all the document where the searched string is found,
    i can get only the content of a tag
    in other words, I have defined the following index:
    CTX_DDL.CREATE_SECTION_GROUP('htmlgroup', 'HTML_SECTION_GROUP');
    CTX_DDL.ADD_ZONE_SECTION('htmlgroup', 'titulo', 'TITLE');
    CREATE INDEX index_string ON table(field_to_indexing)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SECTION GROUP htmlgroup');
    SELECT field FROM table WHERE CONTAINS('searching string' WITHIN titulo) > 0;
    The index works just fine and makes the searching correctly, but it returns back the whole document,
    and I wanted it to return just the content of the TITLE tag. I would like to know if this is possible.

    It is possible if you are using the XMLType operators available in 9i. A short article describe this approach http://otn.oracle.com/products/oracle9i/daily/nov30.html
    Now, if you are not using 9i you can still do it but at the application level. You need to get a "chunk" of the document and then perform
    substring searching to extract the content of the title tag.
    I would like knowing if it is possible,
    instead of getting all the document where the searched string is found,
    i can get only the content of a tag
    in other words, I have defined the following index:
    CTX_DDL.CREATE_SECTION_GROUP('htmlgroup', 'HTML_SECTION_GROUP');
    CTX_DDL.ADD_ZONE_SECTION('htmlgroup', 'titulo', 'TITLE');
    CREATE INDEX index_string ON table(field_to_indexing)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SECTION GROUP htmlgroup');
    SELECT field FROM table WHERE CONTAINS('searching string' WITHIN titulo) > 0;
    The index works just fine and makes the searching correctly, but it returns back the whole document,
    and I wanted it to return just the content of the TITLE tag. I would like to know if this is possible.

  • Missing the content when saving HTML from JEditorPane.write(..)

    hi,
    i m trying to develop html editor using JEditorPane. the document type used is HTMLDocument and HTMLEditorKit. when I try to save using the following function:
    try{
    FileWriter     w = new FileWriter("doc.html");
    //HTMLEditorKit edi = (HTMLEditorKit)editorPane.getEditorKit();
    EditorKit edi = editorPane.getEditorKit();
    //StyledEditorKit edi = new StyledEditorKit();
    //edi.write(w, (StyledDocument)editorPane.getDocument(), 0, editorPane.getDocument().getLength());
    editorPane.write(w);
    w.close();
    }catch(Exception de){System.out.println(de);
    }all the contents are missing, only the tags are intact in the output file doc.html. I am using JDK 1.4.2
    anybody can help me? thank you very much

    here is the code. hehe sorry lol it took me sometime to take off all the function. please try to type something and then save. only the update is saved but the default heading (well in this case, i have replace them all with a "something must be here". thank you very much
    // HTMLEditor.java
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    public class HTMLEditor extends JFrame{
      private JTextComponent textComp;
      public static void main(String[] args) {
        HTMLEditor editor = new HTMLEditor();
        editor.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        editor.setVisible(true);
      public HTMLEditor() {
        super("Swing Editor");
        textComp = createTextComponent();
        Container content = getContentPane();
        content.add(textComp, BorderLayout.CENTER);
        content.add(createToolBar(), BorderLayout.NORTH);
        setSize(320, 240);
        Template t = new Template((HTMLDocument)(textComp.getDocument()));
        t.setupTemplate();
      // Override to create a JEditorPane with the HTMLEditorKit in place
      protected JTextComponent createTextComponent() {
        JEditorPane jep = new JEditorPane();
        jep.setEditorKit(new HTMLEditorKit2());
        JEditorPane.registerEditorKitForContentType
         ("text/html", "HTMLEditorKit2");
        return jep;
      protected JTextComponent getTextComponent() { return textComp; }
      // Add HTML actions to the toolbar
      protected JToolBar createToolBar() {
        JToolBar bar = new JToolBar();
        bar.addSeparator();
        bar.add(new StyledEditorKit.BoldAction());
        bar.add(new SaveAction());
        return bar;
      class SaveAction extends AbstractAction {
        public SaveAction() {
          super("Save", new ImageIcon("icons/save.gif"));
        // Query user for a filename and attempt to open and write the text
        // components content to the file
        public void actionPerformed(ActionEvent ev) {
          JFileChooser chooser = new JFileChooser();
          if (chooser.showSaveDialog(HTMLEditor.this) !=
              JFileChooser.APPROVE_OPTION)
            return;
          File file = chooser.getSelectedFile();
          if (file == null)
            return;
          FileWriter writer = null;
          try {
            writer = new FileWriter(file);
            textComp.write(writer);
          catch (IOException ex) {
            JOptionPane.showMessageDialog(HTMLEditor.this,
            "File Not Saved", "ERROR", JOptionPane.ERROR_MESSAGE);
          finally {
            if (writer != null) {
              try {
                writer.close();
              } catch (IOException x) {}
      class HTMLEditorKit2 extends HTMLEditorKit{
           public Document createDefaultDocument(){
             HTMLDocument doc = new HTMLDocument();;
             doc.setAsynchronousLoadPriority(-1); // load synchronously
             return doc;
    class Template{
         HTMLDocument doc;
         StyleContext styles = new StyleContext();
         public Template(HTMLDocument doc){
              this.doc= doc;
              Style def = styles.getStyle(StyleContext.DEFAULT_STYLE);
             Style heading = styles.addStyle("heading", def);
             StyleConstants.setFontFamily(heading, "SansSerif");
             StyleConstants.setBold(heading, true);
             StyleConstants.setAlignment(heading, StyleConstants.ALIGN_CENTER);
             StyleConstants.setSpaceAbove(heading, 10);
             StyleConstants.setSpaceBelow(heading, 10);
             StyleConstants.setFontSize(heading, 18);
         public void setupTemplate(){
              Style s = styles.getStyle("heading");
              try{
                   doc.insertString(doc.getLength(), "Something must be here", s);
                   doc.insertString(doc.getLength(), "\n", null);
                    doc.setLogicalStyle(doc.getLength() - 1, s);
              }catch(Exception e){}     
    }

  • Getting the content of an HTML page?

    Hi,
    I'd like to know how I can connect to an HTML page and then put the content of the page in a String object.
    Could someone help me?
    Thanks,
    Roming

    Something like:
                    HttpURLConnection conn = null;
              try {           
                   conn = (HttpURLConnection) new URL("http://forum.java.sun.com/thread.jsp?forum=54&thread=542277&tstart=0&trange=15").openConnection();
                   InputStream inputStream = conn.getInputStream();
                   BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));               
                   String line = null;                    
                   while ((line = br.readLine()) != null) {
                        System.out.println(line);               
              } catch (MalformedURLException murle) {
                      murle.printStackTrace();
              } catch (IOException ioe) {
                   ioe.printStackTrace();
              } finally {
                   if (conn != null) conn.disconnect();
              }          

  • How to modify the contents of a configuration file using j2me

    Hi,
    I'm developing a Application in j2me wherein i need to overwrite the existing contents of the configuration file(settings.cfg) with the value's that i have entered thru the front end. I was able to open and read the contents of the configuration file as follow's
    InputStream is = getClass().getResourceAsStream("/settings.cfg");
    Now, i need to remove the existing and updte it with the new content, how do i do it.. Kindly please help me out..
    Thanks

    Didn't you hear me the first time?
    http://forum.java.sun.com/thread.jspa?threadID=701360&messageID=4068435#4068435

  • How to modify the contents of a text file stored along with a midlet

    Hi,
    I have been developing a application in j2me wherein i need to first read the contents of the text file stored along with the midlet and later erase the existing content and update it with some text.
    I was able to read the file in the following manner
    InputStream is = getClass().getResourceAsStream("myfile.txt");
    Now i need to erase the contents and then update it the new content, how do i do it. Kinldy please help me out. It is very urgent.
    Thanks

    Didn't you hear me the first time?
    http://forum.java.sun.com/thread.jspa?threadID=701360&messageID=4068435#4068435

  • Modify the contents of xquery resource using customization file

    I have a xquery resource that stores constants that are environment specific.
    Is there a way to use the 'customization file' feature in OSB to replace the contents of the file instead of having separate xquery resources for each environment ?

    You cannot do this using the customization feature..

  • Modifying the Field labels dynamically at runtime.

    Hi,
    Is it possible to change the field labels dynamically at runtime . My
    requirement is when the user has to edit the quantity part ,he  presses  a fn key (F7 in my case ) that is displaying  a new field with the old label (quantity ) and old qnty label should be changed dynamically to '  previous quantity ' .
    Thanks For Your aniticpated responses.
    Message was edited by:
            Khaleel S.Mohammed

    Have you added teh Label as a text field?
    If you have done that, try replacing the label with a Input/Output type field in the display mode by selecting 'Output Only' in the attributes->Program Tab of Screen Painter.
    Now from the program , when the user presses F7, you can code to change the value of the Label (Input / Output field).
    This will work out. Please let me know if you have any issues.
    Regards,
    Anish Thomas

Maybe you are looking for

  • Imac to PC router Question

    Hello, I am going to need a router for the imac. The Imac will be connected to the router, and a PC with a linksys wirelessG adapter will be the secondary machine picking up the signal. Can anyone reccomend a router that works well for Mac to PC netw

  • Copying a whole timeline with effects onto another project

    I'm trying to copy a whole time line from one project to another. Basically adding on one project into the whole finished export file. I have no problem doing so, but all the transition effects are missing. How would I copy everything including the t

  • Build and deployment

    Hi, were currently building a large Flex (AIR) application using Flex Builder 3 and I need to setup a build process that outputs a single .air package via a BAT file. Can anyone give me pointers on the way to do this. They guys at work want to use AN

  • Why does search engine drop down menu only works once?

    I'm quite happy with the new Safari 4 (first time user) but I'm frustrated by only being able to select once with my mouse from the 'Recent Searches' drop down window. Let me explain. After I launch Safari 4, I'm able to use my mouse and select one o

  • Post switch over in oracle dataguard 11g

    Dear Guru, Switch over has been completed successfully from primary database to standby database. new primaray database is open and accessible but its showing his satus in v$database as below. database_role = primary switchover_status = not allowed d