Current location: Hot Scripts Forums » General Web Coding » JavaScript » [SOLVED] AJAX: collapsible panel


[SOLVED] AJAX: collapsible panel

Reply
  #1 (permalink)  
Old 06-23-08, 02:01 PM
mariowowo mariowowo is offline
Newbie Coder
 
Join Date: Jun 2008
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] AJAX: collapsible panel

Well don't know if thius thead belongs here or ASP.NET.
I want to run a js when extend/collapse event of this AJAX component runs. Actually I can run my js but It seems AJAX overwrites it. I want to change an ASP:LABEL's text.
Reply With Quote
  #2 (permalink)  
Old 06-24-08, 01:45 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
Im sorry, i just cant make any sense of what you wrote. Maybe you could post some code and try to explain thoroughly what your trying to accomplish and what kind of problems your facing.
Thanks
Reply With Quote
  #3 (permalink)  
Old 06-24-08, 07:18 AM
mariowowo mariowowo is offline
Newbie Coder
 
Join Date: Jun 2008
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
OK.

got this AJAX code:

Code:
<ajaxToolkit:CollapsiblePanelExtender ID="CollapsiblePanelDataMDC" runat="server" BehaviorID="collapsibleBehavior"
    TargetControlID="pnlDataMDC"
    ExpandControlID="tdExpandeCollapseDataMDC"
    CollapseControlID="tdExpandeCollapseDataMDC"
    ImageControlID="imgExpandCollapseDataMDC"
    Collapsed="true"
    ExpandedText="Some text"
    TextLabelID="lblPressMoreLessDesc"
    CollapsedText="Some other text"
    SuppressPostBack="true"
    />
and this js in the same page:

Code:
<script>
function pageLoad(sender,args){

$find("collapsibleBehavior").add_expandComplete( expandHandler )

$find("collapsibleBehavior").add_collapseComplete( collapseHandler )

}

function expandHandler( sender  , args ){
document.getElementById('ctl00_MainContent_lblPressMoreLessDesc').value = "Change Some Text"
}

function collapseHandler( sender  , args ){
document.getElementById('ctl00_MainContent_lblPressMoreLessDesc').value = "Change Some Other Text"
}
</script>
this js works OK but it seems to me that the js runs first and then the AJAX code and this last one erases the text I changed and puts its own and I want to do the opposite.
Hope I made it clear now. Sorry but English is not my native language.
Reply With Quote
  #4 (permalink)  
Old 06-25-08, 01:31 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
http://www.covertcoder.com/Topic.asp...G2exuHWwAeUB4A
Is that relevant in any way?

I've never touched ASP.NET, maybe this should be in that forum since we're dealing with asp controls?
Reply With Quote
  #5 (permalink)  
Old 06-25-08, 07:59 AM
mariowowo mariowowo is offline
Newbie Coder
 
Join Date: Jun 2008
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by <?Wille?> View Post
http://www.covertcoder.com/Topic.asp...G2exuHWwAeUB4A
Is that relevant in any way?

I've never touched ASP.NET, maybe this should be in that forum since we're dealing with asp controls?
Yes it worked!!!

but had to change .value for .innerText

Code:
$get("ctl00_MainContent_lblPressMoreLessDesc").innerText = "Change Some Text"
Thanks a lot...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BOTTOM sliding panel. TheMexican Flash & ActionScript 2 05-20-08 12:25 PM
I'm having trouble with rollover sliding panel. TheMexican Flash & ActionScript 1 05-20-08 11:11 AM
Select radioButton, switch panel in C#/.net bscsGrad Windows .NET Programming 4 08-22-06 08:31 PM
Free windows hosting contorl panel parsv ASP 0 09-10-05 03:54 AM


All times are GMT -5. The time now is 11:39 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.