Search Results

Search found 1787 results on 72 pages for 'inline'.

Page 8/72 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • javascript removeChild() and appendChild() VS display=none and display=block|inline

    - by Kucebe
    I'm developing a web application that shows some controls and descriptions dinamically (I don't want to use jQuery or other libraries). At this moment i make appear and disappear controls using: element.setAttribute("style", "inline"); and element.setAttribute("style", "none"); but i'm thinking about using: element.appendChild(childRef); and element.removeChild(childRef); So, which one is the best solution in terms of system speed and elegance of the code? (and of course, are there better solution?)

    Read the article

  • Including inline javascript using content_for in rails

    - by TenJack
    I am using content_for and yeild to inject javascript files into the bottom of my layout but am wondering what the best practice is for including inline javascript. Specifically I'm wondering where the put the script type declaration: <% content_for :javascript do %> <script type="text/javascript"> ... </script> <% end %> or <% content_for :javascript do %> ... <% end %> <script type="text/javascript"> <%= yield :javascript %> </script> <% end %> I am using the first option now and wondering if it is bad to include multiple ... declarations within one view. Sometimes I have partials that lead to this.

    Read the article

  • How to show content from contentPlaceholder inline

    - by H4mm3rHead
    Hi, I have a page where i in my masterpage have a toolbar with a "Home" button to the far left. This button is not in a contentplaceholder but on the page. I want to have the opportunity for derived pages to add their own controls or whatever to the toolbar to be whown after the "home" button. But how to do this? I have tried to put in a content placeholder, but it seems that i cannot get it to show inline with the other stuff, it breaks and the content of the contentplaceholder is shown below the button instead. anyone know how to solve this? /Brian

    Read the article

  • jquery lightbox inline - without popup

    - by Michal
    i like jquery lightbox control looks nice and shows me a title one 1 of x images etc. I need exactly the same thing but without pop up. So whas is now visible after i click thumnail of image i want it to by visible as inline content somewhere on my page with first image loaded and then i could just use next prev. of course in this case, close would not be applicable. Does anybode know such a jquery plugin or how to change lightbox to work withoud popup? Thanks.

    Read the article

  • Inline Conditional Statement in Stored Procedure

    - by Jason
    Here is the pseudo-code for my inline query in my code: select columnOne from myTable where columnOne = '#variableOne#' if len(variableTwo) gt 0 and columnTwo = '#variableTwo#' end I would like to move this into a stored procedure but am having trouble building the query correctly. I assume it would be something like select columnOne from myTable where columnOne = @variableOne CASE WHEN len(@variableTwo) <> 0 THEN and columnTwo = @variableTwo END This is giving me a syntax error. Could someone tell me what I've got wrong. Also, I would like to keep it to only one query and not just have one if statement. Also, I do not want to build the sql in the stored procedure and run Exec() on it.

    Read the article

  • Cell padding within inline CSS

    - by GregH
    I have a table within a div (see below). How do I add a right padding of say 30px to each cell/column within the table in that div? My understanding is that I have to use inline CSS? Basically, I want each cell to be padded on the right by 30 pixels. <div id="ddTopMenu";> <table border="0" > <tr> <td width=100></td><td >Dictionary</td><td>Search</td><td>Sources</td><td>References</td> </tr> </table> </div>

    Read the article

  • Jquery UI Datepicker Date Range Inline Problem

    - by codeworxx
    Hey Guys, i have a big Problem with jQuery UI Datepicker. I have two Input Fields "From Date" and "To Date". When i choose a From Date - a Daterange of only 5 Days should appear on the "To Date" Picker. I used the Code from "Russ Cam" http://stackoverflow.com/questions/330737/jquery-datepicker-2-inputs-textboxes-and-restricting-range It worked perfect. Now my Problem: I have a second Calendar which is INLINE, means no Input Fields - it's shown directly on the Page - with "From Date" and "To Date". In this Calendar the Script does not work! All Fields in "From Date" and in the "To Date" are available - no Date Range Restrictions or something else. What's wrong here? Can someone give me a hint?

    Read the article

  • Django: Extending User Model - Inline User fields in UserProfile

    - by Jack Sparrow
    Is there a way to display User fields under a form that adds/edits a UserProfile model? I am extending default Django User model like this: class UserProfile(models.Model): user = models.OneToOneField(User, unique=True) about = models.TextField(blank=True) I know that it is possible to make a: class UserProfileInlineAdmin(admin.TabularInline): and then inline this in User ModelAdmin but I want to achieve the opposite effect, something like inverse inlining, displaying the fields of the model pointed by the OneToOne Relationship (User) in the page of the model defining the relationship (UserProfile). I don't care if it would be in the admin or in a custom view/template. I just need to know how to achieve this. I've been struggling with ModelForms and Formsets, I know the answer is somewhere there, but my little experience in Django doesn't allow me to come up with the solution yet. A little example would be really helpful!

    Read the article

  • The impossible inline Javascript delay/sleep

    - by trex005
    There is a JavaScript function, of which I have zero control of the code, which calls a function that I wrote. My function uses DOM to generate an iFrame, defines it's src and then appends it to another DOM element. However, before my function returns, and thus allows continued execution of the containing function, it is imperative that the iFrame be fully loaded. Here are the things that I have tried and why they do not work : 1. The SetTimeout option : 99.999% of the time, this is THE answer. As a matter of fact, in the past decade that I have been mentoring in JavaScript, I have always insisted that code could always be refactored to use this option, and never believed a scenario existed where that was not the case. Well, I finally found one! The problem is that because my function is being called inline, if the very next line is executed before my iFrame finishes loading, it totally neuters my script, and since the moment my script completes, the external script continues. A callback of sorts will not work 2. The "Do nothing" loop :This option you use while(//iFrame is not loaded){//do nothing}. In theory this would not return until the frame is loaded. The problem is that since this hogs all the resources, the iFrame never loads. This trick, although horribly unprofessional, dirty etc. will work when you just need an inline delay, but since I require an external thread to complete, it will not.In FF, after a few seconds, it pauses the script and an alert pops up stating that there is an unresponsive script. While that alert is up, the iFrame is able to load, and then my function is able to return, but having the browser frozen for 10 seconds, and then requiring the user to correctly dismiss an error is a no go. 3. The model dialogue : I was inspired by the fact that the FF popup allowed the iFrame to load while halting the execution of the function, and thinking about it, I realized that it is because the modal dialogue, is a way of halting execution yet allowing other threads to continue! Brilliant, so I decided to try other modal options. Things like alert() work beautifully! When it pops up, even if only up for 1/10th of a second, the iFrame is able to complete, and all works great. And just in case the 1/10 of a second is not sufficient, I can put the model dialogue in the while loop from solution 2, and it would ensure that the iFrame is loaded in time. Sweet right? Except for the fact that I now have to pop up a very unprofessional dialogue for the user to dismiss in order to run my script. I fought with myself about this cost/benefit of this action, but then I encountered a scenario where my code was called 10 times on a single page! Having to dismiss 10 alerts before acessing a page?! That reminds me of the late 90s script kiddie pages, and is NOT an option. 4. A gazillion other delay script out there:There are about 10 jQuery delay or sleep functions, some of them actually quite cleverly developed, but none worked. A few prototype options, and again, none I found could do it! A dozen or so other libraries and frameworks claimed they had what I needed, but alas they all conspired to give me false hope. I am convinced that since a built in model dialogue can halt execution, while allowing other threads to continue, there must be some code accessible way to do the same thing with out user input. The Code is literally thousands upon thousands of lines and is proprietary, so I wrote this little example of the problem for you to work with. It is important to note the ONLY code you are able to change is in the onlyThingYouCanChange function Test File : <html> <head> </head> </html> <body> <div id='iFrameHolder'></div> <script type='text/javascript'> function unChangeableFunction() { new_iFrame = onlyThingYouCanChange(document.getElementById('iFrameHolder')); new_iFrame_doc = (new_iFrame.contentWindow || new_iFrame.contentDocument); if(new_iFrame_doc.document)new_iFrame_doc=new_iFrame_doc.document; new_iFrame_body = new_iFrame_doc.body; if(new_iFrame_body.innerHTML != 'Loaded?') { //The world explodes!!! alert('you just blew up the world! Way to go!'); } else { alert('wow, you did it! Way to go!'); } } var iFrameLoaded = false; function onlyThingYouCanChange(objectToAppendIFrameTo) { iFrameLoaded = false; iframe=document.createElement('iframe'); iframe.onload = new Function('iFrameLoaded = true'); iframe.src = 'blank_frame.html'; //Must use an HTML doc on the server because there is a very specific DOM structure that must be maintained. objectToAppendIFrameTo.appendChild(iframe); var it = 0; while(!iFrameLoaded) //I put the limit on here so you don't { //If I was able to put some sort of delay here that paused the exicution of the script, but did not halt all other browser threads, and did not require user interaction we'd be golden! //alert('test'); //This would work if it did not require user interaction! } return iframe; } unChangeableFunction(); </script> </body> blank_frame.html : <html> <head> </head> <body style='margin:0px'>Loaded?</body> </html>

    Read the article

  • How to vertically align an inline image with inline text following it?

    - by amn
    Is there any way to vertically align an image element generated by a "content" property as part of a ":before" selector, next to adjacent inline text? In other words, I have <a href="..." class="facebook">Share on Facebook</a> As I don't want to pollute my markup with unnecessary IMG elements that only have to do with style, I resort to adding a small icon to the left of the link, via CSS (except that it does not align properly, hence the question): a.facebook:before { content: url(/style/facebook-logo.png); } I tried adding a "vertical-align: middle" (one of the most notoriously difficult aligning concepts to grasp in CSS, in my opinion, is that very property) but it has no effect. The logo aligns with text baseline, and I don't want to hardcode pixel offsets, because frankly text size differs from browser to browser, etc. Is there any solution for this? Thanks.

    Read the article

  • How to inline compressed CSS in Rails with assets pipeline

    - by haimg
    I'm trying to inline CSS into my layout. I'm currently using = Rails.application.assets.find_asset('embedded.css').body.html_safe However, the CSS returned is not compressed. I verified what .digest_path asset file exists, and is properly compressed. I can, of course, write a helper that will check if current on-disk compressed asset file exists for a given asset, and use it. However, I think find_asset actually compiles a CSS asset each time it is called -- not good in production. I hope a cleaner solution exists for this issue.

    Read the article

  • Problem with increment in inline ARM assembly

    - by tech74
    Hi , i have the following bit of inline ARM assembly, it works in a debug build but crashes in a release build of iphone sdk 3.1. The problem is the add instructions where i am incrementing the address of the C variables output and x by 4 bytes, this is supposed to increment by the size of a float. I think when i increment at some such stage i am overwriting something, can anyone say which is the best way to handle this Thanks C code that the asm is replacing, sum,output and x are all floats for(int i = 0; i< count; i++) sum+= output[i]* (*x++) asm volatile( ".align 4 \n\t" "mov r4,%3 \n\t" "flds s0,[%0] \n\t" "0: \n\t" "flds s1,[%2] \n\t" //"add %3,%3,#4 \n\t" "flds s2,[%1] \n\t" //"add %2,%2,#4 \n\t" "subs r4,r4, #1 \n\t" "fmacs s0, s1, s2 \n\t" "bne 0b \n\t" "fsts s0,[%0] \n\t" : : "r" (&sum), "r" (output), "r" (x),"r" (count) : "r0","r4","cc", "memory", "s0","s1","s2" );

    Read the article

  • Inline Zend Navigation links in view content saved to db

    - by takeshin
    I'm storing the page content in the database (both as markup and HTML code) and displaying this content in the view (let's say it's CMS or forum post). The this data have also some links to internal pages existing in sitemap (Zend_Navigation object). It's easy to insert the link in page body just by using <a> tag. But the contents of this inline links does not change when I update the sorce XML for Zend Navigation (url's, attributes, ACL permissions). How do you handle this case? Special markup for the link, converting the link using url view helper? Iterate Zend_Navigation object extracting specific link (one by one)?

    Read the article

  • jQuery inline text scrolling/rotating/carousel effect

    - by Adam Pope
    I trying to create an animation with JQuery that scrolls 1 word in a sentence. For example, I am a nice sententce of text with a MAGIC word in it OTHER HIDDEN WORDS After a second or so, MAGIC would move upwards and OTHER would scroll into view. I've tried playing with a few carousel plugins but I can't seem to get the effect working. Some seem to have so many nested divs that they refuse to display inline, others have issues when one word is longer than another. Does anybody know of a plugin that could make this possible? Is this even possible?

    Read the article

  • Remove margin between rows of overflowing inline elements

    - by Ian
    I'm creating a tile-based game and am using block rendering to update a large list of tiles. I'm attempting to do this in the most simple manner, so I've been trying to work with HTML's default layouts. Right now I'm creating 'inline-blocks', omitting whitespace between the elements to avoid horizontal spaces in between them but when the blocks overflow and create a new line there is some vertical margining in which I do not know how to remove. Example to make this a bit clearer: http://jsfiddle.net/mLa93/13/ (Pretty much I just need to remove the spacing between the block rows while retaining the simple markup.)

    Read the article

  • JQuery animate behaviour with inline-block elements

    - by IlludiumPu36
    I'm using JQuery to animate two divs, one on top of the other, inside a another div. The effect is like a button with the top and bottom halves opening up and down to reveal some contents. The idea is to have a number of these 'buttons' in line using float:left When a button is clicked, the script checks if another button is open, if so, closes that button and opens the clicked button. This works fine, except I want to change float:left to display:inline-block on the container div class (to prevent wrapping of a number of buttons if the browser is resized). The problem is the layout of buttons breaks as JQuery animate seems to be changing the vertical position of the button containers while animating. See fiddle

    Read the article

  • django crispy-forms inline forms

    - by abolotnov
    I'm trying to adopt crispy-forms and bootstrap and use as much of their functionality as possible instead of inventing something over and over again. Is there a way to have inline forms functionality with crispy-forms/bootstrap like django-admin forms have? Here is an example: class NewProjectForm(forms.Form): name = forms.CharField(required=True, label=_(u'???????? ???????'), widget=forms.TextInput(attrs={'class':'input-block-level'})) group = forms.ModelChoiceField(required=False, queryset=Group.objects.all(), label=_(u'?????? ????????'), widget=forms.Select(attrs={'class':'input-block-level'})) description = forms.CharField(required=False, label=_(u'???????? ???????'), widget=forms.Textarea(attrs={'class':'input-block-level'})) class Meta: model = Project fields = ('name','description','group') def __init__(self, *args, **kwargs): self.helper = FormHelper() self.helper.form_class = 'horizontal-form' self.helper.form_action = 'submit_new_project' self.helper.layout = Layout( Field('name', css_class='input-block-level'), Field('group', css_class='input-block-level'), Field('description',css_class='input-block-level'), ) self.helper.add_input(Submit('submit',_(u'??????? ??????'))) self.helper.add_input(Submit('cancel',_(u'? ?????????'))) super(NewProjectForm, self).__init__(*args, **kwargs) it will display a decent form: How do I go about adding a form that basically represents this model: class Link(models.Model): name = models.CharField(max_length=255, blank=False, null=False, verbose_name=_(u'????????')) url = models.URLField(blank=False, null=False, verbose_name=_(u'??????')) project = models.ForeignKey('Project') So there will be a project and name/url links and way to add many, like same thing is done in django-admin where you are able to add extra 'rows' with data related to your main model. On the sreenshot below you are able to fill out data for 'Question' object and below that you are able to add data for QuestionOption objects -you are able to click the '+' icon to add as many QuestionOptions as you want. I'm not looking for a way to get the forms auto-generated from models (that's nice but not the most important) - is there a way to construct a form that will let you add 'rows' of data like django-admin does?

    Read the article

  • The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common ta

    - by zurna
    I get "The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified." error with the following code. I initially had two tables, ADSAREAS & CATEGORIES. I started receiving this error when I removed CATEGORIES table. Select Case SIDX Case "ID" : SQLCONT1 = " AdsAreasID" Case "Page" : SQLCONT1 = " AdsAreasName" Case Else : SQLCONT1 = " AdsAreasID" End Select Select Case SORD Case "asc" : SQLCONT2 = " ASC" Case "desc" : SQLCONT2 = " DESC" Case Else : SQLCONT2 = " ASC" End Select ''# search feature ---> Select Case SEARCHFIELD Case "ID" : SQLSFIELD = "AND AdsAreasID" Case "Ads Areas" : SQLSFIELD = "AND AdsAreasName" Case Else : SQLSFIELD = "" End Select Select Case SEARCHOPER Case "eq" : SQLSOPER = " = " & SEARCHSTRING Case "ne" : SQLSOPER = " <> " & SEARCHSTRING Case "lt" : SQLSOPER = " <" & SEARCHSTRING Case "le" : SQLSOPER = " <= " & SEARCHSTRING Case "gt" : SQLSOPER = " >" & SEARCHSTRING Case "ge" : SQLSOPER = " >= " & SEARCHSTRING Case "bw" : SQLSOPER = " LIKE '" & SEARCHSTRING & "%' " Case "ew" : SQLSOPER = " LIKE '%" & SEARCHSTRING & "' " Case "cn" : SQLSOPER = " LIKE '%" & SEARCHSTRING & "%' " Case Else : SQLSOPER = "" End Select ''# search feature ---> SQL = "SELECT * FROM ( SELECT A.AdsAreasID, A.AdsAreasName, ROW_NUMBER() OVER (ORDER BY A.AdsAreasID) As Row" SQL = SQL & " FROM ADSAREAS A" SQL = SQL & " WHERE Row > ("& RecordsPageSize - RecordsPerPage &") AND Row <= ("& RecordsPageSize &") ORDER BY" & SQLCONT1 & SQLCONT2 Set objXML = objConn.Execute(SQL)

    Read the article

  • Variable-width inline underline effects in CSS

    - by sidereal
    I need to simulate the look of a typical paper form in CSS. It consists of a two-column table of fields. Each field consists of a field name (of variable width) followed by an underline that continues to the end of the column. The field might be populated, in which case there is some text centered above the line, or it may be blank. If that isn't clear, he's a rough idea in manky ASCII art: Name: _______Foo_______ Age: _____17______ Location: __Melbourne__ Handedness: _Left_ (except that the underline would continue under any text) To implement the underline without text, I assume I should use a border-bottom rather than a text-decoration: underline. Additionally, I need the bordered element to take up the full available space. Both of those argue for a block-level element. However, I can't find any way to get the block level element (either a div, an li, or a span set to display: block or inline-block) to remain on the same line as the label. As soon as I give it a width: 100%, it newlines. I've tried various combinations of floats, and I'm not inclined to do anything ridiculous with absolute positioning. Any recommendations?

    Read the article

  • Formatting inline many-to-many related models presented in django admin

    - by Jonathan
    I've got two django models (simplified): class Product(models.Model): name = models.TextField() price = models.IntegerField() class Invoice(models.Model): company = models.TextField() customer = models.TextField() products = models.ManyToManyField(Product) I would like to see the relevant products as a nice table (of product fields) in an Invoice page in admin and be able to link to the individual respective Product pages. My first thought was using the admin's inline - but django used a select box widget per related Product. This isn't linked to the Product pages, and also as I have thousands of products, and each select box independently downloads all the product names, it quickly becomes unreasonably slow. So I turned to using ModelAdmin.filter_horizontal as suggested here, which used a single instance of a different widget, where you have a list of all Products and another list of related Products and you can add\remove products in the later from the former. This solved the slowness, but it still doesn't show the relevant Product fields, and it ain't linkable. So, what should I do? tweak views? override ModelForms? I Googled around and couldn't find any example of such code...

    Read the article

  • Microsoft C Compiler: Inline variable declaration?

    - by Rosarch
    I'm writing C in Visual Studio 2010. The compiler doesn't seem to want to let me use inline variable declarations. The following code produces an error: unsigned int fibonacci_iterative(unsigned int n) { if (n == 0) { return 0; } if (n == 1) { return 1; } unsigned int prev_prev = 0; // error unsigned int prev = 1; // error unsigned int next = 0; // error for (int term_number = 0; term_number < n; term_number++) { unsigned int temp = prev_prev + prev; prev = next; prev_prev = prev; next = temp; } return next; } Error: error C2143: syntax error : missing ';' before 'type' error C2143: syntax error : missing ';' before 'type' error C2143: syntax error : missing ';' before 'type' Why is this happening? Is there a setting to make the compiler not so strict?

    Read the article

  • Symfony 1.3: how to force as inline the choices generated by renderLabel()

    - by user248959
    Hi, this line: <li><?php echo $form['genero']->renderLabel() ?></li> is generating <li> <label for="usuario_genero">Genero</label> <ul class="radio_list"> <li> <!-- this li doesn't have any id--> <input type="radio" checked="checked" id="usuario_genero_0" value="0" name="usuario[genero]">&nbsp;<label for="usuario_genero_0">Chico</label> </li> <li> <!-- this li doesn't have any id--> <input type="radio" id="usuario_genero_1" value="1" name="usuario[genero]">&nbsp;<label for="usuario_genero_1">Chica</label> </li> </ul> </li> I'd like to force the choices as inline, but the li's generated don't have the 'id' attribute. What should i do? Regards Javi

    Read the article

  • Closing the gap between 2 inline elements

    - by insanepaul
    I have a simple div element that contains 2 inline tags. I've associated a onmouseout event to the div element. The problem is that the onmouseout event is fired when the user hovers their mouse between the two tags in the div and also after the end of the second tag. What I want to do is allow the user to hover their mouse across the whole of the div tag and only fire the onmouseout event when the mouse pointer is outside the div element (which is what I assumed from what I've done). I increased padding to close the gap between the 2 tags. This works but where they meet in IE7 at least the event is fired!!! I must be doing something wrong can someone please help. <div id="Div1" onmouseover="hideDiv()"> <a id="A1" href="HTMLNew.htm">ARTICLES</a> <a id="A2" href="HTMLNew.htm">COURSES & CASES</a> </div>

    Read the article

  • jQuery > Update inline script on form submission

    - by Andrew Kirk
    I am using the ChemDoodle Web Components to display molecules on a web page. Basically, I can just insert the following script in my page and it will create an HTML5 canvas element to display the molecule. <script> var transform1 = new TransformCanvas('transform1', 200, 200, true); transform1.specs.bonds_useJMOLColors = true; transform1.specs.bonds_width_2D = 3; transform1.specs.atoms_useJMOLColors = true; transform1.specs.atoms_circles_2D = true; transform1.specs.backgroundColor = 'black'; transform1.specs.bonds_clearOverlaps_2D = true; transform1.loadMolecule(readPDB(molecule)); </script> In this example, "molecule" is a variable that I have defined in an external script by using the jQuery.ajax() function to load a PDB file. This is all fine and good. Now, I would like to include a form on the page that will allow a user to paste in a PDB molecule definition. Upon submitting the form, I want to update the "molecule" variable with the form data so that the ChemDoodle Web Components script will work its magic and display molecule defined by the PDB definition pasted into the form. I am using the following jQuery code to process the the form submission. $(".button").click(function() { // validate and process form here //hide previous errors $('.error').hide(); //validate pdb textarea field var pdb = $("textarea#pdb").val(); if (pdb == "") { $("label#pdb_error").show(); $("textarea#pdb").focus(); return false; } molecule = pdb; }); This code is setting the "molecule" variable upon the form submission but it is not being passed back to the inline script as I had hoped. I have tried a number of variations on this but can't seem to get it right. Any clues as to where I might be going wrong would be much appreciated.

    Read the article

  • SPAN vs DIV (inline-block)

    - by blackjid
    Hi, Is there any reason to use a <div style="display:inline-block"> instead of a <span> to layout a webpage? Can I put content nested inside the span? What is valid and what isn't? Thanks! It's ok to use this to make a 3x2 table like layout? <div> <span> content1(divs,p, spans, etc) </span> <span> content2(divs,p, spans, etc) </span> <span> content3(divs,p, spans, etc) </span> </div> <div> <span> content4(divs,p, spans, etc) </span> <span> content5(divs,p, spans, etc) </span> <span> content6(divs,p, spans, etc) </span> </div>

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >