|
Have you read the documentation for JQuery?
$(document).ready(function()
{
$("tr.hidden").hide();
$("button").click(function(){ $("tr.hidden").show(); });
}
This script will run when the page is loaded and hide any TR element with the class hidden. It will also hook up the click event of the button to show all TR elements with the class hidden when clicked.
I know the language. I've read a book. - _Madmatt
modified on Tuesday, February 9, 2010 8:26 PM
|
|
|
|
|
Hi
Yes, I had a brief look at the article, and I got the general idea. You to excuse my ignorance, but I have never used JQuery before. So, it take me a few days to get use to it.
However, in my current JavaScript, I have a function which I have called ShowAll. This function does the reverse what I really want to do. To get to my gridview, I am using getElementByID to find the div where the gridview I want to use is located, and then childNodes for the gridview I want. To get to the rows, I am using getElementsByTagName to find all the rows, and then a for loop with an if for the logic.
So, my question is whether I can nest the JQuery into the JavaScript to work with the gridview I want. Is this possible?
|
|
|
|
|
AndyASPVB wrote: I had a brief look at the article
One, it is an entire website, not an article. Two, take a better look and your question will be answered.
Your JavaScript, as you describe it, is convoluted and unnecessary and shows a lack of understanding about how to use JavaScript. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi
I am not sure what has happened here, but I have 3 panels, and these 3 panels are nested inside one large, thus:
<asp:panel id="pnlMain" runat="server" height="60%" width="100%">
<asp:panel id="panel1" runat="server" height="100%" width="100" scrollbars="vertical">
<asp:panel id="panel2" runat="server" height="100%" width="100" scrollbars="vertical">
<asp:panel id="panel3" runat="server" height="100%" width="100" scrollbars="vertical">
What is happening is that when I add my gridviews to these nested panels, the panel is just getting larger, the scroll bars are not scrolling, in other words the panels are stretching rather than their height staying fixed.
How do I fix this?
Thanks
|
|
|
|
|
Because you are specifying the heights to be a percentage, not a fixed size. It's doing as you have asked. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Wouldn't setting the size as a pixel stop the panel fitting any browser size resolution?
|
|
|
|
|
You can't have it both ways I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Why dont you post your query in Site Bugs/Suggestions Section? Cheers!!
Brij
|
|
|
|
|
Hi, i created a simple web application in which App_Data folder contains .mdf and .ldf files. When i try to publish this application i am getting below error.
"Error 1 The process cannot access the file 'D:\Projects\SqlTest\App_Data\MyTestDB.mdf' because it is being used by another process."
How can i resolve this issue?G. Satish
modified on Tuesday, February 9, 2010 10:27 AM
|
|
|
|
|
Find which process is using it and kill that process. "No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
|
|
|
|
|
Hello,
Anybody can explain me how to create onclick event for label and textbox in Asp.net ?
because i have some task to be achieved on click event of textbox and label control?
Please help or provide any alternate solution?
Regards
|
|
|
|
|
Have a look into the Javascript events available. You can have a click event there and handle it in javascript. "No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
|
|
|
|
|
you can attach onclick event on label and textbox at server side as below
Label1.Attributes.Add("onclick", "javascript:alert('you have pressed Label')");
TextBox1.Attributes.Add("onclick", "javascript:alert('you have pressed Textbox')"); Cheers!!
Brij
|
|
|
|
|
hi,
i added button into gridview at designtime in first column.
after running the application if gridview get populated with data.
suppose it contain 4 rows.
if user click on button of 2nd row,i want show the message that you clicked 2nd row.
i.e. according to clicking of button i want to show the message of which row was clicked.
but how can i identify which button was clicked....
please, help me....
|
|
|
|
|
In the OnRowCreated event, assign the javascript click event and send the row index to it. That index you can then access in the server side click event through a hidden field. "No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
|
|
|
|
|
Use a button column and you don't need to do any of this. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
do you want to show the alert from javascript? Cheers!!
Brij
|
|
|
|
|
Use a button column or template column and specify the onclick even handler for client-side processing or handle the event on the server-side I know the language. I've read a book. - _Madmatt
|
|
|
|
|
ya i used template column for the button and assign the event handler.
and when i clicked on button it goes to that event.
but i want to know the row index of that row where the button is located(which get clicked)
can you provid me code .....
actualy, i am showing the booking status in that gridview,first the status is 'in process'
after clicking on button which is in gridview, it should the modal popup,in modal popup
after clicking on 'ok' button, the status of booking should replaced with 'cancel req.'
and for this purpose i want to know the row index of that gridview...
so please, help me...modified on Thursday, February 11, 2010 12:34 AM
|
|
|
|
|
thanks to all of you by helping me
i the problem get solved by me...
i get the rowindex of the button by rowIndex of button's parent's parent
this is written at the event which is assigned to the button at design time in template column...
i.e.
Protected Sub btnCancelClick(ByVal sender As Object, ByVal e As System.EventArgs)
Dim intRowIndex as Integer=sender.Parent.Parent.RowIndex
End Sub
BUT THANKSSSS To all of You....!
|
|
|
|
|
Hi,
I have developed small web application using ASP.Net and MySQL. I need to access this application using IP address from my friend system(In Office). Is it possible? I am having Windows XP.
Note:
From Windows 2003 Server I am hosting that web application and changed localhost to IP Address and its possible to access from others system. (ie) Server IP address (http://192.145.1.20/VDR/Login.aspx)
How to acheive by Windows XP with IIS?
Thanks,
Subbu
|
|
|
|
|
no this is not possible in windows xp.
|
|
|
|
|
How to stop the submit behavior of a Button(Server Ctrl)
|
|
|
|
|
Attach onClientClick event in at client side and call a javascript method which return false. Cheers!!
Brij
|
|
|
|