Click here to Skip to main content
15,848,594 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Is there a delicate way to pass calendar events variables in Javascript Pin
Richard Deeming29-Jan-21 1:16
mveRichard Deeming29-Jan-21 1:16 
GeneralRe: Is there a delicate way to pass calendar events variables in Javascript Pin
Member 1505943129-Jan-21 2:58
Member 1505943129-Jan-21 2:58 
GeneralBuild an entire React application in one command Pin
DonJon28-Jan-21 20:22
DonJon28-Jan-21 20:22 
GeneralRe: Build an entire React application in one command Pin
Richard Deeming28-Jan-21 23:14
mveRichard Deeming28-Jan-21 23:14 
QuestionBest way to trace JavaScript Conflict Pin
ReverseAds10-Jan-21 21:35
ReverseAds10-Jan-21 21:35 
QuestionRe: Best way to trace JavaScript Conflict Pin
Sandeep Mewara10-Jan-21 22:13
mveSandeep Mewara10-Jan-21 22:13 
AnswerRe: Best way to trace JavaScript Conflict Pin
20212a15-Jan-21 9:16
20212a15-Jan-21 9:16 
AnswerRe: Best way to trace JavaScript Conflict Pin
F-ES Sitecore28-Jan-21 22:24
professionalF-ES Sitecore28-Jan-21 22:24 
Questionhow to convert a function in to arrow function Pin
Member 139980429-Jan-21 1:56
Member 139980429-Jan-21 1:56 
AnswerRe: how to convert a function in to arrow function Pin
Afzaal Ahmad Zeeshan9-Jan-21 5:35
professionalAfzaal Ahmad Zeeshan9-Jan-21 5:35 
SuggestionRe: how to convert a function in to arrow function Pin
Richard Deeming11-Jan-21 23:41
mveRichard Deeming11-Jan-21 23:41 
QuestionQuiz Issue Pin
Shobhit Rathour30-Dec-20 4:35
Shobhit Rathour30-Dec-20 4:35 
AnswerRe: Quiz Issue Pin
Afzaal Ahmad Zeeshan9-Jan-21 6:02
professionalAfzaal Ahmad Zeeshan9-Jan-21 6:02 
QuestionReplacing the eval() function with something faster, more safe Pin
jkirkerx21-Dec-20 8:52
professionaljkirkerx21-Dec-20 8:52 
AnswerRe: Replacing the eval() function with something faster, more safe Pin
Graham Breach21-Dec-20 9:27
Graham Breach21-Dec-20 9:27 
GeneralRe: Replacing the eval() function with something faster, more safe Pin
jkirkerx21-Dec-20 10:21
professionaljkirkerx21-Dec-20 10:21 
Questionhigher order functions Pin
atomattacker-png21-Dec-20 2:49
atomattacker-png21-Dec-20 2:49 
AnswerRe: higher order functions Pin
Richard MacCutchan21-Dec-20 3:06
mveRichard MacCutchan21-Dec-20 3:06 
GeneralRe: higher order functions Pin
atomattacker-png21-Dec-20 3:21
atomattacker-png21-Dec-20 3:21 
GeneralRe: higher order functions Pin
Richard MacCutchan21-Dec-20 4:13
mveRichard MacCutchan21-Dec-20 4:13 
GeneralRe: higher order functions Pin
Richard MacCutchan21-Dec-20 5:02
mveRichard MacCutchan21-Dec-20 5:02 
GeneralRe: higher order functions Pin
atomattacker-png21-Dec-20 5:36
atomattacker-png21-Dec-20 5:36 
GeneralRe: higher order functions Pin
Richard MacCutchan21-Dec-20 5:44
mveRichard MacCutchan21-Dec-20 5:44 
QuestionAttempting to pre-populate text field and mailto based on ID Pin
Member 1502531419-Dec-20 2:10
Member 1502531419-Dec-20 2: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 14:50
professionaljkirkerx17-Dec-20 14:50 

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.