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

Problem in doing popup box

11
Hi,
I am very new to AJAX because i never learned AJAX back in university but i wanted to do this popup box that will appear two months before the expiry date(this expiry date has to be retrieved from the database because i've made a form which i have to fill in with all the customer's details including their contract's expiry date) which is just like a notification. So, the thing is, i know a lil bit of javascript but i know that javascript can not interact with database, so i tried to do all the date calculation in php and then i included it in javascript, but i failed because the popup itself that has to be appeared 2 months before the expiry date. So i really really need your help.thank u so much
Jul 9 '07 #1
6 1310
acoder
16,027 Expert Mod 8TB
You should not even need AJAX. You can just use PHP to generate the code that displays the popup. When the user logs in, it checks the expiry date. If the date is right, it displays a popup.
Jul 9 '07 #2
janna48
11
You should not even need AJAX. You can just use PHP to generate the code that displays the popup. When the user logs in, it checks the expiry date. If the date is right, it displays a popup.
Ahh, i actually understand that, but the thing is, i don't how to start it. can u prolly show me one example?
Jul 10 '07 #3
acoder
16,027 Expert Mod 8TB
So, are you having a problem with PHP dates or showing a popup box? Also remember that you will need to check for within 2 months because the user might not visit the page exactly 2 months before.
Jul 10 '07 #4
janna48
11
I don't know how to do both the date calculation and the popup in php. i only know this javascript for popup:

<SCRIPT language="javascript">
alert('Hello');
</SCRIPT>

Im such a loser eh?
Jul 11 '07 #5
acoder
16,027 Expert Mod 8TB
An alert should probably be fine for your purposes. I suggest you start a new thread in the PHP forum for your date calculation problem. Post your code (what attempt you've made so far) so that the experts there can help you.

Once you've solved that problem, you can have something like:
[PHP]<?php if (expiry2mthsb4) { ?>
<script type="text/javascript">
alert('There are two months left to your expiry date...blah blah.');
</script>
<?php } ?>[/PHP] Note the use of type rather than language=. The language attribute is deprecated and should no longer be used.
Jul 11 '07 #6
janna48
11
will do that. thank you so much for helping
Jul 12 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: riki | last post by:
Hi, i have a big problem...i'm using one jscript for resizing of all of my pics in popUp...in main html i'm having many little pics and clicking on them they open in popUp and resize to larger...
4
by: Mohit Gupta | last post by:
Hi all, Lately I have been working on an application in VB .net CF for Pocket PC device. I have a small question about Context Menu. When I try to close the window after context menu is poped...
8
by: nick | last post by:
In the web site http://greywolfdesign.com , there is a pop-up menu (when mouse over 'Portfolio' menu item), it always works well when using IE (6). However, when using Mozilla 1.6, the popup...
1
by: Bill H | last post by:
I run a dbms application that interfaces with the web. This module creates a frames page with two frames ('main' and 'mwinfoframe'). All communication with the dbms is routed through the...
4
by: VR | last post by:
First, greetings to everyone :) I'm doing a university seminar & I've encountered a problem. I have a gallery with thumbnails linked on pictures. What I want is popup to be opened with...
22
by: Steve Horrillo | last post by:
I'm also having trouble with a popup on leave javascript. It seems that it pops up when I browse to another page instead of waiting till I completely leave my site. What am I doing wrong. Mind you,...
8
by: I am Sam | last post by:
Hi everyone, This problem is making me old. I don't want to get any older. I have a multi-nested repeater control as follows: <asp:Repeater ID="clubRep1" Runat="server">...
5
by: SQACSharp | last post by:
I'm trying to automate an action in Internet Explorer.... I'm trying to click an image that open a popup menu. The html code of the iimage look like like <img blabla..OnClick="ShowMenu()"/> I...
1
by: YotamElal | last post by:
Hello, I have a popup problem. When a popup is opened, I want all other popups to close immediatly. (except for its self and it's child popups) Here is my code: code: <!DOCTYPE HTML PUBLIC...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
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...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.