Sorry, Steve, this doesn't work...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Sorry, Steve, this doesn't work...

  1. #1
    Larry Guest

    Sorry, Steve, this doesn't work...


    Steve, I tried what you posted, it was still the same thing... nothing good
    happened...
    "Steve Cochran" <scochran@chattanooga.net> wrote:
    >If an element is inside a form, you have to reference as a form element:
    >
    >jobpostform.elements("JD").value
    >
    >Try that and see if it works.
    >
    >steve
    >
    >"Larry" <larry@levelogic.com> wrote in message
    >news:3974dd13$1@news.devx.com...
    >>
    >> <script language="VBScript">
    >> Function ReplaceCR(patrn, replStr)
    >> Dim str, jobPostForm
    >> Set jobPostForm = document.forms("JobForm")
    >> str = jobPostForm.JD.value
    >> MsgBox(str)
    >> ReplaceCR = Replace(str, patrn, replStr)
    >> End Function
    >>
    >> MsgBox(ReplaceCR(chr(32), "<br><br>"))
    >> </script>
    >>
    >> I don't understand why this code doesn't work...
    >> *JD is a textareaI have in the form...
    >> I am trying to get the value of JD field, and replace all the space with
    >> <BR><BR>... for some reason this is not working...
    >> Thanks!

    >



  2. #2
    Steve Cochran Guest

    Re: Sorry, Steve, this doesn't work...

    Sorry. Value is the wrong thing.

    What you want is

    jobpostform.elements("JD").innertext

    steve

    "Larry" <larry@levelogic.com> wrote in message
    news:3975d305$1@news.devx.com...
    >
    > Steve, I tried what you posted, it was still the same thing... nothing

    good
    > happened...
    > "Steve Cochran" <scochran@chattanooga.net> wrote:
    > >If an element is inside a form, you have to reference as a form element:
    > >
    > >jobpostform.elements("JD").value
    > >
    > >Try that and see if it works.
    > >
    > >steve
    > >
    > >"Larry" <larry@levelogic.com> wrote in message
    > >news:3974dd13$1@news.devx.com...
    > >>
    > >> <script language="VBScript">
    > >> Function ReplaceCR(patrn, replStr)
    > >> Dim str, jobPostForm
    > >> Set jobPostForm = document.forms("JobForm")
    > >> str = jobPostForm.JD.value
    > >> MsgBox(str)
    > >> ReplaceCR = Replace(str, patrn, replStr)
    > >> End Function
    > >>
    > >> MsgBox(ReplaceCR(chr(32), "<br><br>"))
    > >> </script>
    > >>
    > >> I don't understand why this code doesn't work...
    > >> *JD is a textareaI have in the form...
    > >> I am trying to get the value of JD field, and replace all the space

    with
    > >> <BR><BR>... for some reason this is not working...
    > >> Thanks!

    > >

    >



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