Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    Code:
    // Global variables:
    var theDay, theMonth, theYear,xxx;
    var today = new Date();
    //xxx=Request.Form("Date");
    works fine ... but is useless since the request is not being executed


    Code:
    // Global variables:
    var theDay, theMonth, theYear,xxx;
    var today = new Date();
    xxx=Request.Form("Date");
    is ALSO useless because the damn thing never gets executed. No error messages, nothing.

    Is there something weird about getting the passed values from an ASP page in Jscript?

    In reality, what I want is to use Request("Date") in Place of Date(). If Request("Date") is blank or a non-date then I want to use Date().
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    DOH... just realized it's JScript... here's the code now

    Code:
    var dateDay, dateMonth, dateYear, today;
    today = (Request.Form("Date") == "") ? new Date() : Request.Form("Date");
    Not a JScript master, but that should work if the syntax closely resembles Java.

    Now, there may also be an issue with your form.

    If it's set to method="post" then you should be using Request.Form("ItemName") to retrieve data.

    If it's set to method="get", or if you're passing data in the URL, then you should be using Request.QueryString("ItemName").

    If you're not sure which you're doing, or if you want to combine both collections, just use Request("ItemName").

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Why the heck are you using JScript, anyway? Such an abortion of a language!!!!

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    DerFarm is forced, presumably at gunpoint, to develop in MS languages (MS SQL, ASP.../me shudders)
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    LOL, I actually like MSSQL. It's a very powerful database, with tons of features. The only database I've used that's on par or better is Oracle.

    As far as ASP, I don't mind it so much either as long as it's using VBScript. VBScript is a derivation of VB, which isn't the greatest incarnation of programming syntax, but it works. At least VBScript stays true to form.

    JScript and J++, however, are Microsoft's attempts at a clone of Java and JavaScript. They are god-awful. It's like the twilight zone of programming, where you're not sure if you're a Sun developer or a MS drone.

    Thankfully, MS dropped the whole J++ and JScript and invented C#, which is an elegant combination of Java and C++.

  7. #6
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    yeah, but C++ is a gawdawful abortion on top of the original 3rd quarter fetal abandonment of C.

    I'm allowed to use scripts for the purpose of non-db lookup (essentially, fixed HTML pages) ONLY. In this case, JScript looks like the only way to get the selected value back to the ordering page.

    hmmmm...Do you perchance know of a way to do it in ASP?
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    True, C++ has its issues.... that's what I love about C# - it inherits the best of both Java and C++

    Here is the thing with ASP (VBScript):

    Code:
    Dim dateDay
    Dim dateMonth
    Dim dateYear
    Dim today
    
    If Len(Request.Form("Date")) = 0 Then
        today =  Date()
    Else
        today = Request.Form("Date")
    End If


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:15 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com