Search Results

Search found 466 results on 19 pages for 'clickable'.

Page 15/19 | < Previous Page | 11 12 13 14 15 16 17 18 19  | Next Page >

  • jQuery UI + Gmaps = Problems (for me at least) HELP!!

    - by Luis
    Hi there! I started using jQuery as soon as I found out about it, it is very powerfull but I started struggling when I tried to load Gmaps api into the tabs jQuery UI brings. Strangly enough in IE 6,7,8 it works fine, but in Firefox, Safari (I'm using mac but tested it in windows and they both give the same problems) the map doesn't load entirely. When I click on the tab where the map loads in, only part of the map is fully operational, the rest is grey and not clickable. Please take a look at the link below and click the third tab in firefox/safari and IE and you will see the problem. http://movewithusoverseas.com/index-new.php?z=product-info.html&pid=1 I don't know if it is a bug in the jQuery UI code or I'm doing something wrong. If I load the map out of the tabs the map is shown OK. I'm fighting with this problem for a week and a half... any help will be much appreciated. Thanks in advance. Luis

    Read the article

  • How to control CSS class applied to ASP.NET 4 Menu with RenderingMode=List

    - by Joe
    I am using an ASP.NET 4.0 Menu control with RenderingMode=List and am struggling with creating the appropriate CSS. Each menu item is represented by an <li tag that contains a nested <a tag with what appear to be fixed class names: <a class="level1" for unselected level 1 menu items <a class="level2" for unselected level 2 menu items <a class="level1 selected" for the selected level 1 menu item ... etc... What I want to do is to is to prevent the currently selected menu item from being "clickable". To do so I tried using: if (menuItem.Selected) menuItem.Selectable = false; This has the desired effect of removing the href attribute from the <a tag but also removes the class attribute - and as a result my CSS can not identify what level the menu item belongs to! Looks to me like a possible bug, but in any case I can't find any documentation describing what CSS class names are used, nor whether there is any way to control this (the old Style properties don't appear to have any effect). Ideally I would like to have "level" class attributes on the <li tags, not just the nested <a tags.

    Read the article

  • Dynamic paging using divs and Javascript

    - by jethomas
    I have a recordset loop that creates a table, and every 9 items it wraps a div around them so basically looks like: <div> <table>rs1, rs2 ----> rs9</table> </div> <div> <table>rs10, rs11 ----> rs18</table> </div> etc... Now, I want it so at first only the first div is showing and the others are hidden, but I have ASP loop that generates clickable links for the various divs (pages) and clicking on any given link will show that div and hide all the others. Here is the asp code I have so far: Dim i If totalPages > 1 Then Response.Write("<div id='navigation'>") For i=1 to totalPages Response.Write ("<a href='' onlick=''>"& i &"</a> | ") Next Response.Write("</div>") End If Now I just need to figure out the javascript...

    Read the article

  • Android: changing drawable states of option menu items seems to have side-effects

    - by pjv
    In my onCreateOptionsMenu() I have basically the following: public boolean onCreateOptionsMenu(Menu menu) { menu.add(Menu.NONE, MENU_ITEM_INSERT, Menu.NONE, R.string.item_menu_insert).setShortcut('3', 'a').setIcon(android.R.drawable.ic_menu_add); PackageManager pm = getPackageManager(); if(pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS)){ menu.add(Menu.NONE, MENU_ITEM_SCAN_ADD, Menu.NONE, ((Collectionista.DEBUG)?"DEBUG Scan and add item":getString(R.string.item_menu_scan_add))).setShortcut('4', 'a').setIcon(android.R.drawable.ic_menu_add); } ... } And in onPrepareOptionsMenu among others the following: final boolean scanAvailable = ScanIntent.isInstalled(this); final MusicCDItemScanAddTask task = new MusicCDItemScanAddTask(this); menu.findItem(MENU_ITEM_SCAN_ADD).setEnabled(scanAvailable && (tasks == null || !existsTask(task))); As you see, two options items have the same drawable set (android.R.drawable.ic_menu_add). Now, if in onPrepareOptionsMenu the second menu item gets disabled, its label and icon become gray, but also the icon of the first menu item becomes gray, while the label of that fist menu item stays black and it remains clickable. What is causing this crosstalk between the two icons/drawables? Shouldn't the system handle things like mutate() in this case? I've included a screenshot:

    Read the article

  • CheckBox won't toggle in Android ListView with focusable="false"

    - by user3563124
    I'm creating a ListView with a custom Adapter for displaying my entries. Each row contains a checkbox, and my adapter contains the following code: CheckBox cb = (CheckBox) v.findViewById(R.id.item_sold); cb.setChecked(p.isSold); setupCheckboxListener(cb, v, position); ... private void setupCheckboxListener(CheckBox check, final View v, final int position) { check.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { CheckBox cb = (CheckBox) v; if (cb.isChecked()) { System.out.println("Should become false!"); cb.setChecked(false); } else { System.out.println("Should become true!"); cb.setChecked(true); } } }); My row XML file includes the following: <CheckBox android:id="@+id/item_sold" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.10" android:layout_gravity="center" android:gravity="center" android:focusable="false" android:clickable="false"/> But anytime I press one of the checkboxes, check.isChecked() returns true, even if the box is unchecked. I even checked to make sure that the checkboxes were distinct and weren't picking up just the last value/etc. Setting up the listeners inline instead of in a method doesn't seem to help, either. It's literally just the isChecked() condition that isn't working appropriately - it seems to always give me the inverse value. Setting an onClick on the row is not acceptable in this case because I need to allow row selection for something else. What could be causing this issue?

    Read the article

  • Closing InfoWindow with Google Maps API V3

    - by Oscar Godson
    I've seen the other posts, but they dont have the markers being looped through dynamically like mine. How do I create an event that will close the infowindow when another marker is clicked on using the following code? $(function(){ var latlng = new google.maps.LatLng(45.522015,-122.683811); var settings = { zoom: 10, center: latlng, disableDefaultUI:false, mapTypeId: google.maps.MapTypeId.SATELLITE }; var map = new google.maps.Map(document.getElementById("map_canvas"), settings); $.getJSON('api',function(json){ for (var property in json) { if (json.hasOwnProperty(property)) { var json_data = json[property]; var the_marker = new google.maps.Marker({ title:json_data.item.headline, map:map, clickable:true, position:new google.maps.LatLng( parseFloat(json_data.item.geoarray[0].latitude), parseFloat(json_data.item.geoarray[0].longitude) ) }); function buildHandler(map, marker, content) { return function() { var infowindow = new google.maps.InfoWindow({ content: '<div class="marker"><h1>'+content.headline+'</h1><p>'+content.full_content+'</p></div>' }); infowindow.open(map, marker); }; } new google.maps.event.addListener(the_marker, 'click',buildHandler(map, the_marker, {'headline':json_data.item.headline,'full_content':json_data.item.full_content})); } } }); });

    Read the article

  • Approaches to replace cursor in pure AS3 / Flare project?

    - by peteorpeter
    Hi there good lookin, I've got a pure AS3 (no Flex) project that uses Flare to display and interact with a data visualization. I just implemented some panning behavior, so you can click and drag the visualization around, and now I'd like to give the user a visual indicator that this is possible, by switching the arrow cursor with a nice grabby-looking hand icon. The user can click and drag at any time except when the mouse is over a clickable node (at which time the cursor swaps to a pointer - this behavior is already in place). So... 1) Do I need to create my own custom bitmap/sprite or is there a palette of built-in cursors I can use? (I'm not using Flex.) 2) Is there a way to simply replace the default arrow with the pan cursor project-wide, or do I need to attach the swapping to mouse events on display objects? Can I use the stage object to make this behavior apply everywhere? 3) How do I perform the swap? Do I use the Cursor object directly or do I need to get involved with the CursorManager? Any guidance, pseudo-code, or words of wisdom is greatly appreciated!

    Read the article

  • Alpha animation bug on button

    - by RaiderJ
    I have animations that fade in a Button (alpha from 0 to 1) and fade out a button (alpha from 1 to 0). This part is all working fine. Button A triggers the fade in of Button B. Button B triggers the fade out of itself. Button B totally covers up Button A. The idea is that Button B contains an image that is used like an information popup. Button A is touched and Button B fades in on top. When Button B is touched it fades itself out again. Initially, Button B's visibility is set INVISIBLE and when the fade in animation is complete, it is set to VISIBLE. When Button B is clicked it fades out and then I set the visibility to INVISIBLE. The problem is that after Button B has faded out, and it is set INVISIBLE, it is still clickable and even though it is not visible, and touches are not received by Button A. I have tried removing Button B from the parent and re-adding it after the animation is completed, and this allows for touches to reach Button A, but only once. After that button B is not longer touchable.

    Read the article

  • How to bind to another event after ajax call in jquery

    - by robert
    Hi, I'm creating a graph using flot javascript library. I have enabled clickable event and the div is binded to plotclick event. So, when a datapoint is clicked, an ajax call is made and the result is used to replace the current div. After this i need to bind the div to a new event. I tried to call bind, but it is still bound to old callback. When i call unbind and bind, the new callback is not called. var handleTeacherClick = function( event, pos, item ) { if( typeof item != "undefined" && item ) { var user_id = jQuery( 'input[name="id' + item.datapoint[0] + '"]' ).val(); jQuery.ajax({ type: 'POST', url: BASEPATH + 'index.php/ajax/home/latest', data: { "user_id": user_id }, dataType: 'json', success: function ( result ) { jQuery.plot(jQuery('#stats_prog'), result.progress_data, result.progress_options); jQuery.plot(jQuery('#stats_perf'), result.performance_data, result.performance_options); jQuery('.stats_title'). html('<span class="stats_title">'+ ' >> Chapter '+Math.ceil(item.datapoint[0])+'</span>'); jQuery('#stats_prog')./*unbind("plotclick").*/ bind('plotclick', statClickHandler ); jQuery('#stats_perf')./*unbind("plotclick"). */ bind( 'plotclick', statClickHandler ); }, }); } }

    Read the article

  • loading google maps drawing manager object

    - by psychok7
    So i am using Google Maps Drawing Manager to draw some polygons and i am saving the lat e long coordinates to my database. Now my question is, after i load that to my array, how can i rebuild the saved polygon back into my map? I can't seem to find a code to understand that. this is what i have now : window.initialize_2 = function () { var mapOptions = { center: new google.maps.LatLng(-34.397, 150.644), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = maplimits; var drawingManager = new google.maps.drawing.DrawingManager({ drawingMode: google.maps.drawing.OverlayType.MARKER, drawingControl: true, drawingControlOptions: { position: google.maps.ControlPosition.TOP_CENTER, drawingModes: [ google.maps.drawing.OverlayType.POLYGON] }, markerOptions: { icon: 'images/beachflag.png' }, polygonOptions: { fillColor: '#ffff00', fillOpacity: 10, strokeWeight: 5, clickable: true, editable: true, zIndex: 1 } }); var coord_listener = google.maps.event.addListener(drawingManager, 'polygoncomplete', function (polygon) { var coordinates = (polygon.getPath().getArray()); console.log(coordinates); window.poly = polygon; }); //delete shape google.maps.event.addListener(drawingManager, 'overlaycomplete', function (e) { if (e.type != google.maps.drawing.OverlayType.MARKER) { // Switch back to non-drawing mode after drawing a shape. drawingManager.setDrawingMode(null); // Add an event listener that selects the newly-drawn shape when the user // mouses down on it. var newShape = e.overlay; newShape.type = e.type; google.maps.event.addListener(newShape, 'click', function () { setSelection(newShape); }); setSelection(newShape); } }); // Clear the current selection when the drawing mode is changed, or when the // map is clicked. google.maps.event.addListener(drawingManager, 'drawingmode_changed', clearSelection); google.maps.event.addListener(map, 'click', clearSelection); drawingManager.setMap(map); }

    Read the article

  • jQuery or CSS - How do you make a link in a table row appear underlined even when the cursor is in a

    - by adam
    I have a table of 3-4 columns, the central one being task names that are also links(yet another todo app..groan). Im trying to make it so that whenever the mouse hovers over any part of the table row - not just the link itself - the link will appear underlined. Its a small detail but its been annoying me like hell and i refuse to let it get the better of me now. At first i tried jQuery with a (forgive the obvious syntax errors but this is the jist) $('#row_in_question').hover( function(){ $(this).find(...the link..).toggleClass("highlighted") }, function(){ $(this).find(...the link..).toggleClass("highlighted") } ); with this as a styling for the a element in general .highlighted { text-decoration: underlined; } and it did indeed toggle the highlighted class on that link - however css inheritance got in the way and no visual changes made. Since i previously styled that link to have no underline when not hovered it wouldnt change the style. So how do i go about this? I dont want the whole row to become clickable, I just want the text to become underlined.

    Read the article

  • How do I update the UI during an event using ASP.NET?

    - by Phil Hale
    I'm a bit stuck with a problem. I feel like the solution should be fairly straight forward but I'm completely out of ideas for some reason. Here's the problem. I've got a user control with a couple of buttons. Think of them as 'On' and 'Off'. When either button is clicked an async method is called. If the method is successful an event is fired. Within the event I want to update the enabled property of the two buttons so that only a single button is clickable at any one time. The problem is that any changes I make to the properties are not shown on screen because the postback is already complete. I tried wrapping the buttons in an UpdatePanel but I get an "Update method can only be called on UpdatePanel with ID 'xxxx' before Render' error. I understand why the problem occurs but I can't think of a solution. Help! Ideally what I'd like to do is simply call a method within the event that will update the UI, but I don't know if that's possible.

    Read the article

  • Semantically correct nested anchors

    - by Blackie123
    I am working on a web applicaton. And what we also create is something that could be described as inline editing. Just to portray thing I am trying to solve I use example of Facebook post. You have post like. Steve Jobs added 5 new photos Steve Jobs is link that redirects to his profile so in HTML, that would be: <div class="post-block"> <p><a href="stevejobs/" title="#">Steve Jobs</a> added 5 new photos.<p> </div> But what I want is the whole post "block" to be clickable although I want only that name to appear to be link. Normally in HTML logic would say to to this: <a href="stevejobs/" title="#"><div class="post-block"> <p><a href="stevejobs/" title="#">Steve Jobs</a> added 5 new photos.<p> </div></a> But this isn't semantically correct. Quick look to HTML 4.01 or any other standard says something like this: Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements. How to create it semantically correct other than using javascript and defining div:hover state for the whole "div anchor"?

    Read the article

  • Is it possible to embed a flash player in a table and retain the table properties

    - by user1494241
    I'd like to embed a music (flash) player in a table with clickable images but the embed code seems to throw the table properties off - it extends the width of the table. Is it possible to embed the player on the same row as the image whilst still retaining the table width? Here's what I've been using: <table width="620" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="left"><object height="18" width="100%"> <param name="movie" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F1253725&amp;auto_play=false&amp;player_type=tiny&amp;font=Georgia&amp;color=9a6600&show_playcount=false&default_width=375&default_height=40&show_user=false"></param> <param name="allowscriptaccess" value="always"></param> <param name="wmode" value="transparent"></param><embed wmode="transparent" allowscriptaccess="always" height="18" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F1253725&amp;auto_play=false&amp;player_type=tiny&amp;font=Georgia&amp;color=9a6600&show_playcount=false&default_width=375&default_height=40&show_user=false" type="application/x-shockwave-flash" width="100%"></embed> </object> </td> <td> <div align="right"><img src="http://dl.dropbox.com/u/31856944/Virb/splash_freedownload-2.png" border="0" width="245" height="42" usemap="#Map" /></div> </td> <tr> <td> <div align="right"><img src="http://dl.dropbox.com/u/31856944/Virb/splash_share-2.png" border="0" width="620" height="31" usemap="#Map2" /></div> </td> </tr> </table>

    Read the article

  • iPhone app. Creating a custom UIView that contains UITextField and UIButton.

    - by Dmitry Burchik
    Hi all. I am new to iPhone programming. And I have an issue. I need to create a custom user control that I will add to my UIScrollView dinamically. The control has an UITextField and an UIButton. See the code below: #import <UIKit/UIKit.h> @interface FieldWithValueControl : UIView { UITextField *txtTagName; UIButton *addButton; } @property (nonatomic, readonly) UITextField *txtTagName; @property (nonatomic, readonly) UIButton *addButton; @end #import "FieldWithValueControl.h" #define ITEM_SPACING 10 #define ITEM_HEIGHT 20 #define SWITCHBOX_WIDTH 100 #define SCREEN_WIDTH 320 #define ITEM_FONT_SIZE 14 #define TEXTBOX_WIDTH 150 @implementation FieldWithValueControl @synthesize txtTagName; @synthesize addButton; - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code txtTagName = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, TEXTBOX_WIDTH, ITEM_HEIGHT)]; txtTagName.borderStyle = UITextBorderStyleRoundedRect; addButton = [UIButton buttonWithType:UIButtonTypeContactAdd]; [addButton setFrame:CGRectMake(ITEM_SPACING + TEXTBOX_WIDTH, 0, ITEM_HEIGHT, ITEM_HEIGHT)]; [addButton addTarget:self action:@selector(addButtonTouched:) forControlEvents:UIControlEventTouchUpInside]; [self addSubview:txtTagName]; [self addSubview:addButton]; } return self; } - (void)addButtonTouched:sender { UIButton *button = (UIButton*)sender; NSString *title = [button titleLabel].text; } - (void)drawRect:(CGRect)rect { // Drawing code } - (void)dealloc { [txtTagName release]; [addButton release]; [super dealloc]; } @end In my code I create an object of that class and add it to scrollView on form. FieldWithValueControl *newTagControl = (FieldWithValueControl*)[[FieldWithValueControl alloc] initWithFrame:CGRectMake(ITEM_SPACING, currentOffset + ITEM_SPACING, 0, 0)]; [scrollView addSubview:newTagControl]; The control looks fine, but if I click to the textbox or to the button nothing happens. Keyboard doesn't appear, the button is not clickable etc.

    Read the article

  • PyGTK: Manually render an existing widget at a given Rectangle? (TextView in a custom CellRenderer)

    - by NicDumZ
    Hello! I am trying to draw a TextView into the cell of a TreeView. (Why? I would like to have custom tags on text, so they can be clickable and trigger different actions/popup menus depending on where user clicks). I have been trying to write a customized CellRenderer for this purpose, but so far I failed because I find it extremely difficult to find generic documentation on rendering design in gtk. More than an answer at the specific question (that might be hard/not doable, and I'm not expecting you to do everything for me), I am first looking for documentation on how a widget is rendered, to understand how one is supposed to implement a CellRenderer. Can you share any link that explains, either for gtk or for pygtk, the rendering mechanism? More specifically: size allocation mechanism (should I say protocol?). I understand that a window has a defined size, and then queries its children, saying "my size is w x h, what would be your ideal size, buddy?", and then sometimes shrinks children when all children cant fit together at their ideal sizes. Any specific documentation on that, and on particular on when this happens during rendering? How are rendered "builtin" widgets? What kind of methods do they call on Widget base class? On the parent Window? When? Do they use pango.Layout? can you manually draw a TextView onto a pango.Layout object? This link gives an interesting example showing how you can draw content in a pango.Layout object and use it in a CellRenderer. I guess that I could adapt it if only I understood how TextView widget are rendered. Or perhaps, to put it more simply: given an existing widget instance, how does one render it at a specific gdk.Rectangle? Thanks a lot.

    Read the article

  • How can I get HTML to link to a browser (or system) specified URL?

    - by MrHatken
    Hi All, I'd like to be able to create a "HTML link" that the user can click on and be taken to an URL (location) specified either in the browser (preferences?) or system environment. Is this possible? Any suggestions on how to do it please? For example, it may look something like this (or alternatively it could be a clickable image or even a submit button): "Click here to go to your preferred news site." When the user clicks on "here" the browser would go to a location specified not in the HTML but somehow in the browser (preferences?) or some system environment variable (OS specific etc.) Of course, the user would have to set up this preference or environment variable (or have some local application or better Web page that could set it - when approved by the user). This is sort of like most OS these days allow you to set "preferred app" for image processing or playing media. I would like to set preferred Web sites for certain tasks. Thanks for any suggestions. Hopefully with Javascript and modern browsers and perhaps HTML 5 something like this is possible. Cheers, Ashley.

    Read the article

  • Broken JS Loop with Google Maps...

    - by Oscar Godson
    My code is below, and I had an issue with nearly the same code, and it was fixed here on StackOverflow, but, again, its not working. I haven't changed the working code, but i did wrap it in the for...in loop youll see below. The issue is that no matter what marker I click it always triggers the last marker/infoWindow that was placed. $(function(){ var latlng = new google.maps.LatLng(45.522015,-122.683811); var settings = { zoom: 10, center: latlng, disableDefaultUI:true, mapTypeId: google.maps.MapTypeId.SATELLITE }; var map = new google.maps.Map(document.getElementById("map_canvas"), settings); $.getJSON('api',function(json){ for (var property in json) { if (json.hasOwnProperty(property)) { var json_data = json[property]; var the_marker = new google.maps.Marker({ title:json_data.item.headline, map:map, clickable:true, position:new google.maps.LatLng( parseFloat(json_data.item.geoarray[0].latitude), parseFloat(json_data.item.geoarray[0].longitude) ) }); var infowindow = new google.maps.InfoWindow({ content: '<div><h1>'+json_data.item.headline+'</h1><p>'+json_data.item.full_content+'</p></div>' }); new google.maps.event.addListener(the_marker, 'click', function() { infowindow.open(map,the_marker); }); } } }); }); Thank you for whoever figures this out!

    Read the article

  • Magento - Add a button to system.xml with method attached to it

    - by vrnet
    Hi, I have created a module that has an "export like" method running regularly as defined in my module's cron area of the config.xml file. But I'd like to give the user the ability to run this export method on demand by adding a "Run now" button in the system configuration, thus using the system.xml file. It seems that the "frontend type" button may be working as I've tried and it adds a tiny clickable button in the config section. But I am not able to attach a method nor a label on the button itself. I thought about adding a button in the "Grid.php" file of the module but this not what I'd like to do as it does fit with my acl. Below is my system.xml file with the "button" frontend type. Does anyone have a clue on how to : add a label/value to the button add a class to the button add a method to call when the button is clicked Many thanks for your help ! <?xml version="1.0" encoding="UTF-8"?> <config> ... <fields> ... <run translate="label"> <label>Run now</label> <frontend_type>button</frontend_type> <backend_model>SOME BACKEND MODEL</backend_model> <sort_order>20</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> <show_in_store>1</show_in_store> </run> </fields> ... </config>

    Read the article

  • Why does mobile first responsive design tend to not use max-width queries alongside the min-width queries?

    - by Sam
    First off, I understand the basic principles behind mobile first responsive web design, and totally agree with them. But one thing I don't understand: In my experience, not all styles for small screens can be used for the larger version of a website. For example, usually smaller versions tend to have larger clickable areas, hamburger navigation, etc. So I sometimes have to override these specific styles, aside from just progressively enhancing the base styles. So I was wondering: why is max-width rarely mentioned (or used) in the context of mobile-first responsive web design? Because it looks like it could be used to isolate styles for smaller screens that are not useful for larger screens, and would thus prevent unnecessary duplication of code. A quote which mentions min-width as typically mobile-first, but not max-width: Mobile first, from a coding perspective, means that your base style is typically a single-column, fully-fluid layout. You use @media (min-width: whatever) to add a grid-based layout on top of that. from: http://gomakethings.com/mobile-first-and-internet-explorer/ EDIT: So to be more specific: I was wondering if there is a reason to exclude max-width from a mobile-first responsive design (as it seems like it can be useful for writing your css as DRY as possible, as some styles for small screens will not be used for bigger screens).

    Read the article

  • Change HTML image into a Button for partial refresh of page

    - by user990951
    I am new to webpage design and MVC. I have a aspx page and I have a html image. I want to change this image and make it clickable so that it will refresh only the bottom half of the page when clicked. I setup my image so that the source of the image is updated by the controller. By using the following src="<%=ViewData["BookImg"] %>" So that the whole story is clear. When a person clicks on the image of the book, it displays on the bottom half of the page information about that book pulled from a sql database. I am thinking that I would need to look into getting ajax implemented so that I can do partial page update. But the question is how do I change that HTML image into a button. Thanks in advance. ---updating per the answer chosen but still having problems--- home.aspx <% Html.RenderPartial("HomePartialView"); %> <img id = "Book_Img" src="<%=ViewData["BookImg"] %>" alt = "click Me" class="imgClick"/> <script src="../../Scripts/jquery-1.5.1.js" type="text/javascript"> $(document).ready(function(){ $(".imgClick").click(function () { $("HomePartialView").load("../../Controllers/HomeController/PartialViewBook"); }); }); </script> ---Controller public ActionResult PartialViewBook() { ViewData[imageBookPressd] = "hello world"; return View("HomePartialView"); }

    Read the article

  • Navigating the timeline

    - by Dean 'Deacon' Beard
    O.K, being a little new to this, I have hit a brick wall, I'm using AS3 in Flash CS5. All I want to do is have a tweened animation which stops at a frame and which has a clickable button to access another part of the maintime line. Also there will be a button on the animation to skip it. How does one set this up? Obviously you need a stop(); at the stop frame of the time line and an event listener and function for both buttons right? Any more help besides that. I have it set up like this; totalSlides:Number = 60; currentSlideNumber:Number = 1; skipbutton.addEventListener(MouseEvent.CLICK,skipbuttonPress); function skipbuttonPress(evt:MouseEvent):void{ currentframelabel = currentframelabel+1; if(currentSlideNumber>=0){ currentframelabel = introstop; } framelabel.gotoAndStop(introstop); } and the frame it stops on is set up as follows stop(); totalSlides:Number = 60; currentSlideNumber:Number = 5; click01.addEventListener(MouseEvent.CLICK,click01Press); function click01Press( evt : MouseEvent ) : void { currentSlideNumber = currentSlideNumber+1; if (currentSlideNumber >= 0) { currentSlideNumber = 25; } framelabel.gotoAndStop(mainpage); } As I need this for a project, any help would be greatly valued. Many Thanks

    Read the article

  • How do I avoid killing the native controls on a html5-video when i've started it programmaticly?

    - by Nils
    OK, so the deal is I've started making a little videoplayer, that works by clicking a div with an image, expanding the div and the image, and then exchanges the image with a html5-videotag. the code is as below. (It's very early on, so i know theres a lot that need improving, as in not using javascript to set styles and so on, but nevertheless, any insigts and tips are welcome, besides the answer to the main question) /*Begin Expander*/ var $videoplayer = $('<video width="640" height="360" preload="none" controls="" tabindex="0" style="position: relative;"><source type="video/mp4" src="/restalive/movies/big_buck_bunny.mp4"></source><source type="video/ogg" src="/restalive/movies/big_buck_bunny.ogv"></source></video>').appendTo('body'); $videoplayer.hide(); $(".ExpandVideo").each(function(i){ var $trigger = $(this); var $image = $trigger.find("img"); $image.css({ "width" : "100%" ,"height" : "auto" }) $trigger.css({ "display" : "block" ,"overflow" : "hidden" ,"width" : "200px" ,"float" : "left" }); $trigger.bind("click", function(e){ $trigger.animate({"width" : "640px"}, "fast", function(){ $image.replaceWith($videoplayer); $videoplayer.show(); $videoplayer.attr("id", "video" + i); var video = document.getElementById("video" + i); video.play(); }) }) }); However, the main problem is that when i've fired of the video like this (video.play()), the native controls stop working, i can no longer pause the video, even though the controls are there, and clickable, the video just starts playing immidiatley again when i trie to pause it. Which is a shame, because i want to use the native controls for simplicity.

    Read the article

  • Show/hide rows with jquery

    - by Mike
    Hi I am using some modified code from another post. Basically I want to switch between showing 10 rows of a table to showing all rows (50 for example). I have got it to show from 10 rows to all, however what I need to do now is code it so that if I click the div again it toggles or resets back to showing 10 rows. <script type="text/javascript"> var numShown = 10; // Initial rows shown & index var numRows = $('tbody').find('tr').length; var numLeft = numRows - numShown; $(document).ready(function(){ // Hide rows and add clickable div $('tbody') .find('tr:gt(' + (numShown - 1) + ')').hide().end() $('#table_wrapper').after('<div id="more">Show all offers <span>(' + numLeft + ' more)</span></div>'); $('#more').click(function(){ numShown = numShown + numRows; // 7 + 1 = 8 $('tbody').find('tr:lt('+numShown+')').show(); $("#more").html("Show top 10 offers"); }) }) </script>

    Read the article

  • Android Linear Layout steching

    - by Maffo
    Hi, I think that's a rather simple Question but I don't get it the way I want it to. I Want do do a Linear Layout in Android with 3 areas. The Top area should have a fixed height, fill_parent width. The second, below the first, should use all the room available, fill_parent width. The third, below the second, should have fixed height, fill_parent width. Here is what i got: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="bottom" android:background="#ff63a920"> <LinearLayout android:id="@+id/top_bar" android:layout_width="fill_parent" android:layout_height="32dp" > </LinearLayout> <com.google.android.maps.MapView android:id="@+id/mymapView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:enabled="true" android:clickable="true" /> <LinearLayout android:id="@+id/bottombar" android:layout_width="fill_parent" android:layout_height="32dp" > </LinearLayout> </LinearLayout> The Problem is, that the mapview in the middle ist too big, so it pushes out the topbar. I Hope you can help me.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19  | Next Page >