473,379 Members | 1,216 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,379 software developers and data experts.

WebControls.calendar and java script

I have a calendar object that is connected to a database. When the
user clicks on a date that has no entry in the database I issue a java
script popup message that asks the user if he wants to add an entry. I
need to get the true or false from the message box back to the server
but I dont know how. I've tried various solutions found on these
forums but I haven't gotten them to work. Any suggestions are welcome!
Nov 18 '05 #1
3 1107
Hi,

Did you rty to insert the result into hidden field ?
<form id="Form1" method="post" runat="server">
<input runat="server" type="hidden" id="rv" name="rv">

function ask_onclick() {
document.body.all["rv"].value = confirm("Yada Yada");
}

private void Page_Load(object sender, System.EventArgs e)
{
if (this.rv.Value == "true")
{

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
I can't get it to work properly... What I want to do is to make a kind
of rendezvous between the java script pop-up and the server code:
if(!hasData){
RegisterClientDataScript("confirm","<script
language=Javascript>confirm('Do you want to add data?');</script>";
// if confirm returns true do something else just continue...
is this even possible? the code above happens in the
Calendar_SelectionChanged mehtod.

Natty Gur <na***@dao2com.com> wrote in message news:<uc**************@TK2MSFTNGP11.phx.gbl>...
Hi,

Did you rty to insert the result into hidden field ?
<form id="Form1" method="post" runat="server">
<input runat="server" type="hidden" id="rv" name="rv">

function ask_onclick() {
document.body.all["rv"].value = confirm("Yada Yada");
}

private void Page_Load(object sender, System.EventArgs e)
{
if (this.rv.Value == "true")
{

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3
Hi,

You can't return directly values from java client script into server
side script. the only way to transfer data between server and client
sides is through input HTML elements embedded in Form.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

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

Similar topics

1
by: jacob henson | last post by:
I have a user control with a calendar in it. when my main page load with the calendar in it. the page has a java script error. also if you try to use the calendar it give a java script error. ...
0
by: schapopa | last post by:
I have a java script calendar that I would like to use in Child data list. My child data list is an user control. I tried in many ways but no succes. If I paste all the code for calendar my other...
0
by: Rajkishore Kumar | last post by:
We have a piece of code written in Java Script in an ASP.Net appln in Visual Studio 2003 and it works fine. What it does is , when you press a date icon , it would open up a calendar(prepared by...
0
by: abhishekbrave | last post by:
Hi, I have to reuse the code given below for displaying a calendar according to the month and year specified by user ...currently this code is fetching systme date and genrating calendar for that......
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.