Search Results

Search found 2764 results on 111 pages for 'onclick'.

Page 11/111 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Href link with OnClick event

    - by Aruna
    Hi, i am having a link like below where on click of that twitter , i need to open the twitter page with the message given in $markme_ddesc but instead when i click on the link , it simply moves to twitter.com without opening in a new window and with the message.. Why so? how to resolve this?? Please help me..

    Read the article

  • Onclick event; If and Else

    - by Kyle Gagnon
    All right so I am doing a javascript code for a login type form and it will lead you to a new page. Here it is: function submit1() { var x=document.getElementById("username"); var y=document.getElementById("password"); if (x.value=="username" && y.value=="password") { window.location="Example.php"; } else { window.alert=("The information you have submitted is incorrect and needs to be submitted again!"); } } When ever I am hitting the submit button it takes me straight to the page instead of checking to see if it right. Please help! Thank you in advanced! To let you know this is not a permanet login page!

    Read the article

  • jQuery - OnClick, change background color for table cells

    - by andrew
    Hi all, Let me show you a demo: here it is working for only rows. its not working for cells. i want to change cells' (tds') background colors with mouse clicks. For example: a have a table, and it has 4 tds. table's background color is white. if i click to a td, a td should be red, than if i click to b, b td should be red and a td should be white again. if i click to c than, c should be red and b should be white right now. A - B C - D Can anyone help me?

    Read the article

  • Changing the onClick area when adding an event

    - by Josh Breslow
    Is there anyway to change what a user clicks on to add an event? Right now the entire day is clickable. This becomes an issue when the user needs to put focus back on that window, requiring a mouse click. If they click on the calendar, which takes up most of the page, then they launch the "Add Event" function. Is there a way to have a Plus sign (+), or whatever symbol in each day that when clicked, launches the "Add Event" function? Or... Is there a way to have a button across the top that said, "Add Event"?

    Read the article

  • Textbox LostFocus event fires after Command Button's OnClick event

    - by Homam
    Hi all, I have a TextBox and a ToolStripButton in a windows forms application, the TextBox implements an event handler for the LostFocus event, and the ToolStripButton implements an event handler for the Click event, but the TextBox LostFocus event fires after the ToolStripButton Click event, which event in TextBox fires before ToolStripButton click event ?

    Read the article

  • how to add url in onclick function????

    - by rajesh
    i have line new_element.innerHTML =""; which will call the function addWidget as function addWidget(url) { alert(url); var main= document.getElementById('mainwidget'); main.innerHTML = ""; } but its not working whats the problem...

    Read the article

  • Prototype function to set onclick event observer in checkboxes

    - by xain
    Hi, I want to set an observer for each of the following checkboxes: <div id="listr"> <ul id="lr" style="list-style-type: none"> <p class="tir">Text 1</p> <li class="ro"><input type="checkbox" name="r1" id="r1"/>A1</li> <li class="ro"><input type="checkbox" name="r2" />A2</li> <p class="tir">Text 2</p> <li class="rubro"><input type="checkbox" name="r3" />B1</li> <p class="tir">Text 3</p> <li class="ro"><input type="checkbox" name="r4" />B2</li> </ul> </div> It works if I write one observer per checkbox, but I want to do it in a short fashion, so I need something like $$('listr.lr.li.input').invoke('observe',click,function(field) { alert(this.name + ' clicked ' + this.checked); // other stuff ... }); Which is not working Thanks in advance

    Read the article

  • javascript getting complete code of element when mouseover or onclick

    - by oimoim
    Hi, How can I get the complete html code of the element i'm mouseovering or clicking ? Using document.onmouseover = function(e){ can I get the full underlying html code of the element which triggered the event ? Right now, I am able to get the tag name or id or whatever. What I would like is the whole code. For example; if I'm mouseovering a table, I would like to get the string : <table><tr><td></td></tr></table> Is this possible ?

    Read the article

  • jquery append row onclick

    - by BigDogsBarking
    Pretty new to jQuery, so I'm hoping someone can help me out... There's a couple of things going on here... Help with any part of it is appreciated. For starters, I'm trying to append a row to a table when a user clicks in the first enabled input field for that row. Here's the code I'm trying to use: $("#fitable > tbody > tr > td > input").bind('focus', function() { if($(this).attr('disabled', false)) { $(this).click(function() { var newRow = '<tr><td><input name="f1[]" value="" /><label>CustNew</label></td><td><input name="field_n1[]" value="" /><label>N1</label></td><td><input name="field_n2[]" value="" /><label>N2</label></td></tr>'; $(this).closest("tbody").append(newRow); }); } }); If it's helpful, here's the html: <table id="fitable"> <tbody> <tr valign="top"> <td><input disabled="disabled" name="cust" id="edit-cust" value="[email protected]" type="text"><label>Cust</label></td> <td><input name="field_n1[]" value="" type="text"><label>N1</label></td> <td><input name="field_n2[]" value="" type="text"><label>N2</label></td> </tr> </tbody> </table>

    Read the article

  • Image swap with a javascript onclick dropdown menu

    - by AzzyDude
    So I've got this code that has an image and when you click it a dropdown menu appears. Pretty simple. The code works fine but I'm trying to incorporate an image swap on click and I'm having difficulty. Here's the HTML and the JS (there's some CSS too, but I'll leave that out): HTML: <div id="header"> <dl class="dropdown"> <dt><a href="#"><img src="images/cogwheel_btn.png"/></a></dt> <dd> <ul> <li><a href="#">Favorites</a></li> <li><a href="#">History</a></li> </ul> </dd> </dl> </div> JS: $(document).ready(function() { $(".dropdown img.flag").addClass("flagvisibility"); $(".dropdown dt a").click(function() { $(".dropdown dd ul").toggle(); }); $(".dropdown dd ul li a").click(function() { var text = $(this).html(); $(".dropdown dt a span").html(text); $(".dropdown dd ul").hide(); $("#result").html("Selected value is: " + getSelectedValue("sample")); }); function getSelectedValue(id) { return $("#" + id).find("dt a span.value").html(); } $(document).bind('click', function(e) { var $clicked = $(e.target); if (!$clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide(); }); $("#flagSwitcher").click(function() { $(".dropdown img.flag").toggleClass("flagvisibility"); }); });? I've tried adding lines like ("dt").empty(); and then ("dt").html("new_image") but it causes the dropdown functionality to stop working. Anyone any ideas?

    Read the article

  • silverlight button onClick event

    - by Anish Mohan
    Hi, Might be this question a blunder :(... I have a a button in silverlight application... <Button Height="25" Width="100" Grid.Column="0" Grid.Row="0" Click="Button_Click"/> I read that silverlight need WCF to interact with server side... So is it like to access my "Button_Click" event I need WCF ?

    Read the article

  • onclick event in combo box

    - by raam
    function ram(){ document.write("Hello World!") alert("ok"); } India Autralia England Ameriaca Pakistan In this above code the event will not fire for combo box ..i try by using focus and click event....i can i do this....and i want 1 more thing if i select combo box value as India,i want to create a combo box with state(elements are TN,DL..) updation...

    Read the article

  • JQuery Onclick display selected info

    - by Emily
    I want to display the selected price, category and size on the dropdown slideingDiv. But what I have done below is not working. I have try to echo out to see if the data have been sent thought but I got nothing. Is anything wrong with my code? Script <script type="text/javascript"> $(document).ready(function () { $(".slidingDiv").hide(); $(".show_hide").show(); $('.show_hide').click(function () { $(".slidingDiv").slideToggle(); }); }); </script> Button <button a href="product.php?ProdID=<?php echo $id; ?>" class="show_hide" id="button" name="button">Add to cart</a></button> PHP <div class="slidingDiv"> <?php dbconnect(); $pid = $_POST['pid']; $length = $_POST["size"]; $qty = $_POST['Qty']; $Category = $_POST['Category']; $stmt4 = $conn->prepare(" SELECT Product.Name as ProductName, Category.Name, size, Price FROM item_Product, Product, Category WHERE Product.ProdID =:pid AND size= :length AND Category.Name = :Category Limit 1"); $stmt4->bindParam('pid',$pid); $stmt4->bindParam('length',$length); $stmt4->bindParam('Category',$Category); $stmt4->execute(); foreach ($stmt4->fetchAll(PDO::FETCH_ASSOC) as $row4 ) { $product_name = $row4["ProductName"]; $price = $row4["Price"]; $length = $row4["size"]; $Category = $row4["Name"]; ?> Item was added shopping bag </br> Name:<?php echo $row4['ProductName']; ?> </br> Length:<?php echo $row4['size']; ?> </br> Category:<?php echo $row4['Name']; ?> </br> Price:<?php echo $row4['Price']; ?> </br> <?php } ?> <a href="cart.php">View Cart</a> </div>

    Read the article

  • JQuery Slide Onclick

    - by everreadyeddy
    I am using the code in example http://www.faridesign.net/2012/05/create-a-awesome-vertical-tabbed-content-area-using-css3-jquery/ I am trying to slide the div tags on a button click on the list so the current tab-content will slide in and the tab just clicked will slide out. I currently have the working example where I can switch between divs fine, but I need to slide in and out between divs. Is there any script I can do this with the current code. using .slide or .effect instead of .show() looks to display two divs at the same time. I'm not sure what I am doing wrong. <div id="v-nav"> <ul> <li tab="tab1" class="first current">Main Screen</li> <li tab="tab2">Div 1</li> <li tab="tab3">Div 2</li> <li tab="tab4">Div 3</li> <li tab="tab5">Div 4</li> <li tab="tab6">Div 5</li> <li tab="tab7">Div 6</li> <li tab="tab8" class="last">Div 7</li> </ul> <div class="tab-content"> <h4>Main Screen</h4> </div> <div class="tab-content"> <h4>Div 1</h4> </div> <div class="tab-content"> <h4>Div 2</h4> </div> <div class="tab-content"> <h4>Div 3</h4> </div> <div class="tab-content"> <h4>Div 4</h4> </div> <div class="tab-content"> <h4>Div 5</h4> </div> <div class="tab-content"> <h4>Div 6</h4> </div> <div class="tab-content"> <h4>Div 7</h4> </div> My Script looks like $(function () { var items = $('#v-nav>ul>li').each(function () { $(this).click(function () { //remove previous class and add it to clicked tab items.removeClass('current'); $(this).addClass('current'); //hide all content divs and show current one //$('#v-nav>div.tab-content').hide().eq(items.index($(this))).show(); //$('#v-nav>div.tab-content').hide().eq(items.index($(this))).fadeIn(100); $('#v-nav>div.tab-content').hide().eq(items.index($(this))).slideToggle(); window.location.hash = $(this).attr('tab'); }); }); if (location.hash) { showTab(location.hash); } else { showTab("tab1"); } function showTab(tab) { $("#v-nav ul li:[tab*=" + tab + "]").click(); } // Bind the event hashchange, using jquery-hashchange-plugin $(window).hashchange(function () { showTab(location.hash.replace("#", "")); }) // Trigger the event hashchange on page load, using jquery-hashchange-plugin $(window).hashchange(); });

    Read the article

  • Showing multiple elements onClick

    - by Nimbuz
    HTML: <ul id="mode"> <li><a href="#tab1">tab1</a> <div class="extra">tada</div> </li> <li><a href="#tab2">tab2</a> <div class="extra">tada</div> </li> </ul> <div id="tab1" class="tab-content" style="display: none">content 1</div> <div id="tab2" class="tab-content" style="display: none">content 2</div> ? jQuery: $(function(){ var mode = $('#mode'); var arrow = $('<span/>', {'class': 'arrow'}); $('li a', mode).bind('click.mytabs', function() { $('li', mode).removeClass('active'); $(this).parent().addClass('active').append(arrow); var a = $(this).attr('href'); $('.tab-content').hide(); $(a).show(); return false; }).filter(':first').triggerHandler('click.mytabs'); // eq(0) works as well }); JSFiddle here: http://jsfiddle.net/wwMJL/ I'd like to also show each li's 'extra' div on click and hide when the tab is inactive, what do I need to change in the code? Thanks!

    Read the article

  • simple jquery image change onclick failing

    - by ian
    I have a simple jQuery image switch that is failing. $('.heart_img').click(function() { var heart_type = $(this).attr('src'); //alert( heart_type ); if ( heart_type == 'images/unheart.png') { //alert('uheart'); $(this).attr('src','images/heart.png'); } else if ( heart_type == 'images/heart.png'); { $(this).attr('src','images/unheart.png'); } }); The alerts fire correctly when not commented out so and the images are in the correct place so I am not sure what the problem is.

    Read the article

  • Loading HTML5 video on iPad via onclick event tied to a div

    - by joncys
    I'm developing an HTML5 application (a game), that automatically preloads 5 video files. I'm able to do so correctly on Safari for PC, so there are no overlooked problems with file formats, codecs or such. The load fails on an iPad. As an official guide for video on iOS puts it: This means the JavaScript play() and load() methods are also inactive until the user initiates playback, unless the play() or load() method is triggered by user action. In other words, a user-initiated Play button works, but an onLoad="play()" event does not. Does this mean, that I have no means to initiate the loading of video after a user initiated action, if that action hasn't been tied to a video element (user clicked on a regular div — I request loading and displaying of a video, compared to the user actually clicking on a video element to load and play that particular element)? Thanks for your help!

    Read the article

  • Toggle DIV and SPAN text onclick

    - by philipryoung
    I have been trying to mimic this website http://www.designrattan.co.uk/daybed/apple for a while now. I need to make a page where the customer can click "View 360" and then it changes the DIV to show the product 360 (for which I already have the code for). I also need to make it so that when it is clicked the span text then changes to "Back to Image" I have tried many times and have failed to get the Javascript code and HTML to work well together. My efforts can be seen here: http://designliving.tk/winchester-rattan-garden-round-table-set As you can see it is a complete fail as it doesn't change the DIV it just displays a new one. Also when you click the button it then changes to text instead of a new button. If anyone can help me here I would be massively appreciative and if I need to pay you for your efforts then please contact me on [email protected]

    Read the article

  • onclick event is not fire in google chrome

    - by purnang.advant
    I am trying to fire the asp.net button click event from javascript. Its working fine in IE, but the same code is not working on Chrome, please help me. Here is the js code, var btnSave = document.getElementById('btnSave'); btnSave.click(); alert("The changes are saved sucessfully!!"); Please help me

    Read the article

  • creating buttion and calling function on its onclick event using javascript

    - by Deven
    hello friends sorry for previous question actuly my question is i am having one button called btn[0] which is allready on browser when it is loaded when i click on btn[0] it will create another button element called btn[1] now btn[0]'s click event is disabled and when i click on btn[1] it will also generate another button which called btn[2] when i click on btn[2] it will generate another btn called btn[3] and so on

    Read the article

  • How to change the position of a imageButton when onClick

    - by Amber
    I am trying to shift the position of a image button when on click. I tried the following but it crashes at "rlOut.addView(imgP, p);" I have no issues when running them in onCreate(). RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(62, 62); ImageButton imgP = (ImageButton)findViewById(R.id.imgP); public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub LayoutParams par = (LayoutParams)imbBtn.getLayoutParams(); if(event.getAction()==MotionEvent.ACTION_DOWN) { Log.d("ok","down"); mX = (int) event.getX() - imbBtn.getWidth() / 2; mY = (int) event.getY() - imbBtn.getHeight() / 2; et1.setText("mX down: "+String.valueOf(mX)); et2.setText("mY down: "+String.valueOf(mY)); } else if (event.getAction()==MotionEvent.ACTION_UP) { Log.d("ok","up"); p.leftMargin=mX; p.rightMargin=mY; rlOut.addView(imgP, p); Log.d("ok","p"); }

    Read the article

  • reload masonry when div has fadeout onclick?

    - by Jason
    Hi, I'm using masonry for layout. I have set up a filter for the divs using the following code: $("#logo").click(function() { $(".box").fadeIn(); $(".box:not(.logo)").fadeOut(); }); when I select an item, I want masonry to reload the layout so that the items are reshuffled and that there aren't blank spaces. Ideas? thanks

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >