|
write a java script function that stores "yes" or "No" in a hidden field based on the confirm or alert box (alert box always returns the bool value of true or false) response.
func getConfirm()
{
///
}
now do the following
closeButton.attributes.add("OnClick","javascript:getConfirm());
Now access the hidden field using Request.Form["hiddenField"]
u will get the value "Yes" or "No"
Koushik
|
|
|
|
|
what is closebutton
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
alert function in java script has only one button called OK
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
hey close button here is an example..i.e the button click on which u r showing the alert box. Also in u'r case use window.prompt to display Ok and Cancel buttons
-- modified at 8:36 Tuesday 9th October, 2007
Koushik
|
|
|
|
|
Hi
I am using a Microsoft Treeview control in my application. It works fine with IE.
The problem is that it is not working for Mozilla/Firefox browser. The problem I found was that on javascript events like onexpand and oncollapse,it does a postback.It is not able to attach javascript event handlers to these events.
Neither can it attach events in TreeView.htc file.I made the changes in treeview.htc file for preventing the postback.But was of no help.
Cn somebody plz give a possible fix for this ... .. . ???
Thnx in advance
|
|
|
|
|
i am calling one confirmation message written in javascript when clicking on a button.at the same time i am using one required field validater to check whether user has entered value on one textbox.but it is not fireing the validation control.if i remove the client side script then the validation control is wroking correctly on button click .how can i solve it?......
|
|
|
|
|
There's probably an error in your client-script script. You haven't posted your script, so I can't tell you what the problem is.
Paul Marfleet
|
|
|
|
|
Onclient click of button i have written
return confirm('Stock is going to update.Do you want to continue?');
|
|
|
|
|
Hi,
I assume that your javascript validation function may be return a false value or may be it makes any error which prevent the further processing.
Thomas
|
|
|
|
|
if any error with javascript function it wouldn't be worked according to the selection.it is working correctly when i click ok and cancel
|
|
|
|
|
Ok can you post that javascript function?
Thomas
|
|
|
|
|
Button
<asp:button id="btnProcess" runat="server" font-names="Verdana" font-size="Small"
="" onclick="btnProcess_Click" onclientclick="return SubmitForm();" text="PROCESS DATE" width="126px" validationgroup="PROCESS" font-bold="False" height="21px">
JavascriptFunction
function SubmitForm()
{
var msg= confirm('Stock is going to update.Do you want to continue?');
if(msg==true)
{
return true;
}
else
{
return false;
}
}
TextBox
<asp:textbox id="txtDate" runat="server" borderstyle="None" width="151px" causesvalidation="True" validationgroup="PROCESS">
Validation Control
<asp:requiredfieldvalidator
id="RequiredFieldValidator4" runat="server" controltovalidate="txtDate"
="" errormessage="*" validationgroup="PROCESS" width="15px" setfocusonerror="True">
|
|
|
|
|
Ok can you comment that 'return false' statement and check your validator is working or not
Thomas
|
|
|
|
|
then it is working correctly
|
|
|
|
|
I think javascript function has a priority than validation controls. So if the function returns false, it will causes to stop all the other processing
You have to change your logic
Thomas
|
|
|
|
|
Hi,
Functionality is to generate excel report, which i have done.
Requirement is ,office should not be install on server.
can anybody resolve this issue ?????????
Regards
Tarun Singh
Sr. Software Engineer.
mailto:tksingh@zenta.com
|
|
|
|
|
Use the Jet OleDb driver to programmatically connect and write to an Excel file. There are plenty of resources on Google that will show you how to do this.
Paul Marfleet
|
|
|
|
|
Hi,
I have a GridView on my page (see code below). What I want to do is have a link (or button, doesn't matter) which, when the user clicks on it, opens up another page and passes several variables to that page. Trouble is, I can't think of a neat way of doing this without it getting a bit messy. Surely there must be an aesthetic method?
Hopefully an easy one for the experts, just baffles me...
The control I am referring to is <asp:TemplateField HeaderText="Email">
Be very grateful for any advice.
Regards
Chris
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="View.aspx.vb" Inherits="View" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>WC BLM - Log Manager</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>3034kjng lm4gkl34m</h1>
<h2>Backup Log Manager</h2>
<h3>Log Manager</h3>
<p>
Status filter:
<asp:DropDownList id="SelectStatus" runat="server"
autopostback="True">
<asp:listitem Selected='true'>OK</asp:listitem>
<asp:listitem>Query</asp:listitem>
<asp:listitem>Error</asp:listitem>
<asp:ListItem>Resolved</asp:ListItem>
</asp:DropDownList>
</p>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="PARSERFILENAME" DataSourceID="AccessDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None" BorderColor=black BorderStyle=solid BorderWidth=1px>
<Columns>
<asp:BoundField DataField="EMAILDATETIME" HeaderText="Email Received" SortExpression="EMAILDATETIME" ReadOnly="True"/>
<asp:BoundField DataField="BACKUPDATETIME" HeaderText="Backup Started" SortExpression="BACKUPDATETIME" ReadOnly="True"/>
<asp:BoundField DataField="CLIENT" HeaderText="Client" SortExpression="CLIENT" ReadOnly="True"/>
<asp:BoundField DataField="BACKUPTYPE" HeaderText="Backup Type" SortExpression="BACKUPTYPE" ReadOnly="True"/>
<asp:BoundField DataField="APPLICATION" HeaderText="Application" SortExpression="APPLICATION" ReadOnly="True"/>
<asp:TemplateField HeaderText="Status" SortExpression="STATUS">
<ItemTemplate>
<asp:Label ID="ReadStatus" Runat="Server"
Text='<%# Eval("STATUS") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="InsertStatusDropDownList"
SelectedValue='<%# Bind("STATUS") %>'
RunAt="Server">
<asp:ListItem>OK</asp:ListItem>
<asp:ListItem>Query</asp:ListItem>
<asp:ListItem>Error</asp:ListItem>
<asp:ListItem>Resolved</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<asp:Label ID="ReadNotes" Runat="Server"
Text='<%# Eval("NOTES") %>' />
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="EditNotes" runat="Server" Text='<%# Bind("NOTES") %>' TextMode="MultiLine" Columns="40" Rows="5" />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Log File">
<ItemTemplate>
<a href="Logs/<%# Eval("PARSERFILENAME")%>" target="_blank">View</a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField showeditbutton="True" HeaderText="Options" ButtonType="Button" />
</Columns>
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#E3EAEB" />
<EditRowStyle BackColor="SpringGreen" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/BackupLogParser.mdb"
SelectCommand="SELECT * FROM [VIEW] WHERE STATUS=@SELECTEDSTATUS"
UpdateCommand="UPDATE [VIEW] SET [STATUS]=@STATUS, [NOTES]=@NOTES WHERE PARSERFILENAME=@PARSERFILENAME">
<SelectParameters>
<asp:ControlParameter Name="SELECTEDSTATUS"
ControlID="SelectStatus"
PropertyName="SelectedValue"/>
</SelectParameters>
</asp:AccessDataSource>
</div>
</form>
</body>
</html>
|
|
|
|
|
You can use session variables to pass value from one page to another.
To open a new window, you can use window.open javascript function.
Hope you got the point.
Thomas
|
|
|
|
|
halol....
i dont understand by this
Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
i already import reference needed.......
how can i solve tis error?
thanks...... :->
|
|
|
|
|
Hi
guys , do any one have the idea how to create gif and jpeg images programmatically at run time,
suppose user provides the input font,color and back ground color and the web application generates gif or jpeg images from the available templates provided to the user, kindly reply ASAP,
thankx in advance,
regards,
|
|
|
|
|
Did you try Google[^]?
Paul Marfleet
|
|
|
|
|
hi
if(!entity.IsRecordedDateNull)
parRecordedDate.Value = entity.RecordedDate.Subtract(new TimeSpan(2,0,0,0)).ToOADate();
else
parRecordedDate.Value = System.DBNull.Value;
cmdParams.Add(parRecordedDate);
can any one explain what does this code mean.WHICH IS CEARTING A PROBLEM FRO ME ON RECORDING A TIME.
It making one min. less for specific timings 2:30,5:30,8:30 and 11:30 it is accepting in database as 2:39,5:39,8:39 and 11:39.
asp.net using c#.
mallika
|
|
|
|
|
Please make your subject so specific.
Don't write it like Help me its urgent.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
1. Try to write a useful subject.
Even if the question is urgent to you, it's never urgent enough to be mentioned in the subject line, or you wouldn't be posting in a forum at all instead of paying for assistance.
Almost every thread in this forum is about someone needing help, so that doesn't do anything at all to distinguish your thread from others.
2. You haven't supplied enough information about what you are doing.
What kind of database are you using? What is the data type of the field where you store the data? Why are you converting the DateTime value into an OLE Automation date?
Is the difference between the expected value and the actual value exactly one minute? Does the field really contain the time 2:39:00.0000, or does it contain something much more reasonable, like 2:39:59.9999?
---
single minded; short sighted; long gone;
|
|
|
|