15,907,281 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by mehdilahori (Top 48 by date)
mehdilahori
21-Dec-16 1:40am
View
you were write, response.write was the main culprit, but why did not you put it in solution.i am putting it now with your permission.
mehdilahori
16-Dec-16 9:23am
View
yeah...and to keep it more simple for any new beginner just put style="height: 400px" in div tag
mehdilahori
7-Dec-13 2:14am
View
thanks brother
it worked
mehdilahori
7-Dec-13 1:24am
View
hi bro
i tried your solution but it did not work
any other idea
regards
mehdilahori
19-Jul-12 11:04am
View
thank you Bob
what did you mean by query parameter and how can i achieve this approach
thanks
mehdilahori
19-Jul-12 10:55am
View
2 textboxes on page
txtCity
txtSample
one button
btnNext
when user clicks on button next record should be shown in respective textboxes
i am able to move to the next record only once but when i click next button second time nothing happens
can not store value of row index
thanks you very much
mehdilahori
19-Jul-12 1:38am
View
can u come up with an example
mehdilahori
19-Jul-12 1:04am
View
mot solved yet
mehdilahori
19-Jul-12 1:04am
View
mot solved yet
mehdilahori
19-Jul-12 1:03am
View
mot solved yet
mehdilahori
19-Jul-12 1:02am
View
hi ashish
mot solved yet
mehdilahori
6-Jul-12 7:27am
View
thanks Manas
it was a good learning experience
thanks once again
mehdilahori
11-Jun-12 1:23am
View
thanks sandeep
i got u
have a cool day
bye
mehdilahori
10-Jun-12 2:48am
View
ooops well it is very embarrassing my fault i want to translate this in to vb sorry sorry sorry sorry lol due to immense pressure of my stupid client sorry once again
mehdilahori
10-Jun-12 2:47am
View
ooops
well it is very embarrassing
my fault
i want to translate this in to vb
sorry sorry sorry sorry
lol
due to immense pressure of my stupid client
sorry once again
bare bare deshoum main edi choti choti batain hoti rehti hain
mehdilahori
10-Jun-12 1:34am
View
hi Sandeep
thanks for help
please do me a favor
can you translate above code in c#
thanks
mehdilahori
30-May-12 6:47am
View
hi tanweer
i tried this before and this will work because of alert method or function but when we remove alert line this will not work
and the reason of this is that error is happening because of postbackif a PostBack occurs, the Label will revert to the original, since Labels changed client-side are not persisted in ViewState. so how can i achieve this after post back is occurred i have diagnosed the error but could not find the treatment
your views on this
thanks
mehdilahori
30-May-12 3:48am
View
hi tanweer
that also did mot work i thought that would be very simple actually i want to use label just as a flag variable
any other alternative would be deeply appreciated
thanks
mehdilahori
30-May-12 3:01am
View
i used this but nothing happened
mehdilahori
27-May-12 7:48am
View
hi Ed
i am still working on your altered code.but i could find any any css claass named bgpopup.in js file you are using bgpopup quite alot
can you explain what is bgpopup.css
i will deeply appreciate
thanks
mehdilahori
27-May-12 2:15am
View
yes dain
i want to calculate browser window inner width and height but dont know about the code behind
thanks
mehdilahori
26-May-12 11:08am
View
hi dain
i read this article before
thanks for reply
actually i want to calculate browser width and height in asp.net using c#
thanks
mehdilahori
26-May-12 6:35am
View
hi sivasankari
i tested your solution which was 100% correct
thanks
mehdilahori
25-May-12 11:09am
View
hi ed
i will definitely i will look in to your recommendations
thanks
mehdilahori
25-May-12 7:56am
View
hi ed
i did the same as you said but nothing happened
it is my immaturity in js that i could not trace this error but i have not accepted defeat yet i am still trying anyhow thanks for your corporation during this i learned quite a few things which is some thing better than nothing
:)
:)
:)
LOL
thanks once again
mehdilahori
25-May-12 7:43am
View
hi sivasankari
thanks this was the line i was looking for
string id = e.CommandArgument.ToString();
i have not tested this but i think this will solve my problem
i am in lahore so i will be without power from 5 to 6 pm
i will come back to you as soon as possible
thanks once again
mehdilahori
25-May-12 7:13am
View
ok let me explain once again
i have two datalists on same page
parendl and childdl
parentdl has some initial info of all the records having a view details button when user clicks on view details button of an particular record then all the info of that record clicked should be display on child datalist
i hope this clears some confusion
thanks
mehdilahori
25-May-12 7:00am
View
hi ed,
actually i was working on the same code that you altered but accidentally pasted the older version
i m still cant be able to show popup at all
i have also solved the undefined class by putting classes in css
here is code
also tried firebug but invain
******************************************8
aspx code
****************************************88
<input id="Button2" type="button" class="btnDetailsfp" runat="server" value="View Details" />
<div class="popupContact"> x <p class="contactArea">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("[house_id]") %>'>
</p>
</div>
<div class="backgroundPopup"> </div>
**************************************************************
js code
***********************************************8
//loading popup with jQuery magic!
function loadPopup(popupContact, bgPopup)
{
//loads popup only if it is disabled
if (popupStatus == 0)
{
bgPopup.css({ "opacity": "0.7" });
bgPopup.fadeIn("slow");
popupContact.fadeIn("slow");
popupStatus = 1;
}
}
//disabling popup with jQuery magic!
function disablePopup(popupContact, bgPopup)
{
//disables popup only if it is enabled
if (popupStatus == 1)
{
bgPopup.fadeOut("slow");
popupContact.fadeOut("slow");
popupStatus = 0;
}
}
//centering popup
function centerPopup(popupContact, bgPopup)
{
//request data for centering
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var popupHeight = popupContact.height();
var popupWidth = popupContact.width();
//centering
popupContact.css({
"top": windowHeight/2-popupHeight/2,
"left": windowWidth/2-popupWidth/2
});
//only need force for IE6
bgPopup.css({
"height": windowHeight
});
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function ()
{
//LOADING POPUP
//Click the button event!
//$("id[$='button']").click(function()
{
$(".btnDetailsfp").click(function ()
{
var popupContact = $(this).next(".popupContact");
var bgPopup = popupContact.next(".backgroundPopup");
//centering with css
centerPopup(popupContact, bgPopup);
//load popup
loadPopup(popupContact, bgPopup);
}
);
//CLOSING POPUP
//Click the x event!
$(".popupContactClose").click(function ()
{
var popupContact = $(this).parent();
var bgPopup = popupContact.next(".backgroundPopup");
disablePopup(popupContact, bgPopup);
});
//Click out event!
$(".backgroundPopup").click(function ()
{
var bgPopup = $(this); var popupContact = bgPopup.prev(".popupContact");
disablePopup(popupContact, bgPopup);
});
//Press Escape event!
$(document).keypress(function (e)
{
if (e.keyCode == 27 && popupStatus == 1)
{
disablePopup();
}
});
});
********************************************8
css code
*********************************************
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em,
font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td {
border:0pt none;
font-family
mehdilahori
25-May-12 6:46am
View
but i do not want to go to next page i want show details of an particular id on another datalist but want to be in same page right now what i am trying in second datalist which shows detailed info it is
select * from homes where e.commandname="details"
but getting an error
what should i put in where clause
thanks
mehdilahori
24-May-12 23:49pm
View
hi Sir Ed
i will alter js and css code once again and will come back to you
thanks
mehdilahori
24-May-12 9:42am
View
hi Ed
i am using visual web developer 2008 which tells me it is either css or a class but as you said if it is css we have nothing to worry about here is my altered as your suggestion aspx,css and js code
*******************************************************************888
aspx code
*******************************************************88
<input id="Button2" type="button" class="btnDetailsfp" runat="server" value="View Details" />
<div class="popupContact"> x <p class="contactArea">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("[house_id]") %>'>
</p>
</div>
<div class="backgroundPopup"> </div>
*******************************************************88
js code
/***************************/
//@Author: Adrian "yEnS" Mato Gondelle
//@website: www.yensdesign.com
//@email: yensamg@gmail.com
//@license: Feel free to use it, but keep this credits please!
/***************************/
//SETTING UP OUR POPUP
//0 means disabled; 1 means enabled;
var popupStatus = 0;
//loading popup with jQuery magic!
function loadPopup(){
//loads popup only if it is disabled
if(popupStatus==0){
$("#backgroundPopup").css({
"opacity": "0.7"
});
$("#backgroundPopup").fadeIn("slow");
$("#popupContact").fadeIn("slow");
popupStatus = 1;
}
}
//disabling popup with jQuery magic!
function disablePopup(){
//disables popup only if it is enabled
if(popupStatus==1){
$("#backgroundPopup").fadeOut("slow");
$("#popupContact").fadeOut("slow");
popupStatus = 0;
}
}
//centering popup
function centerPopup(){
//request data for centering
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var popupHeight = $("#popupContact").height();
var popupWidth = $("#popupContact").width();
//centering
$("#popupContact").css({
"position": "absolute",
"top": windowHeight/2-popupHeight/2,
"left": windowWidth/2-popupWidth/2
});
//only need force for IE6
$("#backgroundPopup").css({
"height": windowHeight
});
}
//CONTROLLING EVENTS IN jQuery
$(document).ready(function(){
//LOADING POPUP
//Click the button event!
$("#button").click(function(){
//centering with css
centerPopup();
//load popup
loadPopup();
});
//CLOSING POPUP
//Click the x event!
$("#popupContactClose").click(function(){
disablePopup();
});
//Click out event!
$("#backgroundPopup").click(function(){
disablePopup();
});
//Press Escape event!
$(document).keypress(function(e){
if(e.keyCode==27 && popupStatus==1){
disablePopup();
}
});
});
*******************************************************88
css code
*******************************************************88
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em,
font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
tfoot, thead, tr, th, td {
border:0pt none;
font-family:inherit;
font-size:100%;
font-style:inherit;
font-weight:inherit;
margin:0pt;
padding:0pt;
vertical-align:baseline;
}
body{
background:#fff none repeat scroll 0%;
line-height:1;
font-size: 12px;
font-family:arial,sans-serif;
margin:100%;
}gin:0pt;
hei
table {
border-collapse:separate;
border-spacing:0pt;
}
caption, th, td {
font-weight:normal;
text-align:left;
}
blockquote:before, blockquote:after, q:before, q:after {
content:"";
}
blockquote, q {
quotes:"" "";
}
a{
cursor: pointer;
text-decoration:none;
}
br.both{
clear:both;
}
.backgroundPopup
{
display: none;
position: fixed;
height: 100%;
width: 100%;
top: 0;
left: 0;
background: #000000;
border: 1px solid #cecece;
z-index: 1;
}
.popupContact
{
display: none;
mehdilahori
22-May-12 23:58pm
View
hi Ed
i am glad that you replied yesterday i had a day off due to my eye checkup because i have very low vision and i have to use some kind of magnification tool but any how i am also working on the error but haven't resolve undefined class issue because i am not expert in js
waiting for more guidance from you
have a crispy day
thanks once again
mehdilahori
21-May-12 9:27am
View
where are you Sir Ed
please please please reply anything
mehdilahori
21-May-12 5:35am
View
hi ed
i tried your code and spent bit of time. run the page when i clicked the details button nothing happened.i came back to code there was two errors one was
class="btnDetailsfp" in input type button
error message: class or cssclass value is not defined
and another was
<p class="contactArea">
error message: class or cssclass value is not defined
i could not trace these erros
i also put input type button in div id="button" but nothing happened.
where am i going wrong now. so near but yet so far
mehdilahori
21-May-12 1:39am
View
Deleted
hi ed
one funny situation. when i copy your js code all the code is pasted in single line and because i am an eye patient and i can read only first line of the eye chart and i use magnifier software, so it would be very hard for me to break the code. please can you give me an alternate solution
mehdilahori
21-May-12 1:26am
View
Deleted
hi Ed
one funny situation when i copy your java script file all the code is pasted in one line it would be very hard for to break in one line
mehdilahori
21-May-12 0:38am
View
hi Ed
awoke up in the morning and saw your comment i was thinking all night whether i would be able to learn this approach or not
after seeing your solution it was just like as if i got one liter bottle in a desert.sorry for my bad English
i am very glad.now i am working on files, i do not want to just copy paste all the stuff, i want to learn and understand what you did whether it took me a week or so
i will come back to you soon
till then by and have a milky day
thanks
mehdilahori
20-May-12 11:58am
View
please follow the following link
i have the connection string online so you do not need to worry about database just run the file
betasite.somee.com/Default5.aspx
mehdilahori
20-May-12 9:48am
View
i am trying upload the page but i am having some problem i think server doesn't support ajax or jquery
here is my datalist code
<asp:DataList ID="dl1" runat="server"
HorizontalAlign="Right" RepeatColumns="1"
onitemcommand="Repeater1_ItemCommand1" Width="638px" align="left">
<itemtemplate>
<div>
<table style="font-weight: bold;">
<tr>
<td>
<asp:Image ID="Image1" width="100%" height="100%" runat="server"
ImageUrl='<%# Eval("filename", "{0}") %>' />
</td>
<td style="width: 200px;">
PROPERTY TYPE
<asp:Label ID="lblCategory" runat="server"
Text='<%# Eval("[category]") %>'>
<br></br>
PROPERTY ID:
<asp:Label ID="lblHouse_id" runat="server" Text='<%# Eval("[house_id]") %>'>
<br/>
Phase:
<asp:Label ID="lblPhase" runat="server" Text='<%# Eval("[phase]") %>'>
<br>
</br>
<br></br>
address:
<asp:Label ID="lbladdress" runat="server" Text='<%# Eval("[address]") %>'>
<br />
<asp:LinkButton ID="btnDetails" runat="server"
CommandArgument='<%# Eval("[house_id]") %>' CommandName="details"
Text="View Details" />
<br />
<br>
</br>
<div id="button"><input type="button" value="Press me please!" /></div>
<div id="popupContact">
x
<p id="contactArea">
<asp:Label ID="Label1" runat="server" Text='<%# Eval("[house_id]") %>'>
</p>
</div>
<div id="backgroundPopup"></div>
i am laughing at my self
thanks
mehdilahori
20-May-12 7:48am
View
thanks Ed for explaining
i got your points
actually what i am trying to do that i have a datalist having someinitial information about an item an and a details view asp link button right now when user clicks on details link button, detailed information of a particular item is shown on another page and obviously with query string
but now i want to show detail information on a popup window in the same page when i put the sane popup code in datalist i achieved my results 10% that means only very first item of the datalist is showing the popup window after clicking the detail button and rest of the items are not showing popup window, is it because i am using html type button instead of asp button, this is a tricky situation, if i use asp button i would not be able to use popup effect and if i use html type button i would not be able to show popup window in all the items in datalist i googled this issue and some developers asked same thing but did not got any solution
any suggestions my dear teacher Ed
thanks once again and have crispy day
mehdilahori
20-May-12 0:09am
View
thanks Ed. it was a great learning experience the way you explained it was like my mother is trying to correct me where i am going wrong.
with the help of you Ed i learned new lesson on TYPE attribute which belongs to html.now i have another question
when i replaced html input button with asp button, that didn't work let me explain a bit more when i replaced this line
<input type="button" value="Press me please!" />
with this one
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton
unfortunately that didn't work
i was again back at same place where i was standing before your solution.
now here is my question
why an asp button or link button is not working with this script
mehdilahori
19-May-12 11:45am
View
hi Ed thanks for replying
i have not gone to any institute to learn asp.net and i have no teacher
i learned all these things from great brains out there like you you can see my work at betasite.somee.com
here is my popup.js code
[Edit: Code placed into question]
mehdilahori
19-Apr-11 4:38am
View
thanks TTM i mean TrustTheMath
thanks thanks thanks
it was really a magic code
please do one more favor
can you explain MOD command
thank you very much
mehdilahori
19-Apr-11 1:13am
View
Deleted
hi dear,
i tried your code unfortunately this code also doing the same.not circling around.i am still working on this if you or any other have any suggestion or solution then do tell me.thanks for help
mehdilahori
12-Apr-11 0:38am
View
hi Prerak thanks for reply,
in datagrid column name was companyname and i put the same name in code but it also didnt work.it still gives same error saying that column name not found.
i am using bound controls.
i m still googling if u have any idea please let me know
and thanks to be so calm and cool
mehdilahori
11-Apr-11 7:50am
View
i checked it
did not work
what should i do
scratching my head
mehdilahori
8-Apr-11 1:00am
View
ok i will look in to this
thanka mate
have a crispy day
mehdilahori
7-Apr-11 2:58am
View
OK i will try to keep it simple
while using SPSS (statistical package for social science),files are save in .sys format or .sav format.
SPSS is mostly used in serveys to perform statistical tests for example.let say.
who will win IPL ?
1 chennai
2 kolkata
3 haiderabad
after asking this question from 500 people we learned that
1 Chennai 40%
2 Kolkata 30%
3 Hyderabad 30%
and data will be entered in coding like 1 for Chennai 2 for kolkata and 3 for Hyderabad.
my data is being saved in sql server.now problem i am facing that to perform further statistical tests data should be saved in to the SPSS format.so
can we save data in SPSS format which is .SYS .SAV using SQL.
OR how we can extract the data in SPSS format from SQL.
YOUR THOUGHTS WILL BE DEEPLY APPRECIATED
Show More