Click here to Skip to main content
15,881,938 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionhigher order functions Pin
atomattacker-png21-Dec-20 1:49
atomattacker-png21-Dec-20 1:49 
AnswerRe: higher order functions Pin
Richard MacCutchan21-Dec-20 2:06
mveRichard MacCutchan21-Dec-20 2:06 
GeneralRe: higher order functions Pin
atomattacker-png21-Dec-20 2:21
atomattacker-png21-Dec-20 2:21 
GeneralRe: higher order functions Pin
Richard MacCutchan21-Dec-20 3:13
mveRichard MacCutchan21-Dec-20 3:13 
GeneralRe: higher order functions Pin
Richard MacCutchan21-Dec-20 4:02
mveRichard MacCutchan21-Dec-20 4:02 
GeneralRe: higher order functions Pin
atomattacker-png21-Dec-20 4:36
atomattacker-png21-Dec-20 4:36 
GeneralRe: higher order functions Pin
Richard MacCutchan21-Dec-20 4:44
mveRichard MacCutchan21-Dec-20 4:44 
QuestionAttempting to pre-populate text field and mailto based on ID Pin
Member 1502531419-Dec-20 1:10
Member 1502531419-Dec-20 1:10 
Hi, i have created a favourite button which once clicked uses .append to add onto the favourites page the option clicked. I am having difficulties grabbing all the results on that page and displaying it in a textfield which can then be emailed. Below is what i got so far many thanks.

<!-- This is page 1-->
    <div data-role="page" id="item1">


<!-- favourites button-->
          <fieldset data-role="controlgroup" data-type="horizontal">
              <input type="checkbox" name="favourite1" id="favourite1" class="custom">
              <label for="favourite1">Add to favourites</label>
			  <div id="dog"><img id="theImg"  src="images/dog.png" />Where is the image?</div>
           </fieldset>


<!-- This is page 2-->
    <div data-role="page" id="item2">
     
      <div data-role="header" data-position="fixed"> <!-- header-->
        <h1>Item 2</h1>
      </div>


<!-- favourites button-->
         <fieldset data-role="controlgroup" data-type="horizontal">
             <input type="checkbox" name="favourite2" id="favourite2" class="custom">
             <label for="favourite2">Add to favourites</label>
          </fieldset>


<!-- Favourites page -->
   <div data-role="page" id="favourites">

     <div data-role="header" data-position="fixed"> <!-- header-->
       <h1>Favourites</h1>
     </div>

     <div role="main" class="ui-content"> <!-- main contain-->

      <h1>Favourites</h1>

       <!-- buttons allowing navigation to item 1 and item 2-->
         <a href="#item1" class="ui-btn ui-btn-inline">Item 1 page</a>
         <a href="#item2" class="ui-btn ui-btn-inline">Item 2 page</a>

         <div id="favourite-content"><p>My favourites: </p></div>

       <div id="list"
       <form action="mailto:@mail.com Feedback" method="post" enctype="text/plain">
           Email Adress:<br />
       <input type="text" id ="fav" name="email_address" value="" maxlength="100" /><br />

       <input type="submit" value="Submit" />

       </form>
       </div>



$(document).on( 'pagecontainerbeforehide', 'body', function( event, ui){
//do something
if ( ui.nextPage.attr('id')== "favourites") {
$("#favourite-content").html ("");
if ($( "#favourite1" ).is( ":checked" )) {
$("#favourite-content").prepend('<img id="theImg" src="images/dog.png"/>');
}
if ($( "#favourite2" ).is( ":checked" )) {
$("#favourite-content").append("<p>item2 details</p>");
}

}

});


QuestionLooking to run a PHP page in the background using pure Javascript Pin
jkirkerx17-Dec-20 13:50
professionaljkirkerx17-Dec-20 13:50 
AnswerRe: Looking to run a PHP page in the background using pure Javascript Pin
DerekT-P17-Dec-20 22:54
professionalDerekT-P17-Dec-20 22:54 
GeneralRe: Looking to run a PHP page in the background using pure Javascript Pin
jkirkerx18-Dec-20 6:10
professionaljkirkerx18-Dec-20 6:10 
GeneralRe: Looking to run a PHP page in the background using pure Javascript Pin
DerekT-P18-Dec-20 7:11
professionalDerekT-P18-Dec-20 7:11 
GeneralRe: Looking to run a PHP page in the background using pure Javascript Pin
jkirkerx18-Dec-20 7:53
professionaljkirkerx18-Dec-20 7:53 
GeneralRe: Looking to run a PHP page in the background using pure Javascript Pin
DerekT-P18-Dec-20 8:26
professionalDerekT-P18-Dec-20 8:26 
GeneralRe: Looking to run a PHP page in the background using pure Javascript Pin
jkirkerx18-Dec-20 8:47
professionaljkirkerx18-Dec-20 8:47 
AnswerRe: Looking to run a PHP page in the background using pure Javascript Pin
jkirkerx18-Dec-20 12:27
professionaljkirkerx18-Dec-20 12:27 
AnswerRe: Looking to run a PHP page in the background using pure Javascript Pin
jkirkerx18-Dec-20 13:31
professionaljkirkerx18-Dec-20 13:31 
AnswerGot it Pin
jkirkerx18-Dec-20 13:47
professionaljkirkerx18-Dec-20 13:47 
QuestionFinding the definition of a component from the place of its use Pin
simpledeveloper18-Dec-20 19:43
simpledeveloper18-Dec-20 19:43 
QuestionRe: Finding the definition of a component from the place of its use Pin
Richard MacCutchan17-Dec-20 23:39
mveRichard MacCutchan17-Dec-20 23:39 
AnswerRe: Finding the definition of a component from the place of its use Pin
simpledeveloper18-Dec-20 15:40
simpledeveloper18-Dec-20 15:40 
GeneralRe: Finding the definition of a component from the place of its use Pin
Richard MacCutchan18-Dec-20 22:40
mveRichard MacCutchan18-Dec-20 22:40 
Questiondatepicker on button click not working Pin
Dhyanga17-Dec-20 3:45
Dhyanga17-Dec-20 3:45 
QuestionTernary operator Pin
atomattacker-png12-Dec-20 5:06
atomattacker-png12-Dec-20 5:06 
AnswerRe: Ternary operator Pin
Sandeep Mewara12-Dec-20 5:42
mveSandeep Mewara12-Dec-20 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.