Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ed_T_
Beginner
54 Views

passing values to a sub_page

I'm having a problem passing data from a javascript to a <div> when using activate sub_page.

index.html:
 

<div id="uib_page_5" class="upage-content vertical-col left hidden">
                    <div class="grid grid-pad urow uib_row_4 row-height-4" data-uib="layout/row" data-ver="0">
                        <div class="col uib_col_4 col-0_12-12" data-uib="layout/col" data-ver="0">
                            <div class="widget-container content-area vertical-col">
                                <button class="btn widget uib_w_5 d-margins btn-xs btn-primary" data-uib="twitter%20bootstrap/button" data-ver="1" id="home"><i class="glyphicon glyphicon-remove button-icon-left" data-position="left"></i>Close</button>
                                <div class="tarea widget uib_w_4 d-margins eventhed" data-uib="media/text" data-ver="0" name="uib_w_4">
                                    <div class="widget-container left-receptacle"></div>
                                    <div class="widget-container right-receptacle"></div>
                                    <div class="text-container">
                                        <p>Events This Week</p>
                                        <div class="accordine">aaaaaaaaa</div>
                                    </div>
                                </div>
                                <span class="uib_shim"></span>

                            </div>
                        </div>
                        <span class="uib_shim"></span>
                    </div>

                </div>

In apps.js:

    $("#accordine").html("bbbbbbbbbbbbbbb");
    activate_subpage("#uib_page_5"); 
    return false;    

The string in the <div> is unchanged. I've tried the activate_subpage both before and after the .html()

Makes no difference.

Should I be using a different method? I'm wanting to build an html string that will create collapsible accordian panels on the subpage when passed this way.

Thanks in advance, and Happy Holidays

Ed

 

Tags (2)
0 Kudos
3 Replies
PaulF_IntelCorp
Employee
54 Views

Unless I've missed it, I only see "accordine" being used as a style name, not as an ID, which is what your jQuery expression is looking for (it is looking for an element with an ID of "accordine" not for an element that contains a class name of "accordine").

Ed_T_
Beginner
54 Views

Paul,

 

Thank you for not castigating me as a complete and total idiot, and gently reminding me I was using the wrong selector symbol.

Frankly you could have dismissed me as a crackpot, ejecting me from the game,  and sent me to the stackoverflow showers. Instead you gently reminded me that althoug Al Gore and I invented this stuff, dementia will finally rob you of your wizarding powers.

Thank you for your patience. I know I'm old and becoming senile, but dammit how many 65 year old guys you know still tring to keep up on this stuff?

XDK effin rocks.You have the finest tool for building Cordova apps ever. I'm sure that soon you will get me to branch out into the Internet of Things. Which will be a mixed blessing since you will have to field stupid questions from a teacher who once told students, "Why no there are no stupid questions, only stupid answers.At least not until I ask them.

Humbled, I stumble on to the next crossroads. Hopefully to live and learn another day.

Regards to you and yours on this holiday season. With prayers going out for the late Andy Grove, whom I met once, and to Gordon Moore, whom I didn't.

Thanks.Merry Christmas, Happy Hanukkah, Festivus, Kwanza, et al.

Ed

PaulF_IntelCorp
Employee
54 Views

You're welcome, Ed. I've been known to ask a lot of "dumb questions" only to have someone come up to me later and say something like, "I'm so glad you asked that question! I wanted to ask the same thing but thought it would be a dumb question."

Happy Holidays to you, too.

Reply