Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. javascript problem in webpart [modified]

javascript problem in webpart [modified]

Scheduled Pinned Locked Moved ASP.NET
helpjavascripthtmltutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dhruvil
    wrote on last edited by
    #1

    Hello All, I have a datagrid control on webpart, in which I am displaying two out of six columns from a dataset. When somebody click on one row, I want to display all six values for that row on the same webpart without postback. i made this datagrid clickable. i m passing value using the following code. public void dgSpeakerEvents_ItemDataBound(object sender, DataGridItemEventArgs e) { if(e.Item.DataItem!=null) { e.Item.Attributes.Add("onmouseover","this.style.cursor='hand'"); e.Item.Attributes.Add("onclick","ShowDetails('"+ DataBinder.Eval(e.Item.DataItem, "TOPIC_NM").ToString()+ "','"+ DataBinder.Eval(e.Item.DataItem, "CITY").ToString()+ "','"+ DataBinder.Eval(e.Item.DataItem, "STATE").ToString()+ "');"); //e.Item.Attributes.Add("onmouseout", "HideTooltip();"); } } but when i clicked on datagrid, it shows an error: object expected. i checked in the html source code generated by the browser, values passing correctly. my javascript function is :

    function detail() { function ShowTooltip(name,city,state) { document.getElementById('td0').innerText=name; document.getElementById('td1').innerText=city; document.getElementById('td2').innerText=state; X=event.clientX+document.body.scrollLeft; Y= event.clientY + document.body.scrollTop + 10; Popup.style.display='block'; Popup.style.left = X; Popup.style.top = Y; } } function HideTooltip() { Popup.style.display='none'; } If any body can suggest me with good example.Thanks. Dhruvil -- modified at 16:53 Monday 19th June, 2006

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups