|
Thank you Andy....
I feel like an idiot atm, because we already have a VBscript for doing this, and I was trying to emulate it in javascript. We're using a SQL server to house a monstorus database, and this code I had typed in earlier is actually in a VB/ASP page.
I'll see if I can't modify the vbscript with the right tags and get it to work in the form.
Thanks for the input!
John
|
|
|
|
|
How about:
MillisecondsPerDay = 86400000;
function GetDays(startDate, endDate)
{
return Math.floor(
(endDate.valueOf() - startDate.valueOf())
/ MillisecondsPerDay);
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Hi,
I created a live chat application.Everything working fine in our devlompent server.But after we went live ,some messages are not reaching database server.For the chat window I used frame set having top frame for dispaly messages and bottom frame for sending messages.Can any one tell me why it's happening?why some meassages are not reaching database?
Thanks in advance
satya
|
|
|
|
|
Hi,
I created a live chat application.Everything working fine in our devlompent server.But after we went live ,some messages are not reaching database server.For the chat window I used frame set having top frame for dispaly messages and bottom frame for sending messages.Can any one tell me why it's happening?why some meassages are not reaching database?
Thanks in advance
satya
|
|
|
|
|
how can we stop multiple login of a user in a browser based application
|
|
|
|
|
you can store wheather this user is already logged or not in the Application object..
add the user name to the Application Contents Collection and remove it when he logges off.
|
|
|
|
|
What if they don't log off?
If the user closes his only browser window losing his link to the session. Then how are they going to get back into the system?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
he'll have to wait till the previous session times out
|
|
|
|
|
Keep a database and check if the user is already logged in.
Any tool is only as good as you can use it!!
(http://www.pascalnet.tk)
|
|
|
|
|
Or you could use cookies. If users has a cookie, he is already logged in. so do not log him in again just continue with what content he was supposed to receive. Otherwise login the users.
This way even if the users closed the browser without loggin out he would still retain his login info till the cookie is valid
Any tool is only as good as you can use it!!
(http://www.pascalnet.tk)
|
|
|
|
|
how to code a treeview control for a web application
|
|
|
|
|
All I saw was how to ask the same question 3 times in a row.
BW
The Biggest Loser
"People look so snooty, take pills make them moody Automatic bazootie, zero to tutti frutti" -Hollywood Freaks
|
|
|
|
|
What do you mean "How to code"? Do you mean like how to use? Or how to create your own?
If you wan't to know how to use it... Search Google and CodeProject.
If you wan't to know how to create one, you would have to inherit from the Control, and draw it using GDI+.
Aaron Eldreth
TheCollective4.com
My Articles
While much is too strange to be believed,
Nothing is too strange to have happened.
- T. Hardy
|
|
|
|
|
how to code a treeviewcontrol for a web application
|
|
|
|
|
how to add a treeview to a webproject
|
|
|
|
|
Hi To All
Yes the subject says a lot!!!
I have a webform which contains buttons, for one button i need to populate a modal dialog window and I will create a server object which will be in session in modal dialog.
But for the same button event I need to perform the insertion to database using session object which is created in modal dialog window.
The following is the code which will tell you what i am trying to do...
Response.write(openModalDialog);
str=Session["test"]//this will be created after I perform in modal dialog window
Database.insert(str)
please note that I am trying to execute all the lines in same button event
But i want to execute second and third line after i popup modal window and second should be executed once i close the modal window.
Please let me know if you have any idea on how to do that or any other way through which i can achieve.
Regards,
|
|
|
|
|
Hi there,
I'm assumming that you are using ASP.NET (??)
Your problem can be achieved with the following:
Create two web forms; the first is the page that has the buttons (and that will open the modal dialog), the second is the contents of the modal window.
e.g.
The first page...
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="TestWebApp.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
</HEAD>
<script language='JScript'>
function onbtnClick()
{
window.showModalDialog("./Modal1.aspx", "", "");
}
</script>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 456px; POSITION: absolute; TOP: 144px" runat="server"
Text="Button"></asp:Button>
</form>
</body>
</HTML>
and the code behind...
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
{
Button1.Attributes["onclick"] = "onbtnClick()";
}
else
{
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Button1_Click(object sender, System.EventArgs e)
{
}
So what we are doing is on the initialisation of the page, we set the onclick attribute of the button to the client-side function onbtnClick() which will open the modal dialog window. If you look at the function, then we will open the Modal1.aspx page. The client-side event handler will be perform first, then once the user closes the modal dialog, the form will post back to the server and call the Button1_Click server event handler.
I dont know what you want to display in the modal window, but Model1.aspx can be a normal ASP.NET page so put whatever you need inside of it.
Hope this helps,
Andy
|
|
|
|
|
Hi Thanks for replying me...
This will solve, but my PL(Leader)is asking me to have both java and server script to execute in the same button function.
I mean he dont want javascript to have in the client side, he wants to embed the javascript at server side.
|
|
|
|
|
Hi again,
IamADotNetGuy wrote:
I mean he dont want javascript to have in the client side, he wants to embed the javascript at server side.
Embed the javascript? I'm not sure I understand what it is you are trying acheive. The opening of the Modal dialog has to reside on the client - the server cannot open a window (??)
Can you expand on what exactly needs to happen
Cheers,
Andy
|
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<STYLE type="text/css">
<!--
A:hover { color:red }
-->
</STYLE>
</head>
<body alink="red" vlink="navy" link="navy" text="navy" bgColor="whitesmoke" MS_POSITIONING="GridLayout" link="Navy">
<table align="left" id="Table2" height="207" cellSpacing="3" cellPadding="3" width="100%" bgColor="whitesmoke" style="FONT-SIZE: 20px;">
<tr>
<th>
<a href="./PKDifference.htm" target="destination">The PK Difference</a></th></tr>
<tr>
<th>
<a href="./PKBenefits.htm" target="destination">Benefits</a></th></tr>
<tr>
<th>
<a href="./PKServices.htm" target="destination">Services</a></th></tr>
<tr>
<th>
<a href="./PKCallCenters.htm" target="destination">Call Centers</a></th></tr>
<tr>
<th>
<a href="./PKStaff.htm" target="destination">Staff</a></th></tr>
<tr>
<th>
<a href="./PKLinks.htm" target="destination">Links</a></th></tr>
<tr>
<th>
<a href="./PKContact.htm" target="destination">Contact Us</a>
</th>
</tr>
</TD> </TR>
<TR vAlign="top">
<TD align="center">
<IMG height="214" src="Images/NewLeftImages.jpg" width="181" alt="Recruiter Calls"></TD>
</table>
</body>
</html>
|
|
|
|
|
If someone either has MouseOver or OnClick, I want a menu to appear beneath or next to "Contact Us". Code is below, enjoy!
|
|
|
|
|
Hi,
I was wondering where could i find a good -free- webserver. I was also wondering if there isnt any good free servers, should i go with Apache or IIS 5?
|
|
|
|
|
Apache is free..
depends on what code you write, what OS is your erver running
theJazzyBrain
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
Hi,
I need help.
The page has dropdown list and 3 radio type.
I would like to see when the page is reloaded, the previous selected values from the dropdown list and radio are retained in the list and radio. Usually, when the page is reloaded, the values are set to the default values which are the first value in the list and radio.
Reloaded page to me mean when the user submits the page, it will go to the next page, and when the user clicks back button to go back to the previous page, the previous selected values are automatically set in the list and radio, not default ones.
The website below gives you some idea of what I am tryin to do.
When you select values from dropdown lists and click on search to go to the next page and then click on try again link (not the back button on browser) to come back to the previous page, you will see the previous values are set in the lists. I LIKE TO DO THINGS LIKE THAT INCLUDING RADIO TYPE AS WELL.
http://www.apartmentrentcentral.com/minnesota_apartments.cfm
Anyone knows how to do this using javascript or php (I am using these). I would appreciate for your help or any thoughts.
Learner007
|
|
|
|
|
It's your browser which is remembering the values, not the website.
The "Try Again" link is just some java code which is the same as pressing the back button.
If it isn't working for your web pages it's because your pages aren't being cached by the browser. This could be because you've set them not to, or due to a bug in the browser. If you're using IE there is a bug with the "Vary" HTTP header which will cause this.
|
|
|
|