Search Results

Search found 26905 results on 1077 pages for 'conjunctive normal form'.

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

  • Where can I find free or buy "next-gen" 3D Assets?

    - by Valmond
    Usually I buy 3D Assets from sites like turbosquid.com or similar. My problem is that I have lately implemented glow, normal maps, specular (and specular power) maps and reflection maps and I can't find any models that use those techniques. So where can I find / buy "next gen" assets (at least models/items with a normal map)? I have checked for similar posts but those I found are about either free only or 2D or 'ordinary' 3D so I hope this is not a duplicate.

    Read the article

  • Setting a display's backlight brightness to be lower than is possible via the normal brightness controls

    - by Drew Noakes
    By normal brightness controls I mean the accelerators on my laptop's keyboard that seem to integrate with Unity. In a dark room, my screen is quite bright, even on the lowest setting. Can I override this? I tried setting it explicitly via both: sudo echo 500 > /sys/class/backlight/acpi_video0/actual_brightness sudo echo 500 > /sys/class/backlight/intel_backlight/actual_brightness But I get a permission denied error. When at the lower bounds via my keyboard's brighness controls, acpi_video0/actual_brightness is 0, and intel_backlight/actual_brightness is 729. Can I set the latter value to be even lower?

    Read the article

  • Hide all normal windows shortcut is not working in Ubuntu 13.10

    - by Vladislav Ivanishin
    Hide all normal windows shortcut is not working. It is currently set to Alt+Ctrl+D. And changing the shortcut doesn't help (tried Super+D, Alt+Esc). However other shortcuts work fine (even from the same Navigation tab). I guess the question is a duplicate of this which is unanswered. Update: It works exactly one time after reboot. I can minimize windows and even bring them back using the combination but only once. Also switching keyboard layout shortcut stopped working, but as I can see it's a known bug.

    Read the article

  • Boot Failure: No default or UI configuration directive found Normal install on laptop [closed]

    - by user79920
    I have had Ubuntu on my laptop for quite a while, it's just a standard install, no partitioning off, no wierdness of any other sort, just ubuntu. Today my computer started to lag really bad so I tried to restart it, but after bios loaded I just got an error that said "ERROR: No configuration file found No DEFAULT or UI configuration directive found!" After that it had "boot:" and a cursor, like it expects me to type something. Once again, this is just a normal install on my hard drive, not a VM or booting from USB. It's Ubuntu 12.04 on a Sony Vaio VGN-SZ240P Any help is appreciated!

    Read the article

  • Is not being paid for training normal?

    - by user23838
    I'm a recent college graduate, and I recently had a interview with a company for an entry-level programming job. The company told me that they require two months of unpaid training for all entry level programmers. The reason given was that since they are providing free training, there wouldn't be any compensation. Is this normal? Update For others junior developers looking at this: Don't go for these type of scams. This was my first interview. I interview with 10 other companies around the area and got about 9 job offers from them. I worked for a fortune 50 company for 9 months with good pay and recently found a better opportunity for even better pay and better work. I guess moral is to be patient and have confidence in yourself.

    Read the article

  • Apple trouve "normal" que la coque de l'iPhone 5 soit facilement rayée, le buzz négatif continue

    Apple trouve "normal" que la coque de l'iPhone 5 soit facilement rayée Le buzz négatif continue Plus d'une semaine après sa sortie officielle, l'iPhone 5 continue de s'offrir un méga-buzz négatif. Les premiers propriétaires de cet appareil classé haut de gamme s'interrogent au sujet de ses contours qui se rayent facilement en laissant transparaître la couleur naturelle de l'aluminium. Selon le site spécialisé 9ToMac, un acheteur désappointé aurait reçu une réponse surprenante à sa requête adressée à Phil Schiller, vice-président en charge du marketing chez Apple. Le client se plaint dans son email d'éraflures et de traces sur la bande extérieure de son nouvel iPhone et se deman...

    Read the article

  • Is this CPU usage normal for Xorg?

    - by Samuaz
    I checked System Monitor to see if the frequency of my CPU increases without doing anything and saw that xorg is always using 10-40% of the CPU even if it's not doing much of anything on the desktop or simply surfing the Internet. Is this normal? If not, how can I fix it? I have: a Macbook white 4,1 Core2 Duo running at 2.10 GHz GPU Intel GMA X3100 4GB of RAM Ubuntu 11.04 I am running Unity and I do not have many effects enabled. I have only activated Compiz animations, scale, desktop, some shadows...

    Read the article

  • Ubuntu 12.04 Running Faster Than Normal

    - by One Zero
    I have just installed a new copy of Ubuntu 12.04 on my laptop . i have noticed that my system is running 4x to 5x faster than normal . i have just install Vmware Desktop & centos for testing something . i have noticed that i has installed in just like less than 1 minute !! My system is booting so fast that after starting my laptop i got GUI in like 10 to 13 sec & shutting down in like 2 to 3 sec & all programs ( Firefox , Chrome , etc ) running so fast that i can see .... The only change i made after installation is cat /proc/sys/vm/swappiness 1 How do I configure swappiness? The System is Dell N 5110 i7 with 8GB of RAM So my question is that what should i look for that why my system running very fast ?

    Read the article

  • Outlook, Word, and normal.dot (2003 Edition)

    - by mosiac
    I have one user that for some reason has been having macro issues with her normal.dot file. At first the fix was just remove the file because she isn't actually needing to save anything. This was really a temp fix. We found out that for some reason every time she opened up word it was trying to modify normal.dot but not asking. I set it up to ask so at least we could control the changes going on to normal.dot. There was one file disabled in Word that we enabled because it was a document she never used anymore, making us think that maybe that was the issue. We have automatic antivirus updates and scans so there is little chance of a virus. The issue has stopped as far as just using Word itself. She can open, close, edit, save, etc and never get the dialog. In Outlook however if she clicks reply or forward to an e-mail but decides not to send it, and just close it. She gets the pop up to save changes to normal.dot. This leads me to believe something in outlook about how she is setup to use Word as an e-mail editor is causing the problem. Am I even on the right track here? Short form: Word works fine with normal.dot, as an Outlook mail editor wants to change normal.dot. No idea what to do.

    Read the article

  • Zend Framework problems using Element, sub-forms and belongsTo

    - by wiseguydigital
    Still pulling my hair out with Zend_Form and any elements that need to be placed in a sub-array. form-populate() does not work when working with elements within a sub-form that have been set to a parent array using belongsTo() - I think it is actually a bug in Zend_Form-setDefaults() but just wanted to see if anyone else has a) had the same problem and b) managed to work around it...

    Read the article

  • How do I use ViewScripts on Zend_Form File Elements?

    - by Sonny
    I am using this ViewScript for my standard form elements: <div class="field" id="field_<?php echo $this->element->getId(); ?>"> <?php if (0 < strlen($this->element->getLabel())) : ?> <?php echo $this->formLabel($this->element->getName(), $this->element->getLabel());?> <?php endif; ?> <span class="value"><?php echo $this->{$this->element->helper}( $this->element->getName(), $this->element->getValue(), $this->element->getAttribs() ) ?></span> <?php if (0 < $this->element->getMessages()->length) : ?> <?php echo $this->formErrors($this->element->getMessages()); ?> <?php endif; ?> <?php if (0 < strlen($this->element->getDescription())) : ?> <span class="hint"><?php echo $this->element->getDescription(); ?></span> <?php endif; ?> </div> Trying to use that ViewScript alone results in an error: Exception caught by form: No file decorator found... unable to render file element Looking at this FAQ revealed part of my problem, and I updated my form element decorators like this: 'decorators' => array( array('File'), array('ViewScript', array('viewScript' => 'form/field.phtml')) ) Now it's rendering the file element twice, once within my view script, and extra elements with the file element outside my view script: <input type="hidden" name="MAX_FILE_SIZE" value="8388608" id="MAX_FILE_SIZE" /> <input type="hidden" name="UPLOAD_IDENTIFIER" value="4b5f7335a55ee" id="progress_key" /> <input type="file" name="upload_file" id="upload_file" /> <div class="field" id="field_upload_file"> <label for="upload_file">Upload File</label> <span class="value"><input type="file" name="upload_file" id="upload_file" /></span> </div> Any ideas on how to handle this properly with a ViewScript?

    Read the article

  • piecing together a jquery form mailer

    - by Joel
    Hi guys, My newbieness is shining through here...I managed to piece together a form mailer that works great, but now I need to add two more fields, and I'm at a loss as to how to do it. Over the months, I have commented out some things I didn't need, but now I'm stuck. I borrowed from this tutorial to make the original form: http://trevordavis.net/blog/tutorial/ajax-forms-with-jquery/ But then I cannibalized it to make an email signup form for a newsletter, so the fields I need are: recipient email (me-hard coded in) senders email address subject (hardcoded in) first name and city in the body of the message For my form, I have this: <div> <?php include('verify.php'); ?> <form action="index_success.php" method="post" id="sendEmail" class="email"> <h3 class="register2">Newsletter Signup:</h3> <ul class="forms email"> <li class="name"><label for="yourName">Name: </label> <input type="text" name="yourName" class="info" id="yourName" value=" " /><br> </li> <li class="city"><label for="yourCity">City: </label> <input type="text" name="yourCity" class="info" id="yourCity" value=" " /><br> </li> <li class="email"><label for="emailFrom">Email: </label> <input type="text" name="emailFrom" class="info" id="emailFrom" value="<?= $_POST['emailFrom']; ?>" /> <?php if(isset($emailFromError)) echo '<span class="error">'.$emailFromError.'</span>'; ?> </li> <li class="buttons email"> <button type="submit" id="submit">Send</button> <input type="hidden" name="submitted" id="submitted" value="true" /> </li> </ul> </form> </div> emailcontact.js: $(document).ready(function(){ $("#submit").click(function(){ $(".error").hide(); var hasError = false; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var emailFromVal = $("#emailFrom").val(); if(emailFromVal == '') { $("#emailFrom").after('<span class="error">You forgot to enter the email address to send from.</span>'); hasError = true; } else if(!emailReg.test(emailFromVal)) { $("#emailFrom").after('<span class="error">Enter a valid email address to send from.</span>'); hasError = true; } var subjectVal = $("#subject").val(); if(subjectVal == '') { $("#subject").after('<span class="error">You forgot to enter your name.</span>'); hasError = true; } var messageVal = $("#message").val(); if(messageVal == '') { $("#message").after('<span class="error">You forgot to enter your city.</span>'); hasError = true; } if(hasError == false) { $(this).hide(); $("#sendEmail li.buttons").append('<img src="/wp-content/themes/default/images/template/loading.gif" alt="Loading" id="loading" />'); $.post("/includes/sendemail.php", //emailTo: emailToVal, { emailFrom: emailFromVal, subject: subjectVal, message: messageVal }, function(data){ $("#sendEmail").slideUp("normal", function() { $("#sendEmail").before('<h3 class="register2">Success!</h3><p class="emailbox">You are on the Newsletter email list.</p>'); }); } ); } return false; }); }); sendmail.php: <?php $mailTo = $_POST['emailTo']; $mailFrom = $_POST['emailFrom']; $subject = $_POST['yourName']; $message = $_POST['yourCity']; mail('[email protected]','Rattletree Newsletter', 'Name='.$subject. ' City='.$message, "From: ".$mailFrom); ?> Thanks for any help! I'm going crosseyed trying to figure this one out.

    Read the article

  • Form inside a hidden div has no values on post

    - by Mick
    I have a html form that posts to a new page on submit. If required a user can click a button to make a small table visible in a div box. this adds more text input fields to my form. The problem is, regardless of the div box being hidden or visible none of the additional fields data is sent when the form is posted . the div box code function quotevisi() { document.getElementById("quote").style.visibility = "visible"; tdat = "" ; tdat += "<h2 align='center' >Client Quotation </h2>" ; tdat += "<table align='center'cellpadding='1' width='690px'><tr>" tdat += "<td ></td><td>Additional 1</td>" ; tdat += "<td ><label><textarea id='line1' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td >Additional 2 </td>" ; tdat += "<td ><label><textarea id='line2' name='line2' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td >Additional 3 </td>" ; tdat += "<td ><label><textarea id='line3' name='line3' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td >Special Instructions</td>" ; tdat += "<td ><label><textarea id='special' name='special' cols='50' rows='1'>" tdat += "</textarea></label></td></tr>" tdat += "<td ></td><td ></td> <td>" ; tdat += "<input type='button' value='View Quote' onclick='view_quote()' /> " tdat += "<input type='button' value='Close' onclick='closequote()' /> " tdat += "<td ></td> " ; tdat += "</table> " // display in the quote div (style sheet) document.getElementById('quote').innerHTML= tdat } The form is a bit big to but the button for the hidden field is this <td ><input class="buttn" type="button" value="Extra Quote details " onclick="quotevisi();" /> </td> I would of thought that all this information would go with the form on post . But it doesent. Oh finally the div box code is placed after this line <form style='background-color:ccc' id='form1' name='form1' method='post' action='process.php' > Any help or thoughts would be much appreciated thanks Mick

    Read the article

  • What's the normal way machine-learning algorithms are integrated into normal programs?

    - by Benjamin Pollack
    I'm currently taking a machine learning course for fun, and the course heavily focuses on Matlab/Octave to write the code. One thing mentioned in the course is that, while Matlab/Octave are great for prototyping, they're very rarely used for production algorithms. Instead, those algorithms are typically rewritten in C++/Python/etc., using appropriate libraries, before reaching customers. Fair enough; I get that. But here's my question: is that done for cultural reasons, for technical reasons, or because there is really no language that provides Matlab/Octave-like fluidity, but in a compiled form that can be linked from C/C++/$MainstreamLanguage? The game industry uses Lua for game logic because it's easy to embed, and vastly superior for expressing things like AI. Likewise, there are Prolog variants for rules-heavy applications, Scheme variants for compilers, and so on. If there's a matrix equivalent language, what is it? If there isn't, why is this field different?

    Read the article

  • file error /boot/grub/i386-pc/normal.mod trying to repair boot, live dvd install probleml

    - by user179295
    I have seen that there are a lot of threads about this problem. I had Windows 8 installed on my series 3 samsung i5 computer and I tried to install ubuntu 13.04. This is what I did: Because of the secure boot I can't install ubuntu from the dvd. So I went in the bios and disabled secure boot and enabled ''CSM''. I went out of the bios and windows 8 couldn't boot more. So I follow a guide on this thread ( Installing on a Pre-Installed Windows 8 System (UEFI Supported) ) and on ubuntu I tried to repair the boot by inserting this code in the terminal: sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install boot-repair Then I ran boot-repair and I follow all the steps. Then I reboot the sistem and saw the black screen that says: error: file '/boot/grub/i386-pc/normal mod' not found grub rescure> Now I saw a lot of guides about this problem but I can't understand how to reistall ubuntu trough the live dvd that I used to install it the first time... I put it in the computer but nothing appears.. so what should I do now? I'm a noob on ubuntu and I have read all the things about this grub 2 install and know where the problem comes from but how to start the dvd??

    Read the article

  • what is a normal developer to pageview ratio?

    - by Anthony Shull
    I work for an e-commerce site that has lately been shedding its workforce. I was hired ten months ago as a UI Developer. At that time we had three other developers. One was the technical lead who had been with the company for 10 years. The other two were server-side developers who had been there for 10 and 3.5 years respectively. In ten months, the technical lead left for a better position, one developer was laid off, and the other very recently left. So, I am now the only developer on staff. We have one DBA and one network administrator. They are currently looking to hire another developer but are not willing to pay enough to hire a senior person. I consider myself a junior developer with two years of experience. I have argued that we need to hire at least one senior developer and another junior developer if we're going to keep our current site operational (not to mention develop new features)...even if that means laying off staff in other departments. Right now we get 6.5 million pageviews per month, and I feel like 3.2 million pageviews per developer must be incredibly abnormal. My question is then: what is a normal developer to pageview ratio? Are there any industry standards or literature on the subject that I can use to argue for more staff?

    Read the article

  • Display the form again ?

    - by noralain
    Hi all, I want to ask about the form in javascript .. I want to do a game that the user enter the correct word, then alert message will apeared for correct word.. When the user do the first word correctly, the program will display another word (to be corrected) .. but the problem which i faced that i can't make the form display again to continue play the game .. i used : var d = document.getElementById("form1"); d.style.visibility = "visible"; but it doesn't work !! This is my code: <title>Word Decoder</title> <script type="text/javascript"> function checkWord(word, score){ var ok = words[score].valueOf(); var ok1 = document.getElementById("wordid"); if(ok1.value == ok){ score ++; alert("Correct, your score is: " + score); var d = document.getElementById("form1"); d.style.visibility = "visible"; return false; } else { alert("Wrong Spelling"); return false; } } </script> </head> <body> <script type="text/javascript"> var words = new Array ("apple", "orange", "banana", "manago", "table"); var reWords = new Array ("alpep", "ergano", "aaabnn", "goamna", "lbeat"); var count = 0; var score = 0; "</br>"; </script> <form id="form1"> <br> <dir id="displayForm" style="position: relative; visibility: visible; display: block"> <h3><b> <script> document.write(reWords[score]);</script> </b></h3> <br> Enter the correct word: <input type="text" value="" id="wordid"/> <input type="submit" value="Check Answer ??" onclick="return checkWord(wordid, score);" /> </dir> </form> </body> Can help me to solve the problem? Again: I want the game will display a scrambled word and the user must unscrambled the word to move to the other word. The problem is i can't display the form again to make the user unscrambled the second, third ..etc words..

    Read the article

  • Cross domain form submit does not work on Chrome and IE

    - by Debiprasad
    I am having an unexpected issue while submitting a from. The action of the form is a different domain. And the method is get. Here to the code of the from: <div style="width: 100%; background-color: #09334D; margin: 0 0 15px 0; padding: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;" <form action="http://www.flipkart.com/search-book" method="get"> <a href="http://www.flipkart.com/?affid=debiprasad"> <img alt="Flipkart.com" style="vertical-align:middle" src="http://static.fkcdn.com/www/270/images/flipkart_india.png" /> </a> <input type="hidden" name="affid" value="debiprasad"> <input type="text" name="query" style="height:25px; width: 400px; font-size: 16px;"> <select onchange="$(this).closest('form').attr('action', 'http://www.flipkart.com/search-' + $(this).val());" style="height:25px; width: 150px; font-size: 16px;"> <option value='book' selected>Books</option> <option value='music'>Music</option> <option value='movie'>Movies & TV</option> <option value='game'>Games</option> <option value='mobile'>Mobiles</option> </select> <input type="submit" value="Search" style="height:25px; width: 100px; font-size: 16px; background: url('http://static.fkcdn.com/www/270/images/fkart/search_button_bg.png') repeat-x scroll 0 0 transparent; border: 1px solid #915A13; color: #3C2911; cursor: pointer; font-family: 'lucida grande',tahoma,verdana,arial,sans-serif; font-weight: bold; padding: 0 17px 0 15px; margin: 0; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;"> </form> The form is located at: http://wheretobuyonline.in/ When I click on the "Search" (submit) button, it does not submit. This problem happens in Chrome and IE (8). But works without any problem on Firefox.

    Read the article

  • How to use input type="tel" in a contact form

    - by user1678664
    PHP newbie here trying to use a simple contact form. The fields I have are: "Name", "Email", "Phone", and "Message". I am trying to figure out what to do with the "Phone" field – I want it to output to the same place that "Message" does, so that when the email is received it will output both the message and the phone number to the body of the email. How do I do this? if( isset( $_POST['submit'] ) ) : wp_mail( get_option( 'admin_email' ), 'Website Contact Form', ( isset($_POST['message'] ) ? $_POST['message'] : '(blank)' ), 'From: ' . ( isset( $_POST['from_name'] ) ? $_POST['from_name'] : 'Website Contact Form' ) . ' <' . ( isset( $_POST['from_email'] ) ? $_POST['from_email'] : get_option( 'admin_email' ) ). '>' . "\r\n" ); $output = '<p>Thank you! Your message has been sent.</p>'; else : $output = ' <form action="" method="post"><ul> <li> <label for="from_name">Name</label> <input type="text" name="from_name" id="from_name" /> </li> <li> <label for="from_email">Email</label> <input type="email" name="from_email" id="from_email" /> </li> <li> <label for="from_tel">Phone</label> <input type="tel" name="from_tel" id="from_tel" /> </li> <li> <textarea name="message" id="message"></textarea> </li> <li class="submit"> <input name="submit" type="submit" value="Say Hello!" /> </li> </ul></form>'; endif; return $output;

    Read the article

  • Zend form and dynamic file upload

    - by DoomStone
    Hello there i'm trying to create a form with Zend_Form that will enable my user to upload a unlited number of files to my site, witch is done by javascript. Something like <script type="text/javascript"> $(document).ready(function(){ var image_uploade_i = 0; $('#upload_more').click(function() { image_uploade_i++; $('#upload_list').append('<div id="image_uploade_id_'+image_uploade_i+'" style="display: none;"><input type="file" name="image[]" /><br /></a>'); $('#image_uploade_id_'+image_uploade_i).slideDown('slow'); }); }); </script> <?=$this->translate('Add images')?> <form action="" method="post" enctype="multipart/form-data"> <div id="upload_list"> <input type="file" name="image[]" /><br /> <input type="file" name="image[]" /><br /> <input type="file" name="image[]" /><br /> </div> <a href="#" id="upload_more"><?=$this->translate('Upload another image')?></a><br /> <input type="submit" name="image_uploade" value="<?=$this->translate('Upload images')?>" /> </form> But i'm am unable to find out how i can create something like this with Zend_From, the only reason i want to use Zend_Form on this thoug is for validation of the uploadet files. $element = new Zend_Form_Element_File('image'); $element->setRequired(true) ->setLabel('Profile image') ->setDestination($store) ->setValueDisabled(true) ->addValidator(new Zend_Validate_File_ImageSize(array( 'minheight' => 100, 'minwidth' => 150, 'maxheight' => 1920, 'maxwidth' => 1200))) // File must be below 1.5 Mb ->addValidator(new Zend_Validate_File_FilesSize(array('max' => 1572864))) ->addValidator(new Zend_Validate_File_IsImage()); If any 1 can help me set this up would i be verry great full :D

    Read the article

  • Disable redirect in fb:request-form Send/Cancel button

    - by Colossal Paul
    Hi, How do I disable the redirect in Facebook's invite form? <fb:serverfbml style="width: 600px; height: 650px;"> <script type="text/fbml"> <fb:request-form action="index.php" method="POST" invite="true" type="MyApp" content="Please have a look. <fb:req-choice url='http://apps.facebook.com/myapp/' label='View Now!' />"> <div class="clearfix" style="padding-bottom: 10px;"> <fb:multi-friend-selector condensed="true" style="width: 600px;" /> </div> <fb:request-form-submit /> </fb:request-form> After selecting friends, you will see the final Send Invite dialog with your template. After you click send or cancel, how do i disable the redirect by just closing the the dialog? Thanks.

    Read the article

  • PHP file form question

    - by Jordan Pagaduan
    My Code : <?php function dbAdd($first_name , $image) { //mysql connect database code... mysql_query("INSERT INTO users SET first_name = '".$first_name."', image = '".$image."'"); $mysql_close($sql); } if($_SERVER['REQUEST_METHOD']=='POST') { dbAdd($_POST['first_name'], $_POST['image']); } ?> <form enctype="multipart/form-data" method="post" action=""> First Name : <input type="text" name="first_name" > Image : <input type="file" name="image"> <input type="submit"> </form> The form "file" is to upload. I know that. But I wonder how to get the values so I can put the path of image in the database. The code is already working. The $first_name can already save to the database. Thank you for the answers. Jordan Pagaduan

    Read the article

  • Javascript Post Request like a Form Submit

    - by Joseph Holsten
    I'm trying to direct a browser to a different page. If I wanted a GET request, I might say document.location.href = 'http://example.com/q=a'; But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use the HTML <form action="http://example.com/" method="POST"> <input type="hidden" name="q" value="a"> </form> Then I would just submit the form from the DOM. But really I would like JavaScript that allows me to say post_to_url('http://example.com/', {'q':'a'}); What's the best cross browser implementation? Edit I'm sorry I was not clear. I need a solution that changes the location of the browser, just like submitting a form. If this is possible with XMLHTTPRequest, it is not obvious. And this should not be asynchronous, nor use XML, so AJAX is not the answer.

    Read the article

  • jQuery to populate form fields based on first entered value where number of fields is unknown

    - by da5id
    Greetings, I have a form with a variable number of inputs, a simplified version of which looks like this: <form> <label for="same">all the same as first?</label> <input id="same" name="same" type="checkbox" /> <input type="text" id="foo[1]" name="foo[1]" value="" /> <input type="text" id="foo[2]" name="foo[2]" value="" /> <input type="text" id="foo[3]" name="foo[3]" value="" /> <input type="text" id="foo[4]" name="foo[4]" value="" /> <input type="text" id="foo[5]" name="foo[5]" value="" /> </form> The idea is to tick the #same checkbox and have jQuery copy the value from #foo[1] into #foo[2], #foo[3], etc. They also need to clear if #same is unchecked. There can be any number of #foo inputs, based upon input from a previous stage of the form, and this bit is giving me trouble. I'm sure I'm missing something obvious, but I can't get any variation on $('#dest').val($('#source').val()); to work. Help!

    Read the article

  • Ajax/PHP contact form not able to send mail

    - by Steph
    The funny thing is it did work for one evening. I contacted my host, and they are saying there's no reason it should not be working. I have also attempted to test it in Firebug, but it seemed to be sending. And I specifically put the email address (hosted in my domain) on my email safe list, so that is not the culprit either. Would anyone here take a look at it for me? I'd be so grateful. In the header I have: <script type="text/javascript"> $(document).ready(function() { var options = { target: '#alert' }; $('#contactForm').ajaxForm(options); }); $.fn.clearForm = function() { return this.each(function() { var type = this.type, tag = this.tagName.toLowerCase(); if (tag == 'form') return $(':input',this).clearForm(); if (type == 'text' || type == 'password' || tag == 'textarea') this.value = ''; else if (type == 'checkbox' || type == 'radio') this.checked = false; else if (tag == 'select') this.selectedIndex = -1; }); }; </script> Here is the actual form: <form id="contactForm" method="post" action="sendmail.php"> <fieldset> <p>Email Me</p> <div id="fieldset_container"> <label for="name">Your Name:</label> <input type="text" name="name" id="name" /><br /><br /> <label for="email">Email:</label> <input type="text" name="email" id="email" /><br /><br /> <span style="display:none;"> <label for="last">Honeypot:</label> <input type="text" name="last" value="" id="last" /> </span><br /><br /> <label for="message">Comments &amp; Inquiries:</label> <textarea name="message" id="message" cols="" rows=""></textarea><br/> </div> <div id="submit_button"> <input type="submit" name="submit" id="submit" value="Send It" /> </div> </fieldset> </form> <div class="message"><div id="alert"></div></div> Here is the code from my validating page, sendmail.php: <?php // Who you want to recieve the emails from the form. (Hint: generally you.) $sendto = '[email protected]'; // The subject you'll see in your inbox $subject = 'SH Contact Form'; // Message for the user when he/she doesn't fill in the form correctly. $errormessage = 'There seems to have been a problem. May I suggest...'; // Message for the user when he/she fills in the form correctly. $thanks = "Thanks for the email!"; // Message for the bot when it fills in in at all. $honeypot = "You filled in the honeypot! If you're human, try again!"; // Various messages displayed when the fields are empty. $emptyname = 'Entering your name?'; $emptyemail = 'Entering your email address?'; $emptymessage = 'Entering a message?'; // Various messages displayed when the fields are incorrectly formatted. $alertname = 'Entering your name using only the standard alphabet?'; $alertemail = 'Entering your email in this format: <i>[email protected]</i>?'; $alertmessage = "Making sure you aren't using any parenthesis or other escaping characters in the message? Most URLS are fine though!"; //Setting used variables. $alert = ''; $pass = 0; // Sanitizing the data, kind of done via error messages first. Twice is better! ;-) function clean_var($variable) { $variable = strip_tags(stripslashes(trim(rtrim($variable)))); return $variable; } //The first if for honeypot. if ( empty($_REQUEST['last']) ) { // A bunch of if's for all the fields and the error messages. if ( empty($_REQUEST['name']) ) { $pass = 1; $alert .= "<li>" . $emptyname . "</li>"; } elseif ( ereg( "[][{}()*+?.\\^$|]", $_REQUEST['name'] ) ) { $pass = 1; $alert .= "<li>" . $alertname . "</li>"; } if ( empty($_REQUEST['email']) ) { $pass = 1; $alert .= "<li>" . $emptyemail . "</li>"; } elseif ( !eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$", $_REQUEST['email']) ) { $pass = 1; $alert .= "<li>" . $alertemail . "</li>"; } if ( empty($_REQUEST['message']) ) { $pass = 1; $alert .= "<li>" . $emptymessage . "</li>"; } elseif ( ereg( "[][{}()*+?\\^$|]", $_REQUEST['message'] ) ) { $pass = 1; $alert .= "<li>" . $alertmessage . "</li>"; } //If the user err'd, print the error messages. if ( $pass==1 ) { //This first line is for ajax/javascript, comment it or delete it if this isn't your cup o' tea. echo "<script>$(\".message\").hide(\"slow\").show(\"slow\"); </script>"; echo "<b>" . $errormessage . "</b>"; echo "<ul>"; echo $alert; echo "</ul>"; // If the user didn't err and there is in fact a message, time to email it. } elseif (isset($_REQUEST['message'])) { //Construct the message. $message = "From: " . clean_var($_REQUEST['name']) . "\n"; $message .= "Email: " . clean_var($_REQUEST['email']) . "\n"; $message .= "Message: \n" . clean_var($_REQUEST['message']); $header = 'From:'. clean_var($_REQUEST['email']); //Mail the message - for production mail($sendto, $subject, $message, $header, "[email protected]"); //This is for javascript, echo "<script>$(\".message\").hide(\"slow\").show(\"slow\").animate({opacity: 1.0}, 4000).hide(\"slow\"); $(':input').clearForm() </script>"; echo $thanks; die(); //Echo the email message - for development echo "<br/><br/>" . $message; } //If honeypot is filled, trigger the message that bot likely won't see. } else { echo "<script>$(\".message\").hide(\"slow\").show(\"slow\"); </script>"; echo $honeypot; } ?>

    Read the article

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