Saturday, 15 September 2012

JavaScript Validation working on Firefox but not Chrome -



JavaScript Validation working on Firefox but not Chrome -

i upset, have been spending hours on this. can guys tell me whats wrong? tried onsubmit @ origin @ end of form. changed onchange , onclick still same issue.

i cant submit button give thanks message if write onclick function because disables onsubmit

<script type="text/javascript"> <!-- // form validation code come here. function validate() { if( document.myform.name.value == "" ) { alert( "please provide name!" ); document.myform.name.focus() ; homecoming false; } if( document.myform.email.value == "" ) { alert( "please provide email!" ); document.myform.email.focus() ; homecoming false; } if( document.myform.phone.value == "" || isnan( document.myform.phone.value ) || document.myform.phone.value.length != 5 ) { alert( "please provide phone number can reach you." ); document.myform.phone.focus() ; homecoming false; } return( true ); } //--> </script> <div class="iphorm-outer"> <form class="iphorm" action="send_contact.php" name="myform" method="post" > <div class="iphorm-wrapper"> <div class="iphorm-inner"> <div class="iphorm-message"></div> <div class="iphorm-container clearfix"> <!-- begin name element --> <div class="element-wrapper name-element-wrapper clearfix"> <label for="name">name <span class="required">(required)</span></label> <div class="input-wrapper name-input-wrapper"> <input class="name-element" id="name" type="text" name="name" /> </div> </div> <!-- end name element --> <!-- begin email element --> <div class="element-wrapper email-element-wrapper clearfix"> <label for="email">email <span class="required">(required)</span></label> <div class="input-wrapper email-input-wrapper"> <input class="email-element" id="email" type="text" name="email" /> </div> </div> <!-- end email element --> <!-- begin phone element --> <div class="element-wrapper phone-element-wrapper clearfix"> <label for="phone">phone</label> <div class="input-wrapper phone-input-wrapper"> <input class="phone-element" id="phone" type="text" name="phone" /> </div> </div> <!-- end phone element --> <!-- begin message element --> <div class="element-wrapper message-element-wrapper clearfix"> <label for="message">message <span class="required">(required)</span></label> <div class="input-wrapper message-input-wrapper clearfix"> <textarea class="message-element" id="message" name="message" rows="7" cols="45"></textarea> </div> </div> <!-- end message element --> <!-- begin submit button --> <div class="button-wrapper submit-button-wrapper clearfix"> <div class="loading-wrapper"><span class="loading">thank you, message sent.</span></div> <div class="button-input-wrapper submit-button-input-wrapper"> <input class="ka-form-submit" type="submit" name="contact" onclick="return(validate())" value="submit"/> </div> </div> <!-- end submit button --> </div> </div> </div> </form>

can please help me write function disable submit button unless function validate true?

everything seems fine. seek refresh page using ctrl + f5 clear browser's cache.

javascript google-chrome firefox cross-browser

php - Different behaviour with and without Symfony's response system -



php - Different behaviour with and without Symfony's response system -

i'd able manage webdav directories (and reimplement way files read , written) in symfony. found sabredav, framework basic classes required.

my problem is, while it's quite easy webdav server running using sabredav alone, doesn't work when utilize symfony.

without symfony, boils downwards to:

$server = new dav\server($rootdirectory);

$server->exec();

and can utilize cadaver access directory.

more here: http://code.google.com/p/sabredav/wiki/gettingstarted

i tried same in controller symfony, using:

return new response($server->exec());

but reason cadaver doesn't have access folder. guess i'm missing way responses work in symfony, what? sabredav uses own scheme of http requests , responses, if (as presume) symfony doesn't mess superglobal variables such $_server, shouldn't issue.

about requests , responses in symfony: http://symfony.com/doc/current/book/http_fundamentals.html#requests-and-responses-in-symfony

here's did; it's bit slow , there must improve way, i'll create moment: controller.php :

$path=(__dir__.'/../../../../web/public/'); $path=realpath($path); $publicdir= new \myclasses\fs\mydirectory($path); $server = new \sabre\dav\server($publicdir); $server->setbaseuri('/symfony/web/app_dev.php/'); { $syrequest = request::createfromglobals(); $_server=$syrequest->server->all(); $_post=$syrequest->request->all(); } { $sarequest=new \myclasses\http\request($_server,$_post); $resourcestream=false; $sarequest->setbody($syrequest->getcontent($resourcestream),$resourcestream); } { $server->httprequest=$sarequest; $saresponse=new \myclasses\http\response(); $server->httpresponse=$saresponse; $server->exec(); } { $content=ob_get_clean(); } { $syresponse=new response($content,http_response_code(),headers_list()); } homecoming $syresponse;

$server->exec();

doesn't homecoming anything. attempts set headers itself, , stream output php://output (indeed, built-in request/response system).

if want embed sabredav symfony, proper way solve subclass both sabre\http\request , sabre\http\response, , set these in server (setting ->httprequest , ->httpresponse properties) before calling ->exec.

your overridden request/response objects should map symfony's equivalents.

i don't know plenty symfony tell if map cleanly , though, , imagine in practice simpler seek work around symfony's scheme (although architectural standpoint, not proper).

php symfony2 symfony-2.1 webdav

html - IE7 position absolute with margin auto bug -



html - IE7 position absolute with margin auto bug -

i have problem positioning , margin in ie7. have got div absolute position , auto margin.

position: absolute; top: 0; right: 0; left: 0; bottom: 0; margin: auto;

