|
hi
u refer this code
function SelectAllCheckboxes(spanChk){
// Added as ASPX uses SPAN for checkbox
var oItem = spanChk.children;
var theBox=(spanChk.type=="checkbox")?spanChk:spanChk.children.item[0];
xState=theBox.checked;
elm=theBox.form.elements;
for(i=0;iif(elm[i].type=="checkbox" && elm[i].id!=theBox.id)
{
//elm[i].click();
if(elm[i].checked!=xState)
//elm[i].click();
elm[i].checked=xState;
}
}
function DeSelectCheckBoxes(spanChk)
{
// Added as ASPX uses SPAN for checkbox
var oItem = spanChk.children;
var theBox=(spanChk.type=="checkbox")?spanChk:spanChk.children.item[0];
xState=theBox.checked;
// this means it is deselected
if(xState == false)
{
elm=theBox.form.elements;
for(i=0;i if(elm[i].type=="checkbox" && elm[i].id!=theBox.id)
{
elm[i].checked=false ;
}
}
}
function HighlightRow(chkB) {
var oItem = chkB.children;
xState=oItem.item(0).checked;
if(xState)
{chkB.parentElement.parentElement.style.backgroundColor='lightcoral'; // grdEmployees.SelectedItemStyle.BackColor
chkB.parentElement.parentElement.style.color='white'; // grdEmployees.SelectedItemStyle.ForeColor
}else
{chkB.parentElement.parentElement.style.backgroundColor='white'; //grdEmployees.ItemStyle.BackColor
chkB.parentElement.parentElement.style.color='black'; //grdEmployees.ItemStyle.ForeColor
}
}
regards
saravanan
|
|
|
|
|
There's a much easier way if you want to use client-side code:
string script="<script>function CheckAll(){";<br />
script += "document.getElementById('" + CheckBox1.ClientID + "').checked = true";<br />
script += "document.getElementById('" + CheckBox2.ClientID + "').checked = true";<br />
...<br />
script += "}</script>";<br />
<br />
Page.RegisterStarupScript("CheckAll", script);<br />
Button1.Attributes.Add("onclick", "Checkall();return false");<br />
Obviously this code has some bad things about it (if you have 100 CheckBoxes, it gets very lengthy, and also much slower, then if you would use StringBuilder). Also for ASP.NET 2.0 use should use
Page.ClientScript.RegisterStarupScript(this, "CheckAll", script);
I just wanted to show that you can do this without writing tons of nasty Javascript, and still get it working on the client-side, and also the you DO know the client-side ID of server controls (ClientID property).
|
|
|
|
|
hi all,
here i am facing one problem.. In my Select Query i'm using NVL(field,'') and binding to grid . in my grid item command i am displaying these details with cell values. the null filed are displaying '&'nbsp; (no quotes for ampersand, for display i had written so) , i had tried check with trim, giving '&'nbsp; (no quotes for ampersand, for display i had written so)while passing to text box, but in vain..
pls. tell me what i have to do..
thanks..
-- modified at 11:29 Wednesday 6th December, 2006
|
|
|
|
|
i want to simulate a menu with two div elemen.
one for father node which its position is no absolute and placed in an table cell.
another div is my menu body. i should find the position of first div (top, left) and then set the position of second div. i check style.top, style.left, all["div1"].style.top, all["div2"].style.left,...
but i don't have any resault. how can i find the first div position in the browser window?
thanks
rastgar
|
|
|
|
|
hai,
I need information of this,
I am displaying an image using ImageButton(an warehouse image), i am searching for some product in warehouse on sucessful search red sports are drawn on image which tells products at particular location.
problem is i want to display product attributes on "Mouse Hover" over the image, i want to know how can i get control of mouse hover event in code behind along with its x,y cordinates, so that i can display mouse hover text message. I know the tool tip but its is not dynamic.
can any one give me solution for this...
krish...
|
|
|
|
|
You can't get the mouse position in the code behind (you can't get any real time data from the client in code behind) because its server-side. You will have to use javascript to track the mouse and do the necessary actions.
|
|
|
|
|
hi ,
i want to ask if there is any possible security risk in uploading different file extension to web server ??
|
|
|
|
|
You can safely upload to a folder where the folder does not have EXECUTE or SCRIPT permission. Additionally it ought to be outside the Virtual Directories for higher and elevated levels of protection.
Furthermore, if you can afford, you can have a virus scan enabled.
|
|
|
|
|
potentionaly...
it depends on what are you doing with uploaded files.
if you store them somewhere within your application domain, be sure to set iis to deny access to folder where you store these files, as anybody can upload for example aspx page with malicious code and then simply access it and execute this code...
maybe you could write little bit more about purpose of uploading files in your application, so somebody can give you more appropriate answer
Pilo
|
|
|
|
|
plz if anyone has an idea or any articles,tutorials that have the idea bout how to make a site builder (site that create a dynamic sites)
plz help me
thanx
rony
|
|
|
|
|
You can start at the top here: How to get an answer to your question
3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
only two letters away from being an asset
|
|
|
|
|
|
Hi
I have datagrid in asp.net. which contains two columns.And one button name is "save" on my form.
My first column is template column which is checkbox.
Now my Problem is:when i click on save button,I want to check at least one checkbox has to checked.
That's why i want javascript on my save button.How to write javascript for that?
I know hoe to call javascript but how to write means how to take checkbox in javascript?
Thanks
monika
|
|
|
|
|
This article serves your exact problem. http://www.codeproject.com/aspnet/DataGirdCheckBox.asp
Hope this will help you
Thomas
|
|
|
|
|
Hi
Thanks for yr help.
But i think u r not getting my exact problem.
I have datagrid which has first column as template column as checkbox.
Private Sub dg_diagnosis_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dg_diagnosis.ItemCreated
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then
Dim chk As New HtmlInputCheckBox
chk.ID = "chk"
id = chk.ID
e.Item.Cells(0).Controls.Add(chk)
Me.img_save.Attributes.Add("OnClick", "CheckList1();")
End If
End Sub
can u say me how to use this checkbox in javascript?
Hope u getting my question.
Thnaks
monika
|
|
|
|
|
If you still need the solution I can post it.
|
|
|
|
|
|
I have a simple problem with master pages - please have a look:
http://home.icslab.agh.edu.pl/~martinez/asp 1.JPG[^]
The content placeholder is in the middle of the middle cell of my table. How to drag/resize it, so it would cover the whole middle cell? I don`t want my content pages to be limited to be so small.
Thank you very much for any help
|
|
|
|
|
What you are showing is a design view. How content placeholders are shown in the design view has nothing to do with how they are handled when the page executes. A content placeholder has no size, but it is given a size in the design view.
You can't resize the content place holder in the design view for the simple reason that it has no size.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All I have a page in which there are two forms. One form is used to send values to another page. There is no Submit Button for first form. I m using a button of second form. How Can I submit the 1st Form when I click on the Button of Second Form.
|
|
|
|
|
do u mean u have a form and a pop up window?
Best Regards
3ala2
|
|
|
|
|
You can programmatically submit the first form using JavaScript.
document.forms[0].submit();
|
|
|
|
|
I m writing my Problem again my dear.
I have a page in which two forms are used. In the Second Form there is a button. I want to Submit the first Form when some one click on the Button of Second Form. There is no Submit Button in the first Form. How can I do this.
|
|
|
|
|
so create a javascript function, with the line of code given above and call that on click of the button on the 2nd form..
|
|
|
|
|
i have done my project now i have install it how to do in asp.net ,in my project no uploading only e mail sending that can be by by outlook express how to do it?
|
|
|
|