Search Results

Search found 7 results on 1 pages for 'stian flatby'.

Page 1/1 | 1 

  • AJAX - Get response URL after redirect

    - by Stian
    Hello, I was wondering if there is a way to get the URL of the returned resource after a AJAX call in JavaScript? I want to use this with a form, which is in "mysite.com/users/add.html". This is a Spring MVC controller. If the validation of the form fails the controller will return the "users/add" view, but if the validation is OK it will do a redirect to "mysite.com/users/index.html", using return new ModelAndView(new RedirectView("/users/index.html")); Is there a way in JavaScript to find the URL of the returned page? Thanks, Stian

    Read the article

  • jQuery Address - redirect after form submit

    - by Stian
    Hello all, I use jQuery and AJAX to load content from links and forms into a content div. In addition I use the Address plugin to enable the back button and refresh. On the server side I use Java and Spring MVC. Since I'm using jQuery Address and AJAX the only page that is directly loaded is "index.html". Everything else is loaded into a content div, and what page to load is specified in the hash, ie. "index.html#/users/add.html" will load "users/add.html". Now, "users/add.html" contains a form for creating a new user. When the form is submitted and everything went OK, the controller redirects to "users/index.html". The problem is that jQuery Address doesn't know about the redirect, so the url will remain "index.html#/users/add.html". And this is a problem when you refresh the page and then get sent back to the form, instead of the index page. Is there a way to fix this problem? Thanks, Stian

    Read the article

  • Custom cell in list in Flash AS3

    - by Stian Flatby
    I am no expert in Flash, and I need some quick help here, without needing to learn everything from scratch. Short story, I have to make a list where each cell contains an image, two labels, and a button. List/Cell example: img - label - label - button img - label - label - button As a Java-programmer, I have tried to quicly learn the syntax and visualness of Flash and AS3, but with no luck so far. I have fairly understood the basics of movie clips etc. I saw a tutorial on how to add a list, and add some text to it. So I dragged in a list, and in the code went list.addItem({label:"hello"}); , and that worked ofc. So i thought if I double-clicked the MC of the list, i would get to tweak some things. In there I have been wandering around different halls of cell-renderers etc. I have now come to the point that I entered the CellRenderer_skinUp or something, and customized it to my liking. When this was done, I expected i could use list.addItem(); and get an empty "version" of my cell, with the img, labels and the button. But AS3 expects an input in addItem. From my object-oriented view, I am thinking that i have to create an object of the cell i have made, but i have no luck reaching it.. I tried to go var test:CellRenderer = list.listItem; list.addItem(test); ..But with no luck. This is just for funsies, but I really want to make this work, however not so much that I am willing to read up on ALOT of Flash and AS3. I felt that I was closing in on the prize, but the compiler expected a semicolon after the variable (list.addItem({test:something});). Note: If possible, I do NOT want this: list.addItem({image:"src",label:"text",label"text",button:"text"}); Well.. It actually is what I want, but I would really like to custom-draw everything. Does anyone get what I am trying to do, and has any answers for me? Am I approaching this the wrong way? I have searched the interwebs for custom list-cells, but with no luck. Please, any guiding here is appreciated! Sti

    Read the article

  • Multiline TextBox control in WPF

    - by Stian Karlsen
    For some reason I need the content of a TextBox to span multiple lines, and I need this to be defined directly in XAML. I know I can set TextWrapping="Wrap", and I will do that too, but what I need to do is add newlines anywhere I want in the TextBox. Can this be done in XAML? I know the following example won't work, but what I want is something like this: <TextBox>Test1 \n Test2 \n Test3</TextBox> .. and then have these displayed on three lines. Test1 Test2 Test3

    Read the article

  • What is the correct syntax for using HTML builder with mixed content in Groovy 1.7?

    - by stian
    On the Groovy example page there is an example of how to use Groovy HTML builder with mixed content: p [ "This is some", b"mixed", "text. For more see the", ahref:'http://groovy.codehaus.org' ["Groovy"], "project" ] This is however not working for me, I get an error message like: expecting ']', found 'mixed' @ line 33, column 23. b"mixed", ^ 1 error The Groovy example page states that: [Note: the syntax in some of these examples is slightly out-dated. See chapter 8 of GINA in the mean-time until these examples are updated.] My suspicion therefore is that the syntax of the HTML builder has changed, however I don't have the book so I cannot check and I cannot seem to find any relevant example of this working online. Does anyone know how the syntax is supposed to be in Groovy 1.7 and have got this working?

    Read the article

  • Fullcalendar event rendering

    - by Stian
    I would like to render an event to take up the entire space in a cell. For instance in the month view. Out of the box, the date is displayed on top, and then the event underneath. I want to ignore the date text and display the event over the intire cell, I don't want to hardcode the height of the event. Hope to get some pointers, I have looked everywhere in the javascript and css.

    Read the article

  • How can my controls size be NaN when it is actually shown?

    - by Stian Karlsen
    I have a Grid which contains an Image in one of its columns. The image itself does not have any Width or Height set, but its size is correctly controlled through the ColumnDefinition set. From this I would assume that the image controller actually has a Width and Height set, but when I try to bind another element to its Width and Height it doesn't work. When debugging it turns out that the value of Image.Height and Image.Width are NaN. Why? <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="350"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="10"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition> </Grid.ColumnDefinitions> <Grid Grid.Column="0" Margin="5"> <Image x:Name="_image" Source="image.jpg"></Image> </Grid> </Grid>

    Read the article

1