this div should centered relative position parent. in ie7 not working. here illustration of working code http://jsfiddle.net/3zwka/

vertical centering in css pita, when want ie7 (or ie6) support. there many ways it, each come kind of drawback. method corresponds method 4 in linked article, , known malfunction in ie < 8.

for elements fixed width , height though, more robust method (method 2 in article) consists of positioning @ top: 50%; left: 50% , subtracting half of width top , left margins. works in browsers. here, have fiddle.

html css internet-explorer-7

c# - Get html result from web page -



c# - Get html result from web page -

i planning create movil application (for fun) should utilize result web page (http://consultawebvehiculos.carabineros.cl/index.php). there ways create instance of browser in net code , read result , publish using web service.. like:

var ie= new broswer("http://consultawebvehiculos.carabineros.cl/index.php"); var result=ie.findelementbyid("txtidentitycar").writetext(youridentitycar); publictowebserivce(result);

update: using fiddler can see http post somthing that:

post http://consultawebvehiculos.carabineros.cl/index.php http/1.1 host: consultawebvehiculos.carabineros.cl connection: keep-alive content-length: 61 cache-control: max-age=0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 origin: http://consultawebvehiculos.carabineros.cl user-agent: mozilla/5.0 (windows nt 6.2; wow64) applewebkit/537.17 (khtml, gecko) chrome/24.0.1312.57 safari/537.17 content-type: application/x-www-form-urlencoded referer: http://consultawebvehiculos.carabineros.cl/index.php accept-encoding: gzip,deflate,sdch accept-language: es-es,es;q=0.8 accept-charset: iso-8859-1,utf-8;q=0.7,*;q=0.3 accion=buscar&txtletras=cl&txtnumeros1=sk&txtnumeros2=12&vin=

may need .net class webclient in order connect php page...no sure.

update: found solution using fiddler know total parameters , i've used code http://www.hanselman.com/blog/httppostsandhttpgetswithwebclientandcandfakingapostback.aspx

if interested in scraping page, suggest using html agility pack.

if want display page, utilize webbrowser control.

c# .net

Maximum length of WPF .net exe filename -



Maximum length of WPF .net exe filename -

we had situation when file name of wpf .net 4.0 exe exceeds 47(51 including .exe extension) exe not working. says stopped working.

the issue there if set file in side c:\ means not windows limit.

anybody came across situation this.

the issue solved renaming exe file abbreviations. know why happens.

thanks in advance joy

from comments

its normal stopped working dialog.in problem details says:

problem signature: problem event name: bex application name: abcedfghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv.exe application version: 1.0.0.0 application timestamp: 50e559e0 fault module name: igdumd32.dll fault module version: 8.15.10.1995 fault module timestamp: 4af4b4e4 exception offset: 00014fe6 exception code: c0000409 exception data: 00000000 os version: 6.1.7601.2.1.0.256.4 locale id: 1033 additional info 1: 1d75 additional info 2: 1d7537ede8bee0a1d08a5f0d2036cc52

that's stack buffer overflow in igdumd32.dll. congratulations. you've found out hard way intel suck @ writing secure code.

other fact intel graphics accelerator dll graphics card vendor helpfully shoving process , stack overflowing when give long module name, there no limit length of wpf filename, other usual windows restriction of max_path.

.net wpf windows-7

c - Value of char array changes to second iteration value, I want it to be independent -



c - Value of char array changes to second iteration value, I want it to be independent -

i under impression on each run, in strings array, storing @ pos new str since declaring everytime, instead, on 2nd run if addstr become hello, , on first run hi, first run hi becomes hello. want different char array on each run in strings later on each position have different strings. requirements can not utilize malloc, realloc, calloc. thought on 2nd iteration of first loop creating on char str independent of previous one. please help me.

int pos = 0; for(i=0; i<4; i++) { if(file [i]=='a') { char str[5]; int b=0; for(b; b<3; bi++) { str[b]=file[b]; } strings[pos]=str; pos++; } }

when this:

strings[pos]=str;

it simply sets array element buffer pointed 'str'. not re-create string. 'str' buffer never changes, entire array ends pointing same buffer.

rather, @ line need re-create string. if can't utilize malloc, strings array needs have buffers @ each array element (aka 2 dimensional array). maybe declare like:

char strings[5][5];

then instead of using strcpy re-create 'str', re-create string 'strings[pos]';

c

intuit partner platform - Setting IDs for JournalEntry or Invoice -



intuit partner platform - Setting IDs for JournalEntry or Invoice -

i trying insert invoice, credit memo, , invoice using ipp.net. how know accountid, classid, or entityid is? when used web connector write previous interface, able specify these things fullname. need type of query of ids future use? if that, ids ever alter through processes, such re-indexing, or id permanent?

if you're integrating quickbooks online:

yes, ipp apis quickbooks online take id values. have query objects can id values utilize them in future invoice/credit memo add together requests.

if you're integrating quickbooks windows:

the ipp apis quickbooks desktop windows can take either name values, or id values. either query id values, or utilize names in sdk.

a few things worth noting:

the next version of info services intuit releasing (v3) released summer/fall 2013. v3 info services only take id values quickbooks online in v2. so, if want plan ahead future, start querying. :-)

regarding this:

if that, ids ever alter through processes, such re-indexing, or id permanent?

the id values permanent - should never change. the 1 exception this if gets fubar'd on intuit's end , reset someone's sync manager forcefulness quickbooks sync new online realm. shouldn't happen in production.

intuit-partner-platform