Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Active Scripting !!

    If the user forgets to type a text in a text box and press NEXT, he will get a
    message and goes back to the first page.

    <CFIF #Form.Lname# EQ "">
    <script>
    alert("Type your name please.");
    self.location="javascript:history.back();"
    </script>
    <CFABORT>
    </CFIF>

    If the option Active Scripting in IE is disabled (by the user), this
    function does not work. How can I prevent the IE to bypass this option??


    Red


    Red-Hand Guest

  2. Similar Questions and Discussions

    1. Active X Control "click to active"
      I created a menu with buttons created with flash for a webpage. When the page loads and I scroll over my buttons that are supposed to change on the...
    2. php scripting
      Hi i am interesting in making a shopping cart that doesnt actually collect payment of any kind. It would instead only take the order and give the...
    3. NEED HELP with scripting...
      I have two draggable movies on a single line: marked with yellow and blue. They can be freely moved back and forth but should not overlap, but rather...
    4. ASP ERROR: error '8002801d' -> Library not registered. : my Active Server Pages are not so active.
      I've got two IIS servers. One public and one staging. On the public server the ASP code works fine however on the staging server I've started...
    5. LRP scripting
      El Mon, Jul 14, 2003 at 11:13:38PM +0100, Shango Oluwa escribió: Maybe because LRP is not Debian related .. ;) That's because you create a...
  3. #2

    Default Re: Active Scripting !!

    use serverside validation instead. That way the user will send the
    information to the server, the server checks if the information is valid, if
    it is not instead of bringing an alert window to the user (which can be
    anoying) have the page to render a "friendly" error on the page or an arrow
    that points what the user is missing.


    --
    ....helmut
    helmutgranda.com



    "Red-Hand" <webforumsuser@macromedia.com> wrote in message
    news:d6sk6o$nft$1@forums.macromedia.com...
    > If the user forgets to type a text in a text box and press NEXT, he will
    > get a
    > message and goes back to the first page.
    >
    > <CFIF #Form.Lname# EQ "">
    > <script>
    > alert("Type your name please.");
    > self.location="javascript:history.back();"
    > </script>
    > <CFABORT>
    > </CFIF>
    >
    > If the option Active Scripting in IE is disabled (by the user), this
    > function does not work. How can I prevent the IE to bypass this option??
    >
    >
    > Red
    >
    >

    ...helmut Guest

  4. #3

    Default Re: Active Scripting !!

    Hi Helmut,

    Tank you for posting. Actually my second question was ? what is the different
    between Server side scripting and client side scripting?? When should Iuse
    server and when Client side scripting?? I am just a beginner therefore such a
    Stupid question!!!

    Red

    Red-Hand Guest

  5. #4

    Default Re: Active Scripting !!

    Client Side scripting is code that is passed in the page to the clients
    browser and the browser processes the script. The most common example of
    this is javascript.

    Server Side script is processed on the server and generally returns plain
    html to the browser.

    The choice of either depends upon what you are trying to achieve. Client
    side has the advantage that is doesn't require a trip to the server, so it
    is good for such things as simple calculations, and simple validation.

    The disadvantage is that it can be turned off by the client, which is why
    most experts recommend that for such things as validation that both client
    and server tests are deployed.



    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Red-Hand" <webforumsuser@macromedia.com> wrote in message
    news:d6uh32$dm5$1@forums.macromedia.com...
    > Hi Helmut,
    >
    > Tank you for posting. Actually my second question was ? what is the
    different
    > between Server side scripting and client side scripting?? When should Iuse
    > server and when Client side scripting?? I am just a beginner therefore
    such a
    > Stupid question!!!
    >
    > Red
    >

    Paul Whitham TMM Guest

  6. #5

    Default Re: Active Scripting !!

    Paul,

    I am using the scripting for such a falidation:

    <CFIF #Form.Lname# EQ "">
    <script>
    alert("Type your name please.");
    self.location="javascript:history.back();"
    </script>
    <CFABORT>
    </CFIF>

    As you said if the cliet turns off the scripting, I can not use this kind of
    scripting. But I must use it.Therefore I was looking for a Guid line about
    Server side scripting or other solution for my site.

    Regards
    Red

    Red-Hand Guest

  7. #6

    Default Re: Active Scripting !!

    What you have here is a piece of client side script inside of server side
    script. Top handle the situation where someone has Javascript turned off you
    could code it like this

    <cfset errornum = 0>
    <CFIF #Form.Lname# EQ "">
    <script>
    alert("Type your name please.");
    self.location="javascript:history.back();"
    </script>
    <noscript>
    <cfset errornum = 1>
    </noscript>
    <CFABORT>
    </CFIF>

    Then wrap the display code inside of an IF statement like this

    <CFIF errornum = 1>
    <p>You have not entered a value in the Last name field. Please press the
    back button and correct it</p>
    <cfelse>
    Your existing code
    </cfif>


    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "Red-Hand" <webforumsuser@macromedia.com> wrote in message
    news:d707tt$5b7$1@forums.macromedia.com...
    > Paul,
    >
    > I am using the scripting for such a falidation:
    >
    > <CFIF #Form.Lname# EQ "">
    > <script>
    > alert("Type your name please.");
    > self.location="javascript:history.back();"
    > </script>
    > <CFABORT>
    > </CFIF>
    >
    > As you said if the cliet turns off the scripting, I can not use this kind
    of
    > scripting. But I must use it.Therefore I was looking for a Guid line about
    > Server side scripting or other solution for my site.
    >
    > Regards
    > Red
    >

    Paul Whitham TMM Guest

  8. #7

    Default Re: Active Scripting !!

    Paul,
    It is a nice solution. Tank you.
    I was thinking about something like this:

    On the page where you are going to

    <CFIF #Form.Lnaam# EQ "">
    <cfset ErrorPage = "Name.cfm?Message=" & URLEncodedFormat("You have not
    entered a value in the Last name field!!")>
    <cfset ErrorPage = ErrorPage & "&Lnaam=" & URLEncodedFormat(#Form.Lnaam#)>
    <cflocation url="#ErrorPage#">
    </cfif>

    And on the page wher you are from :

    <CFIF IsDefined("URL.Message")>
    <cfoutput><b> >>&nbsp;#URL.Message#&nbsp;<< </b></CFOUTPUT>
    </CFIF>
    But what I would like to find is:

    If you go to Sign In page of this site (Macro media), and if you type your
    login name and a wrong password, you will stay on the same page and you get a
    Error message.
    This falidation way is exactly what I am looking for.
    Do you know how it is built ?
    Do you also know how I can make a back button if Java is disabled on client
    site?

    Red

    Red-Hand Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139