Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Red-Hand #1
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
-
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... -
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... -
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... -
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... -
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... -
...helmut #2
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
-
Red-Hand #3
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
-
Paul Whitham TMM #4
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...different> Hi Helmut,
>
> Tank you for posting. Actually my second question was ? what is thesuch a> between Server side scripting and client side scripting?? When should Iuse
> server and when Client side scripting?? I am just a beginner therefore> Stupid question!!!
>
> Red
>
Paul Whitham TMM Guest
-
Red-Hand #5
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
-
Paul Whitham TMM #6
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...of> 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> 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
-
Red-Hand #7
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> >> #URL.Message# << </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



Reply With Quote

