•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,534 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,047 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2763 | Replies: 3
![]() |
•
•
Join Date: Oct 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
hi guys, well i have created a repeater control and have made it expand on mouseover by using javascript , also i have returned the value of an id in a label on mouse click. i want to make the datalist on the page visible ob this click and also send this id to the datalist .. problem is this can be done as the label's value can be checked on page load and on page load , the label loses the value passed to it in jscript .... please help
•
•
Join Date: Sep 2007
Posts: 1,058
Reputation:
Rep Power: 4
Solved Threads: 61
well it is hard to understand exactly where the problem is. From what I read, I believe you are losing the label's value that is being sent to the javascript when you click on the label? Go step by step so a first grader can understand:
1. created a repeater control to expand on mouseover using javascript.
2. onclick of a label? javascript retrieves the label's id and sends it to the datalist that becomes visible on this click also. What are you clicking, a label, hyperlink, or button?
You can always send the value via querystring if that isn't a problem, otherwise you can use the viewstate to hold the value for you. This only works on postbacks though.
Like I said, I am not quite exactly sure what you're doing. Maybe post some code?
If you want to pass the id to the datalist and activate the datalist onclick, you should make the datalist visible via the block method in jscript. Create a function in javascript that retrieves both the current id of the current label and sets visibility of the datalist to block.
But if your datalist requires the id from the label, then you need to do a postback. Then why use javascript to pass the id? Explain please.
1. created a repeater control to expand on mouseover using javascript.
2. onclick of a label? javascript retrieves the label's id and sends it to the datalist that becomes visible on this click also. What are you clicking, a label, hyperlink, or button?
You can always send the value via querystring if that isn't a problem, otherwise you can use the viewstate to hold the value for you. This only works on postbacks though.
Like I said, I am not quite exactly sure what you're doing. Maybe post some code?
If you want to pass the id to the datalist and activate the datalist onclick, you should make the datalist visible via the block method in jscript. Create a function in javascript that retrieves both the current id of the current label and sets visibility of the datalist to block.
But if your datalist requires the id from the label, then you need to do a postback. Then why use javascript to pass the id? Explain please.
•
•
Join Date: Oct 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
hi pregy
well i have a repeater , in which i am using javascript to hide and show details of a heading on mouse over, each row has details of a employee, when clicked on this row , i want to make a datalist on same page to be made visible , that is quite possible but i have to supply emp id to the datalist too so that it can show details accordingly . when i post this value to a label , i am not able to read the same , because the value to the label is supplied by javascript and if i have to check and load in datalist , page has to be loaded back , which in turn clears the id.
my options are, either i put this bvalue some how into viewstate which is very ditchy or in cookies etc . problem is to make the id t/f from client side to server side . i'm working upon using hidden textboxes
well i have a repeater , in which i am using javascript to hide and show details of a heading on mouse over, each row has details of a employee, when clicked on this row , i want to make a datalist on same page to be made visible , that is quite possible but i have to supply emp id to the datalist too so that it can show details accordingly . when i post this value to a label , i am not able to read the same , because the value to the label is supplied by javascript and if i have to check and load in datalist , page has to be loaded back , which in turn clears the id.
my options are, either i put this bvalue some how into viewstate which is very ditchy or in cookies etc . problem is to make the id t/f from client side to server side . i'm working upon using hidden textboxes
•
•
Join Date: Oct 2007
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
hey peggy , u r quite right , i should use server side coding to send id , thanks , i shall tell u after doing
saurabh
saurabh
•
•
•
•
well it is hard to understand exactly where the problem is. From what I read, I believe you are losing the label's value that is being sent to the javascript when you click on the label? Go step by step so a first grader can understand:
1. created a repeater control to expand on mouseover using javascript.
2. onclick of a label? javascript retrieves the label's id and sends it to the datalist that becomes visible on this click also. What are you clicking, a label, hyperlink, or button?
You can always send the value via querystring if that isn't a problem, otherwise you can use the viewstate to hold the value for you. This only works on postbacks though.
Like I said, I am not quite exactly sure what you're doing. Maybe post some code?
If you want to pass the id to the datalist and activate the datalist onclick, you should make the datalist visible via the block method in jscript. Create a function in javascript that retrieves both the current id of the current label and sets visibility of the datalist to block.
But if your datalist requires the id from the label, then you need to do a postback. Then why use javascript to pass the id? Explain please.
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Javascript + HTML DOM problem (JavaScript / DHTML / AJAX)
- Button can't display when selected tabpage is visible, Bug? (C++)
- making window visible after combo keys (?) (C#)
- is there any way I can make a copy of windows xp???? (Windows NT / 2000 / XP / 2003)
- ODBC setup with Online Access DB (MS Access and FileMaker Pro)
Other Threads in the ASP.NET Forum
- Previous Thread: Programmer needed
- Next Thread: Add weather to page.



Linear Mode