URGENT


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: URGENT

  1. #1
    Hash Guest

    URGENT


    Read the code:

    <form name="formCesta">
    <table>
    <tr>
    <td>
    <div id="mudaCampo">
    <input type="text" name="codItem" size="15">
    </div>
    </td>
    </tr>
    </table>
    </form>

    <script>
    eval("mudaCampo").innerHTML = "****, it don't whor in Netscape";
    </script>
    ----------
    This is the problem,
    it don't work in netscape,
    i've tryed to locate this object with:
    document.formCesta.mudaCampo ...
    document.divs["mudaCampo"]
    etc,

    help me ..
    as soon as possible

    thanks

  2. #2
    shobha Guest

    Re: URGENT


    hi,

    while accessing the div in netscape, use

    document.layers['mudaCampo'].property

    if u want to write into the div..then
    document.layers['mudaCampo'].document.write("Netscape")

    i hope this helps u
    shobha




    "Hash" <hash@mailbr.com.br> wrote:
    >
    >Read the code:
    >
    ><form name="formCesta">
    > <table>
    > <tr>
    > <td>
    > <div id="mudaCampo">
    > <input type="text" name="codItem" size="15">
    > </div>
    > </td>
    > </tr>
    > </table>
    ></form>
    >
    ><script>
    > eval("mudaCampo").innerHTML = "****, it don't whor in Netscape";
    ></script>
    >----------
    >This is the problem,
    >it don't work in netscape,
    >i've tryed to locate this object with:
    >document.formCesta.mudaCampo ...
    >document.divs["mudaCampo"]
    >etc,
    >
    >help me ..
    >as soon as possible
    >
    >thanks



  3. #3
    Hash Guest

    Re: URGENT


    hi shobha
    thanks for the help
    but it still doesn't work,
    The error say that the object doesn't exist.

    I think taht it's because the tag DIV it's not include in the array document.layers.

    I've already tried to use the tag LAYER, but it doesn't work in IE,
    an I tried to put the following:

    <layer name="shit1">
    <div id="shit2">
    <input>
    </div>
    </layer>

    <script>
    IE4 = document.all; // because it only work in IE
    if (IE4)
    fieldSht = eval("shit2");
    else
    fieldSht = document.layers['shit1'];
    </script>

    It worked, but it was a problem (that I I've just discovered)
    the tag input into the tag <layer> must have befor a new tag form,
    because a layer it's like a new document.
    And this would bring more difsiculties. Because in the onSubmit of the main
    form, I have to catch the value of the input.
    But that place (DIV =****) that has the input changes every time that a radio
    button is clicked.
    I will give you the address of the prototype (it's in Portuguese), but there
    when you click in the radio ("Pneu" or "Autopešas") change the page.
    I was trying to prevent it.

    http://www.mmcastillo.com.br/macrovi...a-consulta.htm


  4. #4
    shobha Guest

    Re: URGENT


    hi,

    ya i saw the link which u had sent..what i got from it is depending upon
    the choice selected from the 2 radio u want to show a form pertaining to
    it ..is that rite?
    ya Nescape doesnt recognise a <div> tag inside a form and if u have a div
    tag u shud have a separate <form> tag in it..so what u can do is write 2
    diff blocks of div and depending upon the radio button selected show the
    relevant div block ..and u can pass the values entered in the form inside
    the div as hidden variables to the main form and then submit it..

    hope this one works for u


    "Hash" <hash@mailbr.com.br> wrote:
    >
    >hi shobha
    >thanks for the help
    >but it still doesn't work,
    >The error say that the object doesn't exist.
    >
    >I think taht it's because the tag DIV it's not include in the array document.layers.
    >
    >I've already tried to use the tag LAYER, but it doesn't work in IE,
    >an I tried to put the following:
    >
    ><layer name="shit1">
    ><div id="shit2">
    ><input>
    ></div>
    ></layer>
    >
    ><script>
    >IE4 = document.all; // because it only work in IE
    > if (IE4)
    > fieldSht = eval("shit2");
    > else
    > fieldSht = document.layers['shit1'];
    ></script>
    >
    >It worked, but it was a problem (that I I've just discovered)
    >the tag input into the tag <layer> must have befor a new tag form,
    >because a layer it's like a new document.
    >And this would bring more difsiculties. Because in the onSubmit of the main
    >form, I have to catch the value of the input.
    >But that place (DIV =****) that has the input changes every time that a

    radio
    >button is clicked.
    >I will give you the address of the prototype (it's in Portuguese), but there
    >when you click in the radio ("Pneu" or "Autopešas") change the page.
    >I was trying to prevent it.
    >
    >http://www.mmcastillo.com.br/macrovi...a-consulta.htm
    >



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