473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Is the following script possible in asp technology

Hi,
I have the following javascript that is written in html. It works great.
However, I need to transfer the concept to an asp application where the form
itself is an asp page. I was wondering if that is possible to do? Thanks in
advance.
Regards

PS: In the html page the following comes intuitively(using Visual Interdev).
However, in the asp page it does not. e.g after document.formname. the
checkbox name does not show up in the asp page.
On the other hand the following comes intuitively in an html page
document.formname.checkboxname.checked

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>

<SCRIPT LANGUAGE="JavaScript"><!--
function codename() {

if(document.formname.checkboxname.checked)

{

document.formname.textname.disabled=true;
document.formname.checkboxname.disabled = true;
}

else
{
document.formname.textname.disabled=false;
document.formname.checkboxname.disabled = false;
}
}

//-->
</SCRIPT>

<form action="" method="" name="formname">

<input type="text" size="10" name="textname">

<input type="checkbox" onclick="codename()" name="checkboxname" value="OFF">

<input type="submit" value="Add">

<input type="reset" value="Clear">

</form>
</BODY>
</HTML>

Jul 22 '05 #1
2 1352
To turn that into an ASP page you would just save it as [pagename].asp
Viola!

Seriously though - what do you want the ASP page to do? Are you asking
about coding your form validation script in ASP instead of client-side js?
VS is not going to get you there without some amount of reading....

Tim.
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
Hi,
I have the following javascript that is written in html. It works great.
However, I need to transfer the concept to an asp application where the form itself is an asp page. I was wondering if that is possible to do? Thanks in advance.
Regards

PS: In the html page the following comes intuitively(using Visual Interdev). However, in the asp page it does not. e.g after document.formname. the
checkbox name does not show up in the asp page.
On the other hand the following comes intuitively in an html page
document.formname.checkboxname.checked

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>

<SCRIPT LANGUAGE="JavaScript"><!--
function codename() {

if(document.formname.checkboxname.checked)

{

document.formname.textname.disabled=true;
document.formname.checkboxname.disabled = true;
}

else
{
document.formname.textname.disabled=false;
document.formname.checkboxname.disabled = false;
}
}

//-->
</SCRIPT>

<form action="" method="" name="formname">

<input type="text" size="10" name="textname">

<input type="checkbox" onclick="codename()" name="checkboxname" value="OFF">
<input type="submit" value="Add">

<input type="reset" value="Clear">

</form>
</BODY>
</HTML>

Jul 22 '05 #2
Hi Jack,

Something like this, maybe?

<%
Dim bChecked
bChecked = Request.Form("checkboxname") <> ""
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>

<form action="" method="post" name="formname">

<input type="text" value="<%=Server.HTMLEncode(Request.Form("textname "))%>"
size="10" name="textname"<% If bChecked Then Response.Write "
disabled=""disabled"""%>>
<input type="checkbox" onclick="this.form.submit();" name="checkboxname"
value="OFF"<% If bChecked Then Response.Write " checked=""checked""
disabled=""disabled"""%>>
<input type="submit" value="Add">
<input type="reset" value="Clear">
</form>

</BODY>
</HTML>

Ray at home

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
Hi,
I have the following javascript that is written in html. It works great.
However, I need to transfer the concept to an asp application where the
form
itself is an asp page. I was wondering if that is possible to do? Thanks
in
advance.
Regards

PS: In the html page the following comes intuitively(using Visual
Interdev).
However, in the asp page it does not. e.g after document.formname. the
checkbox name does not show up in the asp page.
On the other hand the following comes intuitively in an html page
document.formname.checkboxname.checked

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>

<SCRIPT LANGUAGE="JavaScript"><!--
function codename() {

if(document.formname.checkboxname.checked)

{

document.formname.textname.disabled=true;
document.formname.checkboxname.disabled = true;
}

else
{
document.formname.textname.disabled=false;
document.formname.checkboxname.disabled = false;
}
}

//-->
</SCRIPT>

<form action="" method="" name="formname">

<input type="text" size="10" name="textname">

<input type="checkbox" onclick="codename()" name="checkboxname"
value="OFF">

<input type="submit" value="Add">

<input type="reset" value="Clear">

</form>
</BODY>
</HTML>

Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Greener | last post by:
Hi, I need help badly. Can you do client-side programming instead of server-side to capture the Browser type info? If this is the case, what's wrong with the following? <script...
6
by: S P Arif Sahari Wibowo | last post by:
Hi! I am thinking to have a client-side script doing processing on file downloading, basically the script will process a downloaded file from the server before it received by the user. For...
10
by: Nimit | last post by:
Hi, I wasn't sure which forum this post belongs to, so I've posted it to a couple forums that I thought may be appropriate. In giving me advice, please consider me a beginner. Below is a synopsis...
3
by: Jerry | last post by:
Hi, Experts, With the great functionalities in ASP .net, do we still need to use JavaScript? Thanks Jerry
17
by: Rajnee Kanth | last post by:
Hi, I want some info on the following items....send me what ever info u have pls..... 1) Segmentaion Voilation 2) Shared Objects files 3) Virtual Functions
0
by: kdilip41 | last post by:
Hi All, I would like to whether the following details is possible :: 1. 'How Many TSQL Statements Is Executed within a particular time frame say 8 hours and at the end of 8 hours i want a...
14
by: DavidNorep | last post by:
I do not know PHP, consider to write a CGI with this technology and have the following question. Is it possible to invoke a PHP script and let it endlessly wait for requests from a website (a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.