Search Results

Search found 52 results on 3 pages for 'streetparade'.

Page 1/3 | 1 2 3  | Next Page >

  • Check if Checkbox is checkd?

    - by streetparade
    Im trying to get some checkbox with a specific name document.getElementsByName("test"); Unfortunatley i cant check if it is checked or not here is the code for(i=0;i<check.length;i++) { if(check[i].checked==true) { alert(check[i].value); } } Is somewhere a typo?

    Read the article

  • How to Pregreplace {number}) with \n{number})

    - by streetparade
    How can i replace {number}) with \n{number}) Say i have something like this 1) test string testing new string. 2) that is also a new string no new line. 3) here also no new lines. The output should be something like this 1) test string testing new string. 2) that is also a new string no new line. 3) here also no new lines. How can i do that with a regex?

    Read the article

  • Get Specific part of a String in Javascript

    - by streetparade
    I have a string containing something like this "Hello bla bla bla bla ok, once more bla können. // this is static: it doesn't change This is a text, this also a text. // this is dynamically added text it can change each time My name mysurename // this is also static text www.blabla.com " Now I have content and I have to get the first part of the string and the third part, I want to be able to have 3 parts, I think I have to split it using something like split(); string1 = "Hello bla bla bla bla ok, once more bla können.; string2 = ""; // i have this part string3 ="My name mysurename"; If it helps the first part ends with "können. " and the third part ends with the url above // its a fictional URL

    Read the article

  • How To Disable Curl Debug Output in PHP

    - by streetparade
    I wrote a PHP CUrl Class, if i execute Methods which should return the Content, it returns at first the Headers and after that the Content. So i cant parse any XML Data. I need to Disable This Sample Output. HTTP/1.1 200 OK Date: Thu, 01 Apr 2010 20:11:58 GMT Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny4 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g X-Powered-By: PHP/5.2.6-1+lenny4 Set-Cookie: PHPSESSID=44beccf62f87546140d4a0bd24bd28b0; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Transfer-Encoding: chunked Content-Type: application/xml Here is The Curl Class <?php class Test_Curl { protected $curl; protected $headers; protected $useragent; protected $url; protected $testkey; public function __construct() { } public function setUseraget($useragent) { $this->useragent = $useragent; return $this; } public function setApiKey($key) { $this->billomatApiKey = $key; } private function curlExecGeneral() { $result = curl_exec($this->curl); curl_close($this->curl); return $result; } private function curlInitGeneral($request) { $this->curl = curl_init($request); curl_setopt($this->curl, CURLOPT_HEADER, true); curl_setopt($this->curl, CURLOPT_HTTPHEADER, array("X-testkey: ".$this->testkey, "Content-Type: application/xml")); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); } public function get($request) { $this->curlInitGeneral($request); curl_setopt ($this->curl, CURLOPT_HTTPGET, true); return $this->curlExecGeneral(); } public function post($request, $xml) { $this->curlInitGeneral($request); curl_setopt ($this->curl, CURLOPT_POST, true); //set the Requestmethod to POST curl_setopt ($this->curl, CURLOPT_POSTFIELDS, $xml); //add the xml data to the Request return $this->curlExecGeneral(); } } ?>

    Read the article

  • Remove <p class="classname"> in Javascript?

    - by streetparade
    How can i remove this <p> tag with all its content in javascript? say i have this html code <p class="classname"> <input name="commit" value="Get Value" type="submit"> <span>or Cancel</span> </p> Now i need to replace/remove it in javascript, does anyone know how i can remove it?

    Read the article

  • Limit Checkbox amount

    - by streetparade
    I have 20 Checkboxes. I need to disable 16 Checkboxes, if 4 checkboxes are selected. I tryed this begann with this jquery code $("input[type=checkbox][name=cate]:checked").each( function() { } ); What i need is if a user selects 4 checkboxes then all other checkboxes should be disabled.

    Read the article

  • How to return Current Object in a Static function in PHP

    - by streetparade
    I neet access to current object in a static method. Code: protected static $name; public static function name($modulename) { self::$name = $modulename; } public function __call($name, $arguments) { $me = new test(self::$name); return $me->$name($arguments); } I want to be able to call method log in Log class. Like this echo Mods::name("Log")->log("test"); How do i do that?

    Read the article

  • Compare structures of two databases?

    - by streetparade
    Hello, I wanted to ask whether it is possible to compare the complete database structure of two huge databases. We have two databases, the one is a development database, the other a production database. I've sometimes forgotten to make changes in to the production database, before we released some parts of our code, which results that the production database doesn't have the same structure, so if we release something we got some errors. Is there a way to compare the two, or synchronize?

    Read the article

  • How to get a Clean String in Javascript?

    - by streetparade
    i have a long String. With some German characters and lots of new lines tabs ect.. In a Selectbox user can select a text, on change i do document.getElementById('text').value=this.value; But this fails. I just get a "unterminated string literal" as error in JavaScript. I think i should clean the string. How can i do it in JavaScript?

    Read the article

  • How to check If a Tel: area code is correct using jquery?

    - by streetparade
    Hy I need to check if the given phone area code is correct. i created a input field, user can insert a tel area code like 0044 oder 0090 and so on. I restricted the input field to 4 chars. I need to check after the 4 chars are entered if the area code is correct. What it should do. After entering 4 number, the script should check the following things. Does the entered number equals something like "00{number 2 digit only}" if it doesnt alert("please enter correct tel areacode"); I hope i could explain my problem clear. How can i do it with javascript or jquery?

    Read the article

  • How to Convert arrays or SimpleXML-Objects into an XML-String

    - by streetparade
    I want to create a xml from a given string, i have a function but i didn't wrote it.It seems a bit cryptical too. Can please some one review it and give me some Ideas, how it could be written clearer for everybody? /** * Converts arrays or SimpleXML-Objects into an XML-String * @params mixed Accepts an array or xml string with data to Post * @params integer DO NOT PROVIDE. Internal Usage for recursion only */ private function mixedDataToXML($data, $level = 1) { if(!$data){ return FALSE; } if(is_array($data)) { $xml = ''; if ($level==1) { $xml .= '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n"; } foreach ($data as $key => $value) { $key = strtolower($key); if (is_array($value)) { $multi_tags = false; foreach($value as $key2=>$value2) { if (is_array($value2)) { $xml .= str_repeat("\t",$level)."<$key>\n"; $xml .= $this->mixedDataToXML($value2, $level+1); $xml .= str_repeat("\t",$level)."</$key>\n"; $multi_tags = true; } else { if (trim($value2)!='') { if (htmlspecialchars($value2)!=$value2) { $xml .= str_repeat("\t",$level). "<$key><![CDATA[$value2]]>". "</$key>\n"; } else { $xml .= str_repeat("\t",$level). "<$key>$value2</$key>\n"; } } $multi_tags = true; } } if (!$multi_tags and count($value)>0) { $xml .= str_repeat("\t",$level)."<$key>\n"; $xml .= $this->mixedDataToXML($value, $level+1); $xml .= str_repeat("\t",$level)."</$key>\n"; } } else { if (trim($value)!='') { if (htmlspecialchars($value)!=$value) { $xml .= str_repeat("\t",$level)."<$key>". "<![CDATA[$value]]></$key>\n"; } else { $xml .= str_repeat("\t",$level). "<$key>$value</$key>\n"; } } } } return $xml; }else{ return (string)$data; } }

    Read the article

  • Exploding a String In PHP

    - by streetparade
    How do i explode this string '||25||34||73||94||116||128' i need to have a array like this array ( 0 => '25', 1 => '34', 2 => '73', 3 => '94', 4 => '116', 5 => '128' ) explode("||", $array); didnt work for me i get this array array ( 0 => '', 1 => '25', 2 => '34', 3 => '73', 4 => '94', 5 => '116', 6 => '128', )

    Read the article

  • How to change element name on Page load with jquery?

    - by streetparade
    Hy, i need to know how i can change the name of a element. I have the id of that element say it is "tester" Ok the on page load problem could be solved this way. $(document).ready(function() { }); but how can i change the name of a element like this? <div id="tester" name="fun"> </div> what i want as result <div id="tester" name="tester"> </div>

    Read the article

  • CSS Footer Not on same Line

    - by streetparade
    Im trying to write a footer like this one Did i said that im very bad at Css? My css looks like this #footer-navi { margin-bottom:1.5em; padding-bottom:1.5em; } clearfix { display:block; } #footer-group { margin:0 auto; } How can i implement somethin like the footer above? Thanks very much.

    Read the article

1 2 3  | Next Page >