Search Results

Search found 7799 results on 312 pages for 'changing'.

Page 41/312 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • jQuery / Loading content into div and changing url's (working but buggy)

    - by Bruno
    This is working, but I'm not being able to set an index.html file on my server root where i can specify the first page to go. It also get very buggy in some situations. Basically it's a common site (menu content) but the idea is to load the content without refreshing the page, defining the div to load the content, and make each page accessible by the url. One of the biggest problems here it's dealing with all url situations that may occur. The ideal would be to have a rel="divToLoadOn" and then pass it on my loadContent() function... so I would like or ideas/solutions for this please. Thanks in advance! //if page comes from URL if(window.location.hash != ''){ var url = window.location.hash; url = '..'+url.substr(1, url.length); loadContent(url); } //if page comes from an internal link $("a:not([target])").click(function(e){ e.preventDefault(); var url = $(this).attr("href"); if(url != '#'){ loadContent($(this).attr("href")); } }); //LOAD CONTENT function loadContent(url){ var contentContainer = $("#content"); //set load animation $(contentContainer).ajaxStart(function() { $(this).html('loading...'); }); $.ajax({ url: url, dataType: "html", success: function(data){ //store data globally so it can be used on complete window.data = data; }, complete: function(){ var content = $(data).find("#content").html(); var contentTitle = $(data).find("title").text(); //change url var parsedUrl = url.substr(2,url.length) window.location.hash = parsedUrl; //change title var titleRegex = /(.*)<\/title/.exec(data); contentTitle = titleRegex[1]; document.title = contentTitle; //renew content $(contentContainer).fadeOut(function(){ $(this).html(content).fadeIn(); }); }); }

    Read the article

  • Have problem changing a value in an array

    - by aliov
    I have a multi-dimensional array with 4 entries in each value - (1st name, last name, email, password). I am trying to format the password value so I can insert it into a database. As you can see, my results are not what I need. Why is this the result and what should I do to get my intended result? Thanks php > $newlines[1][3] = "PASSWORD($newlines[1][3)]"; php > echo $newlines[1][3]; PASSWORD(Array[3)]

    Read the article

  • Changing the Hibernate 3 settings

    - by Bogdanel
    I use Hibernate3 and Hibernate Tools 3.2.4 to generate hbm.xml and java files and I want to use List instead of HashSet(...). I've tried to modify the hbm.xml files, putting list instead of set. Is there any way to specify to hibernate tools that I want to generate automatically a list not a HashSet? This is an exemple: Java class public class Test implements java.io.Serializable { private Long testId; private Course course; private String testName; private Set<Question> questions = new HashSet<Question>( 0 ); } Test.hbm.xml: <set name="questions" inverse="true" lazy="true" table="questions" fetch="select"> <key> <column name="test_id" not-null="true" /> </key> <one-to-many class="com.app.objects.Question" /> ... </set> I thought that I could find a clue in the "reveng.xml" file, but I failed.

    Read the article

  • Changing all CSS styles with a property via Jquery

    - by Joe
    On a page I include some css eg: <style type='test/css'> .myBox{ color:#000000; border:#FFFFFF; padding:4px; } .myBox2{ color:#000000; border:#FFFFFF; padding:4px; } </style> I want to then change the "color" property set within both myBox and myBox2 in jquery, without knowing the actual name (myBox, myBox2) of the css style. In otherwords, I want to update ALL css styles on the page where color = certain value, and then also update border where = certain value. An example (not valid code) might be: $("all css [color:#000000]").html("#FF0000"); How could this be possible using jquery?

    Read the article

  • Wpf application variable not changing

    - by Hasan Zubairi
    In my application I need some variables on almost all the pages so I declared them in Application.xaml like <sys:String x:key="First">First</sys:String> and on one page I change the value in code like Resources["First"] = "This is First"; on the second page when I call the variable like String f = (string)this.TryFindResource("First"); MessageBox.Show(f); the out put is "First" and not "This is First". I also tried like. Application.Current.Properties["First"]

    Read the article

  • matplotlib - changing rect colours on the fly

    - by Nick
    I am playing with matplotlib - I have a bar chart, and I want to highlight the bar which user clicks. I have a callback that goes through a rect collection (the one I got from self.axis.bar(...)) and finds out which one was clicked (looking at the coordinates). At this point I want to call something to change the colour of the current bar. Is it possible? How do I do that?

    Read the article

  • Mouse stops working after changing function

    - by heyohletsgo
    I'm making a console board game on c++, and i've been able to make the mouse work in the first function, the menu one, however, when i get to the getmove function and need to click on a house, it simply doesn't work.. Can anyone help? This is the class with the mouse. #include <cstdlib> #include <iostream> #include <process.h> #include <windows.h> #include <time.h> #include <stdio.h> using namespace std; void Game(); int Chu(); int rato(int &row, int &col) { HANDLE hIn; hIn = GetStdHandle(STD_INPUT_HANDLE); bool Continue = TRUE; INPUT_RECORD InRec; DWORD NumRead; HWND window = GetConsoleWindow(); POINT cursorPos; RECT wpos; int x = 0; int y = 0; //cout << hIn << endl; FlushConsoleInputBuffer(hIn); while (Continue) { ReadConsoleInput(hIn, &InRec, 1, &NumRead); switch (InRec.EventType) { case MOUSE_EVENT: if (GetAsyncKeyState(VK_LBUTTON)) { cout << "RATO"<<endl; GetWindowRect(window, &wpos); GetCursorPos(&cursorPos); cursorPos.x -= wpos.left; cursorPos.y -= wpos.top; x = (cursorPos.x - 5) / 16; y = (cursorPos.y - 25) / 24; cout << x << " " << y << endl; row = x; col = y; return row; } else if (GetAsyncKeyState(VK_RBUTTON)){ GetWindowRect(window, &wpos); GetCursorPos(&cursorPos); cursorPos.x -= wpos.left; cursorPos.y -= wpos.top; x = (cursorPos.x - 5) / 16; y = (cursorPos.y - 25) / 24; cout << x << " " << y << endl; row = x; col = y; return row; } break; } } } int main() { cout << "\n\n\n click on the stars" << endl; cout << " \n\n\n *******" << endl; int z = 0; int x = 0; int y = 0; int xo = 0; switch (rato(x,y)) { case 1: Game(); break; case 2: Game(); break; case 3: Game(); break; case 4: rato(x, y); break; case 5: rato(x, y); break; case 6: Game(); break; case 7: Game(); break; case 8: Game(); break; case 9: Game(); break; default: cout << "click again"; break; } return 0; } void Game() { int x = 0; int y = 0; int i = 0; cout << "GAME" << endl; do{ i++; rato(x, y); } while (i <= 2); Chu(); } int Chu() { int x = 0; int y = 0; int a = 0; int b = 0; int xo = 0; int yo = 0; cout << "\ click on the stars" << endl; HANDLE hConsole; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); do{ xo = rato(x, y); if (0 <= xo && xo <= 5) { a = 1;} else cout << "CLICK AGAIN" << endl; } while (xo!=0); cout << a; return a; system("PAUSE"); }

    Read the article

  • Property changing null whilst updating a value.

    - by dinesh
    retreiveing the Data object through a class which is partial class in linq to sql. i am using the same object model to update the changes. but proprertychanging is always null for this object. An anonoymoustype has been converted into strong object type. This strong type is updated again. any one can expalin reason for this? Sample Code: var questions = from Question in _db.CheckListInstanceQuestionDataSource join Question in _db.QuestionDataSource on CheckListInstanceQuestion.UI_QuestionID equals Question.UI_QuestionID where CheckListInstanceQuestion.UI_CheckListInstanceID == instanceID && CheckListInstanceForm.UI_TemplateCheckListFormID == selectedFormID orderby CheckListInstanceQuestion.IN_Order, CheckListInstanceQuestion.VC_Code select new { Question .UI_QuestionID, Question.VC_Description, }; ICollection checkListQuestions = new List(); foreach (var question in questions) { checkListQuestions.Add(new CheckListInstanceQuestion { UI_QuestionID = question.UI_QuestionID, VC_Description = question.VC_Description, });

    Read the article

  • Changing multiple objects with a new class name using Jquery

    - by liquilife
    I'd like to click on a trigger and show a specific image. There are multiple triggers which would show a specific image related to it within a set. There are 4 sets The challenge for me is toggling the other images to hide only in this 'set' when one of these triggers are clicked, as there can only be one image showing at a time in each set. Here is the HTML I've put together thus far: <!-- Thumbnails which can be clicked on to toggle the larger preview image --> <div class="materials"> <a href="javascript:;" id="shirtgrey"><img src="/grey_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtred"><img src="red_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtblue"><img src="hblue_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtgreen"><img src="green_shirt.png" height="122" width="122" /></a> </div> <div class="collars"> <a href="javascript:;" id="collargrey"><img src="grey_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collarred"><img src="red_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collarblue"><img src="blue_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collargreen"><img src="green_collar.png" height="122" width="122" /></a> </div> <div class="cuffs"> <a href="javascript:;" id="cuffgrey"><img src="grey_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffred"><img src="red_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffblue"><img src="blue_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffgreen"><img src="/green_cuff.png" height="122" width="122" /></a> </div> <div class="pockets"> <a href="javascript:;" id="pocketgrey"><img src="grey_pocket.png" height="122" width="122" /></a> <a href="javascript:;" id="pocketred"><img src=".png" height="122" width="122" /></a> <a href="javascript:;" id="pocketblue"><img src="blue_pocket.png" height="122" width="122" /></a> <a href="javascript:;" id="pocketgreen"><img src="green_pocket.png" height="122" width="122" /></a> </div> <!-- The larger images where one from each set should be viewable at one time, triggered by the thumb clicked above --> <div class="selectionimg"> <div class="selectShirt"> <img src="grey_shirt.png" height="250" width="250" class="selectShirtGrey show" /> <img src="red_shirt.png" height="250" width="250" class="selectShirtRed hide" /> <img src="blue_shirt.png" height="250" width="250" class="selectShirtBlue hide" /> <img src="green_shirt.png" height="250" width="250" class="selectShirtGreen hide" /> </div> <div class="selectCollar"> <img src="grey_collar.png" height="250" width="250" class="selectCollarGrey show" /> <img src="red_collar.png" height="250" width="250" class="selectCollarRed hide" /> <img src="blue_collar.png" height="250" width="250" class="selectCollarBlue hide" /> <img src="green_collar.png" height="250" width="250" class="selectCollarGreen hide" /> </div> <div class="selectCuff"> <img src="grey_cuff.png" height="250" width="250" class="selectCuffGrey show" /> <img src="red_cuff.png" height="250" width="250" class="selectCuffRed hide" /> <img src="blue_cuff.png" height="250" width="250" class="selectCuffBlue hide" /> <img src="green_cuff.png" height="250" width="250" class="selectCuffGreen hide" /> </div> <div class="selectPocket"> <img src="grey_pocket.png" height="250" width="250" class="selectPocketGrey show" /> <img src="hred_pocket.png" height="250" width="250" class="selectPocketRed hide" /> <img src="blue_pocket.png" height="250" width="250" class="selectPocketBlue hide" /> <img src="green_pocket.png" height="250" width="250" class="selectPocketGreen hide" /> </div> </div> How can jQuery be used to change a class of an image to "show" and ensure that all other images in that same div are set to a class of "hide"? First time posting here. I'm very efficient with HTML and CSS and have a basic understanding of jQuery. I'm learning and this just seems a little bit beyond my abilities at the moment. I hope this all makes sense. Thanks for any help.

    Read the article

  • Changing type of object in a conditional

    - by David Doria
    I'm having a bit of trouble with dynamic_casting. I need to determine at runtime the type of an object. Here is a demo: include include class PersonClass { public: std::string Name; virtual void test(){}; //it is annoying that this has to be here... }; class LawyerClass : public PersonClass { public: void GoToCourt(){}; }; class DoctorClass : public PersonClass { public: void GoToSurgery(){}; }; int main(int argc, char *argv[]) { PersonClass* person = new PersonClass; if(true) { person = dynamic_cast(person); } else { person = dynamic_cast(person); } person-GoToCourt(); return 0; } I would like to do the above. The only legal way I found to do it is to define all of the objects before hand: PersonClass* person = new PersonClass; LawyerClass* lawyer; DoctorClass* doctor; if(true) { lawyer = dynamic_cast(person); } else { doctor = dynamic_cast(person); } if(true) { lawyer-GoToCourt(); } The main problem with this (besides having to define a bunch of objects that won't be use) is that I have to change the name of the 'person' variable. Is there a better way? (I am not allowed to change any of the classes (Person, Lawyer, or Doctor) because they are part of a library that people who will use my code have and won't want to change). Thanks, Dave

    Read the article

  • Changing colour of two different list item content elements

    - by tokyodrift
    I have an li navigation with dividers created using the code shown below. I'd like to have two of these | elements but different colours, is it possible to define different colours for both? #navigation li:before { content: "|"; color: #800836; } I'd like another but with #F2659A and right next to the existing. Here is the live url to see how things look right now: http://www.jordancharters.co.uk/nakedradish/

    Read the article

  • changing order of items in tkinter listbox

    - by user1104854
    Is there an easier way to change the order of items in a tkinter listbox than deleting the values for specific key, then re-entering new info? For example, I want to be able to re-arrange items in a listbox. If I want to swap the position of two, this is what I've done. It works, but I just want to see if there's a quicker way to do this. def moveup(self,selection): value1 = int(selection[0]) - 1 #value to be moved down one position value2 = selection #value to be moved up one position nameAbove = self.fileListSorted.get(value1) #name to be moved down nameBelow = self.fileListSorted.get(value2) #name to be moved up self.fileListSorted.delete(value1,value1) self.fileListSorted.insert(value1,nameBelow) self.fileListSorted.delete(value2,value2) self.fileListSorted.insert(value2,nameAbove)

    Read the article

  • Changing hibernate batch size programatically

    - by user179056
    Hello, Is possible to change hibernate.jdbc.batch_size programmatically? I understand hibernate.jdbc.batch_size is a application level parameter, wanted to know if i can use it specifically for certain HQL inserts and not others. I would change the code only for those HQL inserts The big picture is that i need to introduce batch inserts to make the web application performant in some scenarios, but i do not want to jeopardize the normal inserts which work right now. Any pointers would help thanks Sameer

    Read the article

  • Changing JTextArea to JScrollPane Causes it to not be visible

    - by user1806716
    I am having an issue with JScrollPanes and JTextArea objects and getting them to work together. If I just add a JTextArea to my JPanel, it works fine and shows up where I tell it to. However, if I change the contentPane.add(textArea) to contentPane.add(new JScrollPane(textArea)), the textArea is not longer visible and there is no sign of the textarea either. Here is my code: public docToolGUI() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 611, 487); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); textField = new JTextField(); textField.setBounds(253, 323, 86, 20); contentPane.add(textField); textField.setColumns(10); JLabel lblEnterRootDirectory = new JLabel("Enter Root Directory"); lblEnterRootDirectory.setBounds(253, 293, 127, 20); contentPane.add(lblEnterRootDirectory); JButton btnGo = new JButton("Go"); btnGo.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { new ToolWorker().execute(); } }); btnGo.setBounds(253, 361, 89, 23); contentPane.add(btnGo); textArea = new JTextArea(); textArea.setWrapStyleWord(true); textArea.setEditable(false); textArea.setBounds(25, 11, 560, 276); contentPane.add(new JScrollPane(textArea)); }

    Read the article

  • Changing brightness in bufferedImage with DataBufferInt

    - by user2958025
    I must read some image and then I have to change brightness and contrast of this image I create main class and constructor where are panels, sliders and other stuff, I added changeListener to slider to take current value. My imagePanel is new Object of that class: public class Obrazek extends JPanel{ public static BufferedImage img = null; public Obrazek() { super(); try { img = ImageIO.read(new File("D:\\ja.jpg")); } catch (IOException e) {} } @Override public void paint(Graphics g) { g.drawImage(img, 0, 0, null); } } This is my load button private void przyciskWczytaj(java.awt.event.ActionEvent evt) { int odpowiedz = jFileChooser1.showOpenDialog(this); if (odpowiedz == jFileChooser1.APPROVE_OPTION) { File file = jFileChooser1.getSelectedFile(); try { BufferedImage im = ImageIO.read(new File(file.getAbsolutePath())); Obrazek.img = im; } catch (IOException ex) { System.out.println("Error"); } } } And now I want to create class where I will change that brightness. I have to use but I don't know how to use that thing: BufferedImage(256, 256, Bufferedmage.TYPE_INT_RGB) and to get each pixel of image I need to do something like: int rgb []=((DataBufferInt)img.getRaster().getDataBuffer()).getData(); And here I is next problem: How can I change the value of each r,g,b and show that new image on my panel

    Read the article

  • Changing image domain / path in css for production?

    - by Neil
    Currently, for things like background images, our css files have no domain specified. This works both in our development and production environments. background-image: url(/images/bg.png); For performance reasons (cookie-less domain), we'd like to switch this: background-image: url(http://staticimagedomain.com/images/bg.png); Ideally, we don't hard code those, so our development environments can still pull locally. Any thoughts on how to best achieve this?

    Read the article

  • Changing the href attribute on hover with jQuery

    - by AverageJoe
    Ok, I have an html page that is loaded into another html page via PHP (ok so its a PHP page, whatever). The page that is loaded is a list of hyperlinks. I need to change the href attribute to make the hyperlinks relative to the location of the stored images they refer too. When i load the page containing the hyperlinks the links are relative to the web host server, not the server that the page is actually hosted from. Somthing like this: <div #screenshots) <p><a href="image1.htm">Image1</a></p> <p><a href="image2.htm">Image2</a></p> <p><a href="image3.htm">Image3</a></p> <p><a href="image4.htm">Image4</a></p> <p><a href="image5.htm">Image5</a></p> </div> When I mouse over the links, the status bar shows the reference as "http://webHostServer.com/image1.htm". If I click it I get a 404 error. I need the href to change to something like this when I mouse over it: "http://www.actualImageHostServerIPaddress/image1.htm" I looked at this for assitance and came out with the following jQuery code, but for some reason none of it works: $(document).ready(function(){ $("button").click(function() { $("#screenshots a").addClass('ss'); }); $(".ss").each(function() { $(this).data("oldHref", $(this).attr("href")); orig = $(this).attr("href"); over = "http://208.167.244.33/208.167.244.33/"; $(this).hover(function() { $(this).attr("href", $(this).attr("href").replace(orig, over+orig)); }, function() { $(this).attr("href", $(this).data("oldHref")); }); }); When I click the button it dosen't add the class to the anchor tags, so when I hover over them nothing changes. Any help here would be great.

    Read the article

  • Dynamically Changing an img tag's onemouseover attribute with Javascript nulls it instead

    - by ?s?zs?
    I want to create an img that has four different states: State 1 over State 1 out State 2 over State 2 out Each state is a different image, and the user can toggle between states 1 and 2 by clicking on the image. To do this I change the src when the image is clicked and the onmouseover and onmouseout attributes of the img element. However when the attributes have been changed they become nulled and do nothing. How can I dynamically change these properties? Here is the code I am using: <!DOCTYPE html> <html> <head> <script> function change() { document.getElementById('image').src="http://youtube.thegoblin.net/layoutFix/hideplaylist.png"; document.getElementById('image').onmouseover="this.src='http://youtube.thegoblin.net/layoutFix/hideplaylistDark.png'"; document.getElementById('image').onmouseout="this.src='http://youtube.thegoblin.net/layoutFix/hideplaylist.png'"; } </script> </head> <body> <img id="image" src="http://youtube.thegoblin.net/layoutFix/showplaylist.png" onmouseover="this.src='http://youtube.thegoblin.net/layoutFix/showplaylistDark.png'" onmouseout="this.src='http://youtube.thegoblin.net/layoutFix/showplaylist.png'" onClick="change()"> </body> </html>

    Read the article

  • jQuery changing css on navigation when div # scrolls into view

    - by Jonny Wood
    I'm looking to recreate the effect used on this site: http://www.brizk.com/ The site uses one large page that scrolls down. As you scroll down and pass different sections the menu navigation on the left changes css class to "current" as the corresponding div comes into view. I presume this can be done with jQuery using $(window).height(); I'm fairly new to jQuery and what I want to write is something like this (in laymans terms): Get height of browser window – if div#content1 is 100px from top and/or 200px from bottom change menu a#link1 to '.current' – else remove .current from all menu a links ... and repeat for 4 different content divs. Can anyone point me in the right direction..? Thanks.

    Read the article

  • Changing background color of inputfield of editable coloumn in primefaces datatable on value change

    - by Shikha
    I have an editable coloumn in dataTable. The code is: <p:column id="articleDescription" headerText="Article Description" filterBy="#{article.description}" filterMatchMode="startsWith"> <p:inputText id="description" value="#{article.description}"style="border:none; box-shadow:none;" /> </p:column> I want to change the background color of the inputText - description on the event - valueChange. How can I change that ? Also, the default background color of it should be the same as of its parent row? Is it possible? How can it be done? Thanks, Shikha

    Read the article

  • How to prevent command/script from changing global environment

    - by guillermooo
    I need to run scriptblocks/scripts from the current top-level shell and I want them to leave the global environment unmodified. So far, I've only been able to think of the following possibilities: powershell -file <script> powershell -noprofile -command <scriptblock> The problem is, that they are very slow. For instance, I would like to be able to do: mkdir newdir cd newdir $env:NEW_VAR = 100 ni -item f 'newfile.txt' ...so that my shell's working dir wouldn't change and $env:NEW_VAR wouldn't be set in the global environment. Are there any more alternatives to accomplish this?

    Read the article

  • Drupal 7 front page URL after changing the front page

    - by Freeman
    I have used Configuration|Site Information|Default Front Page to designate node/55 as my front page. How can I create a menu linking to the original front page, i.e. the one with the list of articles? If I link to <front> it goes to node/55. P.S.: I have been able to simulate this by enabling the frontpage view, but, if possible, it would be more efficient to just link to the original front page URL.

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >