Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: forms

  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Bunbury W.A
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    forms

    any one see why this is not working
    Im trying to get the month name from the calendar function but cant seem to pull the data from the form value "Condate"

    <td width="23%"><input name="Condate" type="text" class="txtbox3" id="Condate" onClick='showCalendar(this, this, "dd/mm/yy","en",1)' value="<%=getdate3%>" size="15" readonly>
    <%
    x = request.form("Condate")
    monthnum = MonthName(Month(x))

    %>
    <input name="WMonth" type="hidden" value="<%=monthnum %>"> </td>
    <td width="19%"><div align="center">Name / Promotion</div></td>
    <td width="44%"><input name="name" type="text" id="name"></td>

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    x = request.form("Condate")
    monthnum = MonthName(Month(x))

    is only going to pull information when the page loads.......

    Is that is what is happening?
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    At first glance, I'd think it's your inconsistent use of quotes. Why not use them right?:

    onclick="doSomething('stuff here')"

    Not sure why you're using "this" twice as parameters either. Can you show the function you're calling?

    P.S. What alien said too...
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This looks like another possible case of expecting SERVER SIDE code to interact with the user and the CLIENT SIDE code.

    For the record, your ASP code will for all intents and purposes be completely executed before the end user at the client machine even sees the web page. You therefore cannot declare a form field and then further down the page expect to be able to use the value the user entered in that field to make a decision about what else to display.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    Bunbury W.A
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form

    the Condate input text field works ok and pops up a nice calendar that allows me to select dates, it returns date in this format 03/12/03 I need to grab that date and get the month as a digit and convert it to a name and pop it in a hidden field before I submit the form

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 250 Times in 246 Posts
    So Roy is right in his assumption.

    You must put the code (that sets the value of hidden) in the popup calendar when a date is selected.

  • #7
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Or you could just use a javascript function to do it so you do not have to worry about reposting data back to the server.
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


  •  

    Posting Permissions

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