Results 1 to 3 of 3

Thread: Help with <input ...>

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Posts
    69

    Help with <input ...>

    Hi,

    I am new to javascript and I'm having difficulties to make a formulary. Here is my problem.

    <input type="hidden" name="abc" value="abc"> // This is ok

    but with a variable

    variable="abc"; // This variable is declared in an another frame
    <input type="hidden" name="abc" value='parent.variable'> // Give me an error here

    What I want is to populate a form by code and putting the value of somes variables into hidden textbox.

    Is it clear ?

    Sorry if I make some mistakes or have difficulty to write, english is not my maternal language.

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    <script type="text/javascript"><!--
    document.writeln('<input type="hidden" name="abc" value="' + parent.variable + '">');
    //--></script>

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2002
    Posts
    69
    thanks works great !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width