Jump to content

Search the Community

Showing results for tags 'append'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 8 results

  1. TULMER

    updatetext

    I need to update over 400 email address in a table in the database. I need to keep the first half of the email address and change everything after the '@' symbol. Example: FROM: john.doe@oldname.com -- TO: john.don@newcompanyname.com Is there any easy way?
  2. Hi, I having problems when I execute (from a JS file) an onclick function by the class that is into an append of another JS file. My code is this: JS File1: var user_tmpl = $('<div />') .addClass('user') .append('<strong/>').find('strong').addClass('titulo').html(item.titulo) .append('<a href="#buscamedioModal" role="button" class="btn btn-danger deletebuscamedio" data-toggle="modal" id=' + item.gid + ' data-name=' + item.titulo + '>Eliminar</a>') .parent(); JS File2 (call): // Configuraciones Generales var boton_eliminar_buscamedio = ".deletebuscamedio"; // Clase // Fin de configuraciones $(document).on('ready',function(){ $(boton_eliminar_buscamedio).on('click',function(e){ e.preventDefault(); var Pid_medio = $(this).attr('id'); alert(Pid_medio); var name_buscamedio = $(this).data('name'); But it seems that it can't run the function because doesn't find the class "deletebuscamedio". Does anyone how to do this? Thank you in advance!
  3. Hey so I have this code, and I start out with my homepage on the screen. If I hover over some images they glow and the source shows up beneath them. Later, if I click the homepage button on my sidebar, it shows the homepage again. This time when I hover over the images they glow, but don't show the image source. Is there something wrong with this code? Please help <script>$(document).ready(function(){ $('.homepage').click(function(){ $('.body').empty(); $('.body').append("<div class = 'homepageappend'>You have the ability to hack into the school computer system. You can change people's grades. Would you change your own? Why or why not? What if you could change the grade for a basketball player who has a scholarship to play for a big university?<img src = 'https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRrkD_SMT5KnbOn-ZuFgCJgdndRePsPgp_wrS_CdW0mBJYThUZC' class = 'aimg'></img><img src = 'https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTOyg8Kshr-w4NSa_mTmCbKhmGP6sZRK3Dp8HfOXMk_gk8OhwBmkw' class = 'bimg'></img><img src = 'https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQjWRNFkzImlS4mz8J7bBefmHvNmNuRTd7Oe7gMcvVS7xDm0U70' class = 'cimg'></img><img src = 'https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSRcOIwNJ1mj627ScV38Dkz_jHFHyFz9IKBa0Lnm611bUBWp_wQ' class = 'dimg'></img></div>"); $('img').mouseenter(function(){ $(this).css('border', '2px solid yellow'); }); $('img').mouseleave(function(){ $(this).css('border', '2px solid black'); }); $('.aimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: [insertimagesource]</p>"); }); $('.aimg').mouseleave(function(){ $('.imagesource').empty(); }); $('.bimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: [insertimagesource]</p>"); }); $('.bimg').mouseleave(function(){ $('.imagesource').empty(); }); $('.cimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: [insertimagesource]</p>"); }); $('.cimg').mouseleave(function(){ $('.imagesource').empty(); }); $('.dimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: [insertimagesource]</p>"); }); $('.dimg').mouseleave(function(){ $('.imagesource').empty(); }); }); $('img').mouseenter(function(){ $(this).css('border', '2px solid yellow'); }); $('img').mouseleave(function(){ $(this).css('border', '2px solid black'); }); $('.aimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRrkD_SMT5KnbOn-ZuFgCJgdndRePsPgp_wrS_CdW0mBJYThUZC</p>"); }); $('.aimg').mouseleave(function(){ $('.imagesource').empty(); }); $('.bimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: [insertimagesource]</p>"); }); $('.bimg').mouseleave(function(){ $('.imagesource').empty(); }); $('.cimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: [insertimagesource]</p>"); }); $('.cimg').mouseleave(function(){ $('.imagesource').empty(); }); $('.dimg').mouseenter(function(){ $('.imagesource').append("<p style = 'font-size: 20px; font-family: corsiva; margin-left: 50px;'>Image Source: [insertimagesource]</p>"); }); $('.dimg').mouseleave(function(){ $('.imagesource').empty(); });});</style> <body> <div class = 'page'> <div class = 'header'>Hacking the School Computer System</div> <div class = 'sidebar'> <button class = 'homepage'>Homepage</button> <button class = 'page2'>Page 2</button> <button class = 'page3'>Page 3</button> <button class = 'page4'>Page 4</button> </div> <div class = 'body'> <div class = 'homepageappend'>You have the ability to hack into the school computer system. You can change people's grades. Would you change your own? Why or why not? What if you could change the grade for a basketball player who has a scholarship to play for a big university?<img src = 'https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRrkD_SMT5KnbOn-ZuFgCJgdndRePsPgp_wrS_CdW0mBJYThUZC' class = 'aimg'></img><img src = 'https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTOyg8Kshr-w4NSa_mTmCbKhmGP6sZRK3Dp8HfOXMk_gk8OhwBmkw' class = 'bimg'></img><img src = 'https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQjWRNFkzImlS4mz8J7bBefmHvNmNuRTd7Oe7gMcvVS7xDm0U70' class = 'cimg'></img><img src = 'https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSRcOIwNJ1mj627ScV38Dkz_jHFHyFz9IKBa0Lnm611bUBWp_wQ' class = 'dimg'></img></div> <div class = 'imagesource'></div> </div> <div class = 'footer'>Created by Brooke Simmerman</div> </div></body>
  4. i'm trying to append some elements with some conditions <script type="text/javascript">function appending() { if ($('#ac_type').value == "Debtors") { $("#append").append( "<p>Test Append Element</p>" ); }}</script> i take value for the if condition and append onBlur from this -- <select name="ac_type" id="ac_type" onkeypress="return tabE(this,event)" onBlur="appending()" /> <option></option> <?php $query = "SELECT * FROM ac_type"; $result = mysqli_query($connect, $query) or die("Unable to select database: " . mysqli_error($connect)); while ($row = mysqli_fetch_array($result)) { echo "<option>" . $row['ac_type'] . "</option>"; } ?> </select> i append the element here-- <tr valign="top"> <td colspan="2"><div id="append"></div></td> </tr> but its not working with the defined condition. but if i remove the condition [ if ($('#ac_type').value == "Debtors") { ] it works...... please guide where i did wrong....
  5. i am trying to create new element that contains a php returned array in it. $( "#invoice" ).append( '<td id="item"><script>getData("items.php", "item")</script></td>'); the array is returned from 'items.php' and is called with simple ajax technique. its not working, or simply i don't know how can i do that. can anyone please guide me or suggest me some better technique...?
  6. I am working on a website for a video game streamer I watch and sometimes he plays with other streamers and viewers want to watch them both or in some cases more than 2, all play at the same time. So there are sites that do "dual streams" that will allow you to show both videos on the same page. My idea was to make something similar but scale-able to however many streams are needed. So far I have js functions with all the HTML needed add the video player but not sure how i would add a new video to the page without having to refresh. I am using the document.getElementByID('streams').innerHTML = mainStream()+newStream(); right now to manually show the primary stream and a image to click on to add another stream. function mainStream() { result = "\t<div id=\"stream1\" class=\"td stream\">\n"+ "\t\t<object type=\"application/x-shockwave-flash\" class=\"stream-object\" data=\"http://www.twitch.tv/widgets/live_embed_player.swf\" width=\"100%\" height=\"100%\" style=\"visibility: visible; \">\n"+ "\t\t<param name=\"allowFullScreen\" value=\"true\">\n"+ "\t\t<param name=\"allowScriptAccess\" value=\"always\">\n"+ "\t\t<param name=\"allowNetworking\" value=\"all\">\n"+ "\t\t<param name=\"wmode\" value=\"transparent\">\n"+ "\t\t<param name=\"flashvars\" value=\"hostname=www.twitch.tv&channel=the_black_russian&auto_play=true&start_volume=100\"></object>\n"+ "\t</div>\n"; return(result); } function newStream(streamNum) { result = "\t<div id=\"stream"+streamNum+"\" class=\"td newStream\" onclick=\"getStream()\">\n"+ "\t\t<img src=\"lib/new_stream.fw.png\" style=\"width:100%; height:100%\" alt=\"new stream\" title=\"Click to open a new stream...\" />\n"+ "\t</div>\n"; return(result); } In hard code it would look like this when printed: <div id="streams"> <div id="stream1" class="td stream" style="width: 301px; height: 169.3125px;"> <object type="application/x-shockwave-flash" class="stream-object" data="http://www.twitch.tv/widgets/live_embed_player.swf" width="100%" height="100%" style="visibility: visible; "> <param name="allowFullScreen" value="true"> <param name="allowScriptAccess" value="always"> <param name="allowNetworking" value="all"> <param name="wmode" value="transparent"> <param name="flashvars" value="hostname=www.twitch.tv&channel=the_black_russian&auto_play=true&start_volume=100"></object> </div> <div id="stream2" class="td newStream" onclick="getStream()" style="width: 301px; height: 169.3125px;"> <img src="lib/new_stream.fw.png" style="width:100%; height:100%" alt="new stream" title="Click to open a new stream..."> </div></div> What I am looking to do is when someone triggers getStream() for it to add another stream and list the newStream() code last. This would make the new stream #2 and push the open a new stream part to stream #3. I also would like to add in functionality to close a specific stream. Any help is much appreciated! If I did not explain enough please let me know I will try my best to fill in any details I may have missed.
  7. http://jsbin.com/azipok/2/edit this piece of code does the trick of clearing up the option list of select menu and adding a "test" message, but this message becomes visible only upon dropping down the select menu. is there a way to make this "test" message display and replace the "no modules..." text upon clicking the button?
  8. Hi folksI'm trying to initiate a click event (and subsequent image fade in) when a user clicks on a thumbnail. That in itself isn't such a problem. The problem lies in the fact that the thumbnails are contained in an array and are displayed with an append within an each loop (see code below). I've gotten halfway there, the code below does initiate a fade in when a thumbnail is clicked - however, it fades in all the images as opposed to just the one relating to the thumbnail that is clicked on. I know this is because by the time the #test append happened all the images have loaded so it just displays all of them. The question is, how can I get it to just display the full image related to the thumbnail that's been clicked on? I'm pretty new to this so apologies if this seems a bit pedestrian. Thanks in advanceStef For reference purposes:array[0] refers to id of imagearray[6] is the thumbnail urlarray[7] is the full image urlarray[8] & array[9] are x and y coordinates of the thumbnail on the page function display (array) { $.each(array, function(i){ $('#container').append( '<div id="'+array[i][0]+'" style="position: absolute; left:'+array[i][8]+'px; top: '+array[i][9]+'px;"><img src=images/'+array[i][6]+' id=nav width=85 height=85></div>' ); $('#test').append( '<div id="'+array[i][0]+'" style="width: 398px;"><img src=images/'+array[i][7]+' id=nav width=398>' ); $("#"+array[i]).click(function () { $("#test").fadeIn('slow', function () {// animation complete}); }); });} Full page attached upload.php
×
×
  • Create New